Skip to content

Commit 732c90f

Browse files
Test absence of name clash between type names and directives (#1440)
Split out from #1438
1 parent b101bf6 commit 732c90f

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/utilities/__tests__/buildASTSchema-test.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -969,6 +969,20 @@ describe('Failures', () => {
969969
);
970970
});
971971

972+
it('Does not consider directive names', () => {
973+
const body = dedent`
974+
schema {
975+
query: Foo
976+
}
977+
978+
directive @Foo on QUERY
979+
`;
980+
const doc = parse(body);
981+
expect(() => buildASTSchema(doc)).to.throw(
982+
'Specified query type "Foo" not found in document.',
983+
);
984+
});
985+
972986
it('Does not consider operation names', () => {
973987
const body = dedent`
974988
schema {

0 commit comments

Comments
 (0)