Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/type/directives.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: {},
});
Expand Down
4 changes: 3 additions & 1 deletion src/utilities/__tests__/printSchema-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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

"""
Expand Down