Skip to content

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
@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.

2 participants