Skip to content

Make deprecated introspection optional for legacy servers#1849

Open
johnxy84 wants to merge 2 commits intowebonyx:masterfrom
johnxy84:master
Open

Make deprecated introspection optional for legacy servers#1849
johnxy84 wants to merge 2 commits intowebonyx:masterfrom
johnxy84:master

Conversation

@johnxy84
Copy link

@johnxy84 johnxy84 commented Feb 6, 2026

  • Add includeDeprecated option to Introspection::getIntrospectionQuery() to omit deprecated args/fields for older spec compatibility.
  • Omit isDeprecated/deprecationReason and includeDeprecated arguments when disabled.
  • Harden BuildClientSchema to treat missing deprecationReason as null.
  • Add regression tests for the new behavior.

* - typeIsOneOf
* Include field `isOneOf` for types?
* Default: false
*
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's keep this blank line

self::assertCount(0, $matches[0]);
}

/** @see it('excludes deprecated fields and indicators when disabled') */
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are there tests in graphql-js called exactly like this? If so, please provide links to them. If not, we can omit this comment.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ohh, did not know that's how it worked, but no, this is not covered there. I'll take out the comment.

CHANGELOG.md Outdated

### Changed

- Allow omitting deprecated introspection arguments/fields for legacy servers
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Allow omitting deprecated introspection arguments/fields for legacy servers
- Allow omitting deprecated introspection arguments/fields for legacy servers https://github.com/webonyx/graphql-php/pull/1849

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.

2 participants