From e1e34f8f66f517766dd1a98a711f9a102f7ea2ae Mon Sep 17 00:00:00 2001 From: Trevor Scheer Date: Wed, 31 Jul 2024 13:50:57 -0700 Subject: [PATCH] prettier --- .../src/parser/__tests__/OnlineParser-test.ts | 24 ++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/packages/graphql-language-service/src/parser/__tests__/OnlineParser-test.ts b/packages/graphql-language-service/src/parser/__tests__/OnlineParser-test.ts index 29aefde41ff..a05d4cf9c7b 100644 --- a/packages/graphql-language-service/src/parser/__tests__/OnlineParser-test.ts +++ b/packages/graphql-language-service/src/parser/__tests__/OnlineParser-test.ts @@ -66,7 +66,7 @@ describe('onlineParser', () => { t.eol(); }); - + it('parses schema extension bare', () => { const { t } = getUtils(` extend schema @@ -110,6 +110,28 @@ describe('onlineParser', () => { t.eol(); }); + it('parses schema extension with directive applications without root operation definitions, followed by a type definition', () => { + const { t } = getUtils(` + extend schema @someDirective + + type A { field: String } + `); + + t.keyword('extend', { kind: 'ExtendDef' }); + t.keyword('schema', { kind: 'SchemaDef' }); + expectDirective({ t }, { name: 'someDirective' }); + + t.keyword('type', { kind: 'ObjectTypeDef' }); + t.name('A'); + t.punctuation('{'); + t.property('field', { kind: 'FieldDef' }); + t.punctuation(':'); + t.name('String', { kind: 'NamedType' }); + t.punctuation('}'); + + t.eol(); + }); + it('parses short query', () => { const { t } = getUtils(` {