-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Breaking change with deprecated fields not being included by default #2834
Comments
Related: having a |
@Betree You pointed to this line: And this line adds
It's strange since #2733 should be strictly additive change. |
This might be a similar issue to what I ran into when upgrading to 15.4.0. Some developers working on our schema did not realize it was not possible to deprecate arguments in older versions of graphql-js, and had added a deprecationReason which was ignored in all versions prior to 15.4.0. In 15.4.0, the depreciationReason causes arguments to not be returned by the default introspection query, giving the effect of these arguments "disappearing" from schema introspection when upgrading to 15.4.0. |
On this codebase: https://github.com/opencollective/opencollective-api. Schema is generated thanks to To reproduce:
Note: server needs to be restarted manually after updating dependencies. The API is fully opensource, so feel free to look at the code for the schema. One of the removed fields for example is this one: https://github.com/opencollective/opencollective-api/blob/master/server/graphql/v2/input/AccountReferenceInput.js#L15 |
@Betree Thanks for reproduce the scenario 👍 @Betree @robrichard So how critical this issue for your project? |
It's not critical for my project, but it would be nice to be able to query these deprecated input fields and arguments with the introspection query |
@robrichard Yes, you are able to do that if you use |
In our case it's preventing the update to Maybe we can open a PR on https://github.com/prisma-labs/get-graphql-schema to include deprecated fields by default? I'm not sure how to achieve this with |
@IvanGoncharov Any suggestion on what we should do to resolve this issue? |
Yes, I forget to update |
(Late) thank you @IvanGoncharov! I'll make the change for us to use this new parameter. |
In 15.4.0 release, this change was merged which prevents deprecated field from being returned when fetching the schema by default. Because these fields were returned before, this is a breaking change for projects that use this to update a local file for their schema.
In our case, the schema is used by a linter and our CI is now blocked because some fields are not in the schema anymore, yet we still use them in some places.
Proposed solutions:
includeDeprecated
'sdefaultValue
totrue
Happy to contribute to one of these options if the maintainers think it's the way to go.
Ping @IvanGoncharov since you worked on this recently.
The text was updated successfully, but these errors were encountered: