-
Notifications
You must be signed in to change notification settings - Fork 12
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
Handle deprecation of inputs #267
Comments
Digging in a bit, I see We are using the embedded sandbox in apollo-router and currently seeing the error described above. |
Hey! Apologies for the late reply here. This should be checking the introspection response to see if your I tested on a schema with a deprecated input field and am seeing it work alright: https://codesandbox.io/p/sandbox/as4-integration-testing-e90bft?file=%2Fsrc%2Fserver.ts%3A11%2C1-13%2C4 Would you be able to validate for me the version of graphql js you are using? 🙏🏻 |
closing as we have not heard back |
Deprecation of input values has now been merged into the GraphQL spec. This includes a modification to the introspection query.
Without
includeDeprecated = true
oninputFields
in the introspection query, an error occurs on any input objects that have all fields deprecated:Error: Invalid schema from introspection: Input Object type <typename> must define one or more fields.
GraphiQL now has a flag that determines whether the introspection query should include
includeDeprecated = true
oninputFields
, since only compatible graphs will know about this argument. Sandbox/explorer could do something similar or somehow autodetect whether the graph supports deprecation of input fields.You just need to set the
inputValueDeprecation
arg in the graphql-js getIntrospectionQuery function.The text was updated successfully, but these errors were encountered: