File tree 1 file changed +23
-1
lines changed
packages/graphql-language-service/src/parser/__tests__
1 file changed +23
-1
lines changed Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ describe('onlineParser', () => {
66
66
67
67
t . eol ( ) ;
68
68
} ) ;
69
-
69
+
70
70
it ( 'parses schema extension bare' , ( ) => {
71
71
const { t } = getUtils ( `
72
72
extend schema
@@ -110,6 +110,28 @@ describe('onlineParser', () => {
110
110
t . eol ( ) ;
111
111
} ) ;
112
112
113
+ it ( 'parses schema extension with directive applications without root operation definitions, followed by a type definition' , ( ) => {
114
+ const { t } = getUtils ( `
115
+ extend schema @someDirective
116
+
117
+ type A { field: String }
118
+ ` ) ;
119
+
120
+ t . keyword ( 'extend' , { kind : 'ExtendDef' } ) ;
121
+ t . keyword ( 'schema' , { kind : 'SchemaDef' } ) ;
122
+ expectDirective ( { t } , { name : 'someDirective' } ) ;
123
+
124
+ t . keyword ( 'type' , { kind : 'ObjectTypeDef' } ) ;
125
+ t . name ( 'A' ) ;
126
+ t . punctuation ( '{' ) ;
127
+ t . property ( 'field' , { kind : 'FieldDef' } ) ;
128
+ t . punctuation ( ':' ) ;
129
+ t . name ( 'String' , { kind : 'NamedType' } ) ;
130
+ t . punctuation ( '}' ) ;
131
+
132
+ t . eol ( ) ;
133
+ } ) ;
134
+
113
135
it ( 'parses short query' , ( ) => {
114
136
const { t } = getUtils ( `
115
137
{
You can’t perform that action at this time.
0 commit comments