@@ -407,32 +407,23 @@ describe('Type System: Objects must have fields', () => {
407
407
expect ( validateSchema ( schema ) ) . to . deep . equal ( [ ] ) ;
408
408
} ) ;
409
409
410
- it ( 'rejects an Object type with missing fields' , ( ) => {
410
+ it ( 'accepts an Object type with missing fields' , ( ) => {
411
411
const schema = buildSchema ( `
412
412
type Query {
413
413
test: IncompleteObject
414
414
}
415
415
416
416
type IncompleteObject
417
417
` ) ;
418
- expect ( validateSchema ( schema ) ) . to . deep . equal ( [
419
- {
420
- message : 'Type IncompleteObject must define one or more fields.' ,
421
- locations : [ { line : 6 , column : 7 } ] ,
422
- } ,
423
- ] ) ;
418
+ expect ( validateSchema ( schema ) ) . to . deep . equal ( [ ] ) ;
424
419
425
420
const manualSchema = schemaWithFieldType (
426
421
new GraphQLObjectType ( {
427
422
name : 'IncompleteObject' ,
428
423
fields : { } ,
429
424
} ) ,
430
425
) ;
431
- expect ( validateSchema ( manualSchema ) ) . to . deep . equal ( [
432
- {
433
- message : 'Type IncompleteObject must define one or more fields.' ,
434
- } ,
435
- ] ) ;
426
+ expect ( validateSchema ( manualSchema ) ) . to . deep . equal ( [ ] ) ;
436
427
437
428
const manualSchema2 = schemaWithFieldType (
438
429
new GraphQLObjectType ( {
@@ -442,11 +433,7 @@ describe('Type System: Objects must have fields', () => {
442
433
} ,
443
434
} ) ,
444
435
) ;
445
- expect ( validateSchema ( manualSchema2 ) ) . to . deep . equal ( [
446
- {
447
- message : 'Type IncompleteObject must define one or more fields.' ,
448
- } ,
449
- ] ) ;
436
+ expect ( validateSchema ( manualSchema2 ) ) . to . deep . equal ( [ ] ) ;
450
437
} ) ;
451
438
452
439
it ( 'rejects an Object type with incorrectly named fields' , ( ) => {
@@ -707,7 +694,7 @@ describe('Type System: Input Objects must have fields', () => {
707
694
expect ( validateSchema ( schema ) ) . to . deep . equal ( [ ] ) ;
708
695
} ) ;
709
696
710
- it ( 'rejects an Input Object type with missing fields' , ( ) => {
697
+ it ( 'accepts an Input Object type with missing fields' , ( ) => {
711
698
let schema = buildSchema ( `
712
699
type Query {
713
700
field(arg: SomeInputObject): String
@@ -725,13 +712,7 @@ describe('Type System: Input Objects must have fields', () => {
725
712
` ) ,
726
713
) ;
727
714
728
- expect ( validateSchema ( schema ) ) . to . deep . equal ( [
729
- {
730
- message :
731
- 'Input Object type SomeInputObject must define one or more fields.' ,
732
- locations : [ { line : 6 , column : 7 } , { line : 4 , column : 9 } ] ,
733
- } ,
734
- ] ) ;
715
+ expect ( validateSchema ( schema ) ) . to . deep . equal ( [ ] ) ;
735
716
} ) ;
736
717
737
718
it ( 'accepts an Input Object with breakable circular reference' , ( ) => {
0 commit comments