@@ -158,9 +158,9 @@ describe('extendSchema', () => {
158
158
expect ( printSchema ( testSchema ) ) . to . equal ( originalPrint ) ;
159
159
expect ( printSchema ( extendedSchema ) ) . to . equal (
160
160
`type Bar implements SomeInterface {
161
+ foo: Foo
161
162
name: String
162
163
some: SomeInterface
163
- foo: Foo
164
164
}
165
165
166
166
type Biz {
@@ -169,16 +169,16 @@ type Biz {
169
169
170
170
type Foo implements SomeInterface {
171
171
name: String
172
+ newField: String
172
173
some: SomeInterface
173
174
tree: [Foo]!
174
- newField: String
175
175
}
176
176
177
177
type Query {
178
178
foo: Foo
179
- someUnion: SomeUnion
180
179
someEnum: SomeEnum
181
180
someInterface(id: ID!): SomeInterface
181
+ someUnion: SomeUnion
182
182
}
183
183
184
184
enum SomeEnum {
@@ -251,9 +251,9 @@ union SomeUnion = Foo | Biz
251
251
expect ( printSchema ( testSchema ) ) . to . equal ( originalPrint ) ;
252
252
expect ( printSchema ( extendedSchema ) ) . to . equal (
253
253
`type Bar implements SomeInterface {
254
+ foo: Foo
254
255
name: String
255
256
some: SomeInterface
256
- foo: Foo
257
257
}
258
258
259
259
type Biz {
@@ -268,9 +268,9 @@ type Foo implements SomeInterface {
268
268
269
269
type Query {
270
270
foo: Foo
271
- someUnion: SomeUnion
272
271
someEnum: SomeEnum
273
272
someInterface(id: ID!): SomeInterface
273
+ someUnion: SomeUnion
274
274
}
275
275
276
276
enum SomeEnum {
@@ -309,9 +309,9 @@ type Unused {
309
309
expect ( printSchema ( testSchema ) ) . to . equal ( originalPrint ) ;
310
310
expect ( printSchema ( extendedSchema ) ) . to . equal (
311
311
`type Bar implements SomeInterface {
312
+ foo: Foo
312
313
name: String
313
314
some: SomeInterface
314
- foo: Foo
315
315
}
316
316
317
317
type Biz {
@@ -320,9 +320,9 @@ type Biz {
320
320
321
321
type Foo implements SomeInterface {
322
322
name: String
323
+ newField(arg1: String, arg2: NewInputObj!): String
323
324
some: SomeInterface
324
325
tree: [Foo]!
325
- newField(arg1: String, arg2: NewInputObj!): String
326
326
}
327
327
328
328
input NewInputObj {
@@ -333,9 +333,9 @@ input NewInputObj {
333
333
334
334
type Query {
335
335
foo: Foo
336
- someUnion: SomeUnion
337
336
someEnum: SomeEnum
338
337
someInterface(id: ID!): SomeInterface
338
+ someUnion: SomeUnion
339
339
}
340
340
341
341
enum SomeEnum {
@@ -364,9 +364,9 @@ union SomeUnion = Foo | Biz
364
364
expect ( printSchema ( testSchema ) ) . to . equal ( originalPrint ) ;
365
365
expect ( printSchema ( extendedSchema ) ) . to . equal (
366
366
`type Bar implements SomeInterface {
367
+ foo: Foo
367
368
name: String
368
369
some: SomeInterface
369
- foo: Foo
370
370
}
371
371
372
372
type Biz {
@@ -375,16 +375,16 @@ type Biz {
375
375
376
376
type Foo implements SomeInterface {
377
377
name: String
378
+ newField(arg1: SomeEnum!): SomeEnum
378
379
some: SomeInterface
379
380
tree: [Foo]!
380
- newField(arg1: SomeEnum!): SomeEnum
381
381
}
382
382
383
383
type Query {
384
384
foo: Foo
385
- someUnion: SomeUnion
386
385
someEnum: SomeEnum
387
386
someInterface(id: ID!): SomeInterface
387
+ someUnion: SomeUnion
388
388
}
389
389
390
390
enum SomeEnum {
@@ -414,9 +414,9 @@ union SomeUnion = Foo | Biz
414
414
expect ( printSchema ( testSchema ) ) . to . equal ( originalPrint ) ;
415
415
expect ( printSchema ( extendedSchema ) ) . to . equal (
416
416
`type Bar implements SomeInterface {
417
+ foo: Foo
417
418
name: String
418
419
some: SomeInterface
419
- foo: Foo
420
420
}
421
421
422
422
type Biz implements SomeInterface {
@@ -433,9 +433,9 @@ type Foo implements SomeInterface {
433
433
434
434
type Query {
435
435
foo: Foo
436
- someUnion: SomeUnion
437
436
someEnum: SomeEnum
438
437
someInterface(id: ID!): SomeInterface
438
+ someUnion: SomeUnion
439
439
}
440
440
441
441
enum SomeEnum {
@@ -490,9 +490,9 @@ union SomeUnion = Foo | Biz
490
490
expect ( printSchema ( testSchema ) ) . to . equal ( originalPrint ) ;
491
491
expect ( printSchema ( extendedSchema ) ) . to . equal (
492
492
`type Bar implements SomeInterface {
493
+ foo: Foo
493
494
name: String
494
495
some: SomeInterface
495
- foo: Foo
496
496
}
497
497
498
498
type Biz {
@@ -501,14 +501,14 @@ type Biz {
501
501
502
502
type Foo implements SomeInterface {
503
503
name: String
504
- some: SomeInterface
505
- tree: [Foo]!
506
- newObject: NewObject
504
+ newEnum: NewEnum
507
505
newInterface: NewInterface
508
- newUnion: NewUnion
506
+ newObject: NewObject
509
507
newScalar: NewScalar
510
- newEnum: NewEnum
511
508
newTree: [Foo]!
509
+ newUnion: NewUnion
510
+ some: SomeInterface
511
+ tree: [Foo]!
512
512
}
513
513
514
514
enum NewEnum {
@@ -534,9 +534,9 @@ union NewUnion = NewObject | NewOtherObject
534
534
535
535
type Query {
536
536
foo: Foo
537
- someUnion: SomeUnion
538
537
someEnum: SomeEnum
539
538
someInterface(id: ID!): SomeInterface
539
+ someUnion: SomeUnion
540
540
}
541
541
542
542
enum SomeEnum {
@@ -569,20 +569,20 @@ union SomeUnion = Foo | Biz
569
569
expect ( printSchema ( testSchema ) ) . to . equal ( originalPrint ) ;
570
570
expect ( printSchema ( extendedSchema ) ) . to . equal (
571
571
`type Bar implements SomeInterface {
572
+ foo: Foo
572
573
name: String
573
574
some: SomeInterface
574
- foo: Foo
575
575
}
576
576
577
577
type Biz {
578
578
fizz: String
579
579
}
580
580
581
581
type Foo implements SomeInterface, NewInterface {
582
+ baz: String
582
583
name: String
583
584
some: SomeInterface
584
585
tree: [Foo]!
585
- baz: String
586
586
}
587
587
588
588
interface NewInterface {
@@ -591,9 +591,9 @@ interface NewInterface {
591
591
592
592
type Query {
593
593
foo: Foo
594
- someUnion: SomeUnion
595
594
someEnum: SomeEnum
596
595
someInterface(id: ID!): SomeInterface
596
+ someUnion: SomeUnion
597
597
}
598
598
599
599
enum SomeEnum {
@@ -637,18 +637,18 @@ union SomeUnion = Foo | Biz
637
637
expect ( printSchema ( testSchema ) ) . to . equal ( originalPrint ) ;
638
638
expect ( printSchema ( extendedSchema ) ) . to . equal (
639
639
`type Bar implements SomeInterface {
640
+ foo: Foo
640
641
name: String
641
642
some: SomeInterface
642
- foo: Foo
643
643
}
644
644
645
645
type Biz implements NewInterface, SomeInterface {
646
- fizz: String
647
646
buzz: String
647
+ fizz: String
648
648
name: String
649
- some: SomeInterface
650
649
newFieldA: Int
651
650
newFieldB: Float
651
+ some: SomeInterface
652
652
}
653
653
654
654
type Foo implements SomeInterface {
@@ -663,9 +663,9 @@ interface NewInterface {
663
663
664
664
type Query {
665
665
foo: Foo
666
- someUnion: SomeUnion
667
666
someEnum: SomeEnum
668
667
someInterface(id: ID!): SomeInterface
668
+ someUnion: SomeUnion
669
669
}
670
670
671
671
enum SomeEnum {
@@ -728,13 +728,13 @@ union SomeUnion = Foo | Biz
728
728
}
729
729
730
730
type Query {
731
- queryField: String
732
731
newQueryField: Int
732
+ queryField: String
733
733
}
734
734
735
735
type Subscription {
736
- subscriptionField: String
737
736
newSubscriptionField: Int
737
+ subscriptionField: String
738
738
}
739
739
` ) ;
740
740
} ) ;
0 commit comments