diff --git a/src/type/directives.ts b/src/type/directives.ts index 63acf6056e..48e90c5531 100644 --- a/src/type/directives.ts +++ b/src/type/directives.ts @@ -248,11 +248,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 8940cafbe5..7f64ad349d 100644 --- a/src/utilities/__tests__/printSchema-test.ts +++ b/src/utilities/__tests__/printSchema-test.ts @@ -795,7 +795,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 """