-
Notifications
You must be signed in to change notification settings - Fork 728
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
1.14.0 using introspection creates duplicate defer directive #3417
1.14.0 using introspection creates duplicate defer directive #3417
Comments
@loganblevins, I'm not able to replicate the error you describe when the schema only has a single defer directive definition. Here is a sample project I put together that contains three schemas:
We also have a test on our If you're able to change the sample project to fail in the same way as you're seeing it would help in debugging this further. Otherwise if your schema is large it may be worth doing another search for
What leads to you to believe that codegen is adding another directive definition? I don't think we output the schema, or store it locally for inspection, at any stage of code generation. |
No, there is no way to disable defer support. If there are no operations that use the defer directive then codegen outputs models as previous versions. |
@calvincestari Here is my json config for context: The endpoint is not public so you won't be able to introspect.
|
@calvincestari Here is my script I run to introspect and run code gen. This command on 1.14.0 is creating the duplicate defer directive in my schema file.
|
I mentioned in the other GH thread that our schema file already contains a defer directive prior to updating to 1.14.0 and the above command I run is adding another one. |
Sorry if I said code gen... I run the plugin CLI tool with introspect and code gen at once so it may just be the introspect step that is the issue |
OK, so is it the schema file that's output from the That schema file is simply the result of introspection and output. There is no defer-related manipulation done to the schema before output. |
@calvincestari that is correct but only on 1.14.0 If I revert back to my prior tag 1.12.0 and introspect the diff is unchanged. |
This is certainly weird. I'm confused how Are you able to validate this with a separate tool like Apollo Studio or GraphiQL that will let you view the schema off your server too? Either of those should let you view, and download, the schema. |
@calvincestari I don't know how to use the sample project you sent to replicate if it's the It definitely is a blocker bug because I am unable to update the package on my end and am blocked. I've been using this Apollo tool for a long time and never had this issue. I just introspected now on 1.12.0 and have no issues. |
@calvincestari While it is possible I could use Apollo Studio that is a very manual process and leaves the CLI in a broken state and unusable |
No, if
The CLI will get fixed if there is an issue there. I'm still trying to figure out the root cause. |
OK, I've gotten to a state where I can replicate the diff via introspection. Give me some time to try figure out how this is happening. |
@calvincestari Awesome thanks |
|
I've got a |
@calvincestari Cool thanks! |
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. |
The PR to resolve this has been merged and the fix will go out in the next release, we're aiming to publish that this week still. |
@calvincestari super grateful - thank you! |
Working!! Thank you! |
Summary
See #2395 (comment)
Version
1.14.0
Steps to reproduce the behavior
I cannot share our private schema, but our schema line 1 contains directive defer.
Then I run introspection on 1.14.0 and it makes yet another defer directive and the json schema validation fails.
Logs
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: