Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Federation Introspection #103

Conversation

NeedleInAJayStack
Copy link
Member

This tweaks the federation implementation to avoid creating __resolveReference fields on each entity. Instead, the appropriate entity resolver function is generated, stored, and referenced outside the GraphQL object itself. This avoids polluting the GraphQL object with unnecessary fields.

@NeedleInAJayStack
Copy link
Member Author

Fixes #102

@NeedleInAJayStack
Copy link
Member Author

P.S. @d-exclaimation, I used Pioneer for the first time to get a debugging Vapor/GraphiQL instance up for this fix, and it was unbelievably quick and easy. Exceptional work on that package!

Copy link
Member

@d-exclaimation d-exclaimation left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

We might want to add a federation test sometime in the future so that it's easier to catch these type of issues

@NeedleInAJayStack
Copy link
Member Author

@d-exclaimation Good call. We've got federation unit tests here, but you're right - some integration tests for federation compliance would be great as well.

@NeedleInAJayStack NeedleInAJayStack merged commit d8f83ee into GraphQLSwift:main Feb 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants