Skip to content

Add missing __Directive.args(includeDeprecated:) #1738

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

Conversation

Gregory-Gerard
Copy link
Contributor

Hey! First time contributing here 👋

Adds the missing includeDeprecated argument to __Directive.args field to match GraphQL.js implementation (graphql/graphql-js#3273) and GraphQL Spec (graphql/graphql-spec#805).

The argument allows filtering deprecated directive arguments from introspection results when set to false (default behavior).

This notably fixes schema generation with graphql-codegen when using the "inputValueDeprecation" option (see dotansimha/graphql-code-generator#9659).

Includes tests for deprecated argument filtering that I didn't find in GraphQL.js.

Thanks for your review time.

@liliangiraudo5
Copy link

Perfect timing — I’ve got the same issue going on.

@spawnia
Copy link
Collaborator

spawnia commented Jul 28, 2025

Let's include the changes from graphql/graphql-js#4354 also.

@Gregory-Gerard
Copy link
Contributor Author

Let's include the changes from graphql/graphql-js#4354 also.

Done!

Adds the missing includeDeprecated argument to `__Directive.args` field
to match GraphQL.js implementation (graphql/graphql-js#3273).

The argument allows filtering deprecated directive arguments from
introspection results when set to false (default behavior).

This notably fixes schema generation with `graphql-codegen` when using
the "inputValueDeprecation" option (see dotansimha/graphql-code-generator#9659).

Includes tests for deprecated argument filtering that I didn't find
in GraphQL.js.
@Gregory-Gerard Gregory-Gerard force-pushed the missing-directive-args-include-deprecated branch from 64f974d to 851ddb5 Compare July 28, 2025 10:37
@spawnia spawnia merged commit a03e7c4 into webonyx:master Jul 28, 2025
18 checks passed
@spawnia
Copy link
Collaborator

spawnia commented Jul 28, 2025

Nice work on making a clean change with good commits!

@Gregory-Gerard Gregory-Gerard deleted the missing-directive-args-include-deprecated branch July 28, 2025 12:27
@spawnia
Copy link
Collaborator

spawnia commented Jul 28, 2025

Released with https://github.com/webonyx/graphql-php/releases/tag/v15.22.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants