@@ -203,6 +203,38 @@ extend type Hello {
203
203
expect ( printJson ( doc ) ) . to . equal ( printJson ( expected ) ) ;
204
204
} ) ;
205
205
206
+ it ( 'Extension without fields followed by extension' , ( ) => {
207
+ const body = `
208
+ extend type Hello implements Greeting
209
+
210
+ extend type Hello implements SecondGreeting
211
+ ` ;
212
+ const doc = parse ( body ) ;
213
+ const expected = {
214
+ kind : 'Document' ,
215
+ definitions : [
216
+ {
217
+ kind : 'ObjectTypeExtension' ,
218
+ name : nameNode ( 'Hello' , { start : 19 , end : 24 } ) ,
219
+ interfaces : [ typeNode ( 'Greeting' , { start : 36 , end : 44 } ) ] ,
220
+ directives : [ ] ,
221
+ fields : [ ] ,
222
+ loc : { start : 7 , end : 44 } ,
223
+ } ,
224
+ {
225
+ kind : 'ObjectTypeExtension' ,
226
+ name : nameNode ( 'Hello' , { start : 64 , end : 69 } ) ,
227
+ interfaces : [ typeNode ( 'SecondGreeting' , { start : 81 , end : 95 } ) ] ,
228
+ directives : [ ] ,
229
+ fields : [ ] ,
230
+ loc : { start : 52 , end : 95 } ,
231
+ } ,
232
+ ] ,
233
+ loc : { start : 0 , end : 100 } ,
234
+ } ;
235
+ expect ( printJson ( doc ) ) . to . equal ( printJson ( expected ) ) ;
236
+ } ) ;
237
+
206
238
it ( 'Extension without anything throws' , ( ) => {
207
239
expectSyntaxError ( 'extend type Hello' , 'Unexpected <EOF>' , {
208
240
line : 1 ,
0 commit comments