Skip to content
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

fix: Preserve deprecationReason on GraphQLInputFields #3257

Merged

Conversation

trevor-scheer
Copy link
Contributor

GraphQLInputObjectType.toConfig() currently doesn't preserve deprecationReasons on its fields. Anything internal depending on this function omits the deprecationReason from a GraphQLInputObjectType's fields.

This was easy to remedy - we just needed to copy the field's deprecationReason property during the mapping of fields done in toConfig().

I experienced this issue when using extendSchema on a GraphQLSchema object which had a GraphQLInputObjectType with fields marked @deprecated. The reason would be dropped from the extended schema.

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Sep 3, 2021

CLA Signed

The committers are authorized under a signed CLA.

@trevor-scheer trevor-scheer force-pushed the fix-input-object-deprecation-reason branch from f33cc7e to ee1460a Compare September 3, 2021 22:26
@trevor-scheer trevor-scheer force-pushed the fix-input-object-deprecation-reason branch from ee1460a to 6ae37e5 Compare September 3, 2021 22:27
@IvanGoncharov IvanGoncharov added the PR: bug fix 🐞 requires increase of "patch" version number label Sep 6, 2021
@IvanGoncharov IvanGoncharov merged commit 2df59f1 into graphql:main Sep 6, 2021
IvanGoncharov added a commit that referenced this pull request Sep 6, 2021
Backported from #3257

Co-authored-by: Ivan Goncharov <ivan.goncharov.ua@gmail.com>
@trevor-scheer trevor-scheer deleted the fix-input-object-deprecation-reason branch September 7, 2021 05:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: bug fix 🐞 requires increase of "patch" version number
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants