-
-
Notifications
You must be signed in to change notification settings - Fork 207
Description
Issue workflow progress
Progress of the issue based on the
Contributor Workflow
- 1. The issue provides a reproduction available on GitHub, Stackblitz or CodeSandbox
Make sure to fork this template and run
pnpm generatein the terminal.Please make sure the Codegen and plugins version under
package.jsonmatches yours. - 2. A failing test has been provided
- 3. A local solution has been provided
- 4. A pull request is pending review
Describe the bug
I have a number of queries using deprecated arguments in my server, but I noticed that when I try to validate the queries against the server using introspection, Inspector does not recognize those arguments.
To Reproduce Steps to reproduce the behavior:
- Create a schema with an deprecated argument.
type Query { testField(arg: Boolean @deprecated(reason: "I felt like it.")): Boolean }
- Create an operation that uses the deprecated argument:
query TestQuery { testField(arg: true) }
- Run a server:
graphql-inspector serve schema.gql - Run
graphql-inspector validate query.gql http://localhost:4000/graphql
Expected behavior
The schema should validate.
Environment:
- OS: macOS Sonoma
@graphql-inspector/cli: 5.0.8graphql: 16.8.0- NodeJS: 20.18.0
Additional context
I believe I've traced it down to a change in graphql-js 15.4.0: graphql/graphql-js#2834
They allow adjusting the introspection query to include deprecated arguments, but GraphQL Inspector does not allow modifying the introspection query or inputting options into the generation function.