Skip to content

Commit e5109b3

Browse files
committed
Add more rules to validate SDL
1 parent 602a538 commit e5109b3

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/type/__tests__/validation-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -713,7 +713,7 @@ describe('Type System: Input Objects must have fields', () => {
713713
schema = extendSchema(
714714
schema,
715715
parse(`
716-
directive @test on ENUM
716+
directive @test on INPUT_OBJECT
717717
718718
extend input SomeInputObject @test
719719
`),

src/validation/specifiedRules.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,4 +132,10 @@ import { LoneSchemaDefinition } from './rules/LoneSchemaDefinition';
132132

133133
export const specifiedSDLRules: Array<
134134
(context: SDLValidationContext) => ASTVisitor,
135-
> = [LoneSchemaDefinition, UniqueDirectivesPerLocation];
135+
> = [
136+
LoneSchemaDefinition,
137+
KnownDirectives,
138+
UniqueDirectivesPerLocation,
139+
UniqueArgumentNames,
140+
UniqueInputFieldNames,
141+
];

0 commit comments

Comments
 (0)