Expand @deprecated to Object types#3818
Conversation
✅ Deploy Preview for compassionate-pike-271cb3 ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
IvanGoncharov
left a comment
There was a problem hiding this comment.
Please update this rule: https://github.com/graphql/graphql-js/blob/main/src/validation/rules/custom/NoDeprecatedCustomRule.ts
and also add validation preventing the usage of the deprecated type directly here: https://github.com/graphql/graphql-js/blob/main/src/type/validate.ts
442e57b to
447f232
Compare
|
@fotoetienne is attempting to deploy a commit to the The GraphQL Foundation Team on Vercel. A member of the Team first needs to authorize it. |
Add support for @deprecated directive on OBJECT type definitions. - Add deprecationReason to GraphQLObjectType class and config - Add OBJECT to @deprecated directive locations - Add isDeprecated/deprecationReason to __Type introspection - Add includeDeprecated argument to __Schema.types and __Type.possibleTypes - Add objectDeprecation option to getIntrospectionQuery - Parse @deprecated on object types from SDL (extendSchema, buildClientSchema) - Print @deprecated on object types (printSchema) - Add schema validation: non-deprecated fields cannot return deprecated types - Add NoDeprecatedCustomRule: detect deprecated type usage in inline fragments and fragment definitions
447f232 to
a4aa83b
Compare
|
Rebased onto latest next and addressed the review feedback: Schema validation (validate.ts):
Query validation (NoDeprecatedCustomRule.ts):
All existing tests pass, new tests added for both validation rules Resolves graphql/graphql-wg#1353 |
See RFC