Skip to content

Conversation

@IvanGoncharov
Copy link
Member

@IvanGoncharov IvanGoncharov commented Dec 3, 2020

Continuation of #525 by @smitt04
Revisits #197 by @dylanahsmith

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Dec 3, 2020

CLA Signed

The committers are authorized under a signed CLA.

@IvanGoncharov IvanGoncharov added 💡 Proposal (RFC 1) RFC Stage 1 (See CONTRIBUTING.md) 🚀 Next Stage? This RFC believes it is ready for the next stage labels Dec 3, 2020
maartenvanvliet added a commit to maartenvanvliet/absinthe that referenced this pull request Dec 20, 2020
Absinthe already supported deprecating args/input fields and this
PR exposes that in the introspection query to match the spec.

Also some tests were added for deprecating stuff.

See graphql/graphql-spec#805 for the spec update
Base automatically changed from master to main February 3, 2021 04:50
@leebyron
Copy link
Collaborator

@smitt04 would you mind signing the CLA (linked above) for your contribution?

@leebyron leebyron changed the title Allow deprecation of input values Allow deprecation of input values (field args, directive args, input fields) Apr 22, 2021
@leebyron
Copy link
Collaborator

I've applied some editorial here, and I think this is good to go from a spec text point of view. The previous PR was moved to RFC2 and as discussed here graphql/graphql-wg#639 we have some next steps.

Notably on the JS side there is a missing piece compared to what this RFC proposes, tracked here: graphql/graphql-js#3048

There was also a question about validation being correct or having the right "breaking/dangerous changes" protections in place. @IvanGoncharov or other authors here have context on that?

@leebyron leebyron added 📄 Draft (RFC 2) RFC Stage 2 (See CONTRIBUTING.md) and removed 💡 Proposal (RFC 1) RFC Stage 1 (See CONTRIBUTING.md) 🚀 Next Stage? This RFC believes it is ready for the next stage labels Apr 22, 2021
@leebyron leebyron requested a review from a team April 22, 2021 22:47
@leebyron leebyron force-pushed the main branch 4 times, most recently from e5d241d to 6c81ed8 Compare April 23, 2021 19:15
@michaelstaib
Copy link
Member

@IvanGoncharov Do we have any validation rule changes so that it is invalid to deprecate required arguments or required input fields?

Zain-Bin-Arshad added a commit to Zain-Bin-Arshad/graphql-ruby that referenced this pull request Mar 19, 2024
It is now safe to remove this warning, this is merged and isn't a proposal anymore, see more  graphql/graphql-spec#805
tyranron added a commit to graphql-rust/juniper that referenced this pull request Sep 12, 2025
…raphql/graphql-spec#525, graphql/graphql-spec#805)

- allow `#[graphql(deprecated)]` and `#[deprecated]` attributes on struct fields in `#[derive(GraphQLInputObject)]` macro
- allow `#[graphql(deprecated)]` attribute on method arguments in `#[graphql_object]` and `#[graphql_interface]` macros
- allow `@deprecated` directive on arguments and input object fields
- add `__InputValue.isDeprecated` and `__InputValue.deprecationReason` fields
- add `includeDeprecated` argument to `__Type.inputFields`, `__Field.args` and `__Directive.args` fields
- make `includeDeprecated` argument of `__Type.fields`, `__Type.enumValues`, `__Type.inputFields`, `__Field.args` and `__Directive.args` fields non-`Null` (graphql/graphql-spec#1142)
- add `schema::meta::Argument::deprecation_status` field
- make `@deprecated(reason:)` argument non-`Null` (graphql/graphql-spec#1040)

Additionally:
- add `__Type.isOneOf` field (graphql/graphql-spec#825)
- add `SCHEMA`, `OBJECT`, `ARGUMENT_DEFINITION`, `INTERFACE`, `UNION`, `ENUM`, `INPUT_OBJECT` and `INPUT_FIELD_DEFINITION` values to `__DirectiveLocation` enum
- update canonical introspection query to 16.11.0 version of GraphQL.js
- fix incorrect `__Type.specifiedByUrl` field name to `__Type.specifiedByURL`
- fix missing `@specifiedBy(url:)` directive in SDL generated by `RootNode::as_sdl()` and `RootNode::as_document()` methods
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🏁 Accepted (RFC 3) RFC Stage 3 (See CONTRIBUTING.md)

Projects

None yet

Development

Successfully merging this pull request may close these issues.