diff --git a/src/type/__tests__/introspection-test.ts b/src/type/__tests__/introspection-test.ts index 803e346834..9cdfe70697 100644 --- a/src/type/__tests__/introspection-test.ts +++ b/src/type/__tests__/introspection-test.ts @@ -978,9 +978,13 @@ describe('Introspection', () => { defaultValue: '"No longer supported"', name: 'reason', type: { - kind: 'SCALAR', - name: 'String', - ofType: null, + kind: 'NON_NULL', + name: null, + ofType: { + kind: 'SCALAR', + name: 'String', + ofType: null, + }, }, }, ], diff --git a/src/type/directives.ts b/src/type/directives.ts index 23faa33717..16b8ce6c2b 100644 --- a/src/type/directives.ts +++ b/src/type/directives.ts @@ -223,7 +223,7 @@ export const GraphQLDeprecatedDirective: GraphQLDirective = ], args: { reason: { - type: GraphQLString, + type: new GraphQLNonNull(GraphQLString), description: 'Explains why this element was deprecated, usually also including a suggestion for how to access supported similar data. Formatted using the Markdown syntax, as specified by [CommonMark](https://commonmark.org/).', defaultValue: DEFAULT_DEPRECATION_REASON, diff --git a/src/utilities/__tests__/printSchema-test.ts b/src/utilities/__tests__/printSchema-test.ts index ac9002e388..0183436ec8 100644 --- a/src/utilities/__tests__/printSchema-test.ts +++ b/src/utilities/__tests__/printSchema-test.ts @@ -803,7 +803,7 @@ describe('Type System Printer', () => { """ Explains why this element was deprecated, usually also including a suggestion for how to access supported similar data. Formatted using the Markdown syntax, as specified by [CommonMark](https://commonmark.org/). """ - reason: String = "No longer supported" + reason: String! = "No longer supported" ) on FIELD_DEFINITION | ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION | ENUM_VALUE """Exposes a URL that specifies the behavior of this scalar."""