Skip to content

[federation] skip validation of nested objects under construction #403

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

Merged
merged 1 commit into from
Sep 30, 2019

Conversation

dariuszkuc
Copy link
Collaborator

📝 Description

When generating federated GraphQL schema we attempt to validate the generated objects. This is problematic when we are dealing with nested relationships as at validation time, those objects are still being built so we only have access to their GraphQLTypeReference. Those references are replaced as the last step of schema generation lifecycle which means we won't be able to perform any validations on those objects when they are still being built. This PR disables the validation of @provides directive when it references objects that are still being built.

🔗 Related Issues

Resolves: #397

When generating federated GraphQL schema we attempt to validate the generated objects. This is problematic when we are dealing with nested relationships as at validation time, those objects are still being built so we only have access to their `GraphQLTypeReference`. Those references are replaced as the last step of schema generation lifecycle which means we won't be able to perform any validations on those objects when they are still being built. This PR disables the validation of `@provides` directive when it references objects that are still being built.
@smyrick smyrick added changes: patch Changes require a patch version type: bug Something isn't working labels Sep 30, 2019
@smyrick smyrick merged commit 709d2cd into ExpediaGroup:master Sep 30, 2019
@dariuszkuc dariuszkuc deleted the nested_federation_directive branch September 30, 2019 21:10
dariuszkuc added a commit to dariuszkuc/graphql-kotlin that referenced this pull request Aug 5, 2022
…pediaGroup#403)

When generating federated GraphQL schema we attempt to validate the generated objects. This is problematic when we are dealing with nested relationships as at validation time, those objects are still being built so we only have access to their `GraphQLTypeReference`. Those references are replaced as the last step of schema generation lifecycle which means we won't be able to perform any validations on those objects when they are still being built. This PR disables the validation of `@provides` directive when it references objects that are still being built.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changes: patch Changes require a patch version type: bug Something isn't working
Development

Successfully merging this pull request may close these issues.

Provides directive error on two referencing types
2 participants