Make the reason argument in @deprecated non-nullable#1040
Make the reason argument in @deprecated non-nullable#1040leebyron merged 3 commits intographql:mainfrom
@deprecated non-nullable#1040Conversation
✅ Deploy Preview for graphql-spec-draft ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
|
Partially related PR in GraphQL JS graphql/graphql-js#4006 where the |
|
Can this be moved to RFC1 or do we need anything else? Planning to work on a graphql-js implementation for the next wg. |
Insufficiently precise review. I meant that I approve of the desire rather than approved the spec edits - oops.
|
Stage 1 entrance criteria:
I'll bump it now. |
|
From the meeting:
Other sections of the spec will need to be addressed too, for example: https://spec.graphql.org/draft/#sel-FAJXLDCAACECx6V should actually have two bangs? Looks like the |
I think it has to stay
Same! I find using optional for output positions is confusing. Proposal to change the wording to: We could even go as far as "deprecating |
100% correct, sorry if I implied otherwise - it was not my intent.
I added a comma, but yes looks good to me! (Follow the pattern of the surrounding text if you haven't already.)
I think we should leave |
|
👍 Makes a lot of sense. And thanks for the comma! Will dive a bit more into this in the upcoming month |
…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
`@deprecated` reason used to be optional in the past and as such it was omitted from the supergraph schema. [Reason is no longer optional](graphql/graphql-spec#1040) so we should always include it (even if it is a default).
`@deprecated` reason used to be optional in the past and as such it was omitted from the supergraph schema. [Reason is no longer optional](graphql/graphql-spec#1040) so we should always include it (even if it is a default).
Follow up from #53 (comment)
Make
reasonnon-nullable:This is technically a breaking change for someone that does this:
But feels like this shouldn't be allowed in the first place?
Fixes #53