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

Allow deprecating types #550

Open
stubailo opened this issue Jan 15, 2019 · 3 comments
Open

Allow deprecating types #550

stubailo opened this issue Jan 15, 2019 · 3 comments
Labels
💭 Strawman (RFC 0) RFC Stage 0 (See CONTRIBUTING.md)

Comments

@stubailo
Copy link
Contributor

The last discussion of this is #197 (comment)

For purposes of tooling and documentation, it would be nice to be able to deprecate an entire type. This is useful for cases where you're trying to transition to a new object type, and you would like to prevent people from adding new fields which reference the old type.

@IvanGoncharov IvanGoncharov added the 💭 Strawman (RFC 0) RFC Stage 0 (See CONTRIBUTING.md) label Jan 15, 2019
@mannyistyping
Copy link

I am definitely interested and curious on the communities thoughts around this proposal.

Some coworkers were wanting to remove a type completely and transition to a new object type.
We ended up deprecating the Queries that were returning the "out dated" type.

I can see value in marking a type as "out dated" and providing deprecation reason to instead use a newer type that is meant to replace.

@gwardwell
Copy link

gwardwell commented May 12, 2023

Deprecating the type lends clarity to the intent of the schema change. If the queries/mutations/fields that return the type are deprecated, that doesn’t indicate that no new queries/mutations/fields returning the type should be created. In that sense, it doesn’t communicate that it’s not the schema returning the type that is the problem, but the type itself.

Ultimately the queries/mutations/fields and type should be deprecated. That creates clear communication that the type is being retired as well as all the corresponding schema returning it.

Additionally, since types can appear in query documents by way of fragments, it makes sense for type deprecation to be communicated to client applications that may be referencing them.

@benjie
Copy link
Member

benjie commented Aug 21, 2023

@fotoetienne is championing @deprecated on object types via #997

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💭 Strawman (RFC 0) RFC Stage 0 (See CONTRIBUTING.md)
Projects
None yet
Development

No branches or pull requests

5 participants