diff --git a/src/type/directives.ts b/src/type/directives.ts index b29e9ae9c9..6881f20532 100644 --- a/src/type/directives.ts +++ b/src/type/directives.ts @@ -210,11 +210,12 @@ export const GraphQLSpecifiedByDirective: GraphQLDirective = }); /** - * Used to declare an Input Object as a OneOf Input Objects. + * Used to indicate an Input Object is a OneOf Input Object. */ export const GraphQLOneOfDirective: GraphQLDirective = new GraphQLDirective({ name: 'oneOf', - description: 'Indicates an Input Object is a OneOf Input Object.', + description: + 'Indicates exactly one field must be supplied and this field must not be `null`.', locations: [DirectiveLocation.INPUT_OBJECT], args: {}, }); diff --git a/src/utilities/__tests__/printSchema-test.ts b/src/utilities/__tests__/printSchema-test.ts index d077f8fc07..ab8c19163e 100644 --- a/src/utilities/__tests__/printSchema-test.ts +++ b/src/utilities/__tests__/printSchema-test.ts @@ -672,7 +672,9 @@ describe('Type System Printer', () => { url: String! ) on SCALAR - """Indicates an Input Object is a OneOf Input Object.""" + """ + Indicates exactly one field must be supplied and this field must not be \`null\`. + """ directive @oneOf on INPUT_OBJECT """