-
Notifications
You must be signed in to change notification settings - Fork 737
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
Validate @defer
directive in schema matches GraphQL spec definition
#3287
Validate @defer
directive in schema matches GraphQL spec definition
#3287
Comments
For visibility, I'm currently getting the below error when generating my graph in version
|
@harryblam that's correct because some of the defer work has been merged into
There isn't a PR to change this yet, this is just an issue to track the problem. Are you also using AppSync though? If you are this error will remain even after it stops adding a duplicate directive. The reason for that is the check I'd implement would be to ensure that any pre-existing Once the directive is merged into the GraphQL spec, AppSync is going to need to change in order to be spec compliant. |
I recently made a change to not duplicate the directive, which may be correct for the long-term too, but I still feel we need a check to ensure that any existing defer directive must comply with the RFCs specification of the directive. |
@defer
directive to the schema@defer
directive in schema matches GraphQL spec definition
This is done with the merging of apollographql/apollo-ios-dev#403. |
Do you have any feedback for the maintainers? Please tell us by taking a one-minute survey. Your responses will help us understand Apollo iOS usage and allow us to serve you better. |
This is in reference to an interesting bug reported on Discord - https://discord.com/channels/1022972389463687228/1174776645358465114/1174776645358465114.
tl;dr - AppSync appears to support a version of
@defer
and it's in schemas downloaded from AppSync. Our JS frontend manually adds the@defer
directive to schemas so it can be used in operations. The directive from AppSync differs in that it allows it to be used onFIELD
locations only.The work here is to make sure that we're not adding a duplicate directive which would cause schema validation to fail. We also need to make sure that if one exists it's on the same locations and supports the same arguments otherwise we should fail our validation.
The text was updated successfully, but these errors were encountered: