@@ -407,32 +407,23 @@ describe('Type System: Objects must have fields', () => {
407407 expect ( validateSchema ( schema ) ) . to . deep . equal ( [ ] ) ;
408408 } ) ;
409409
410- it ( 'rejects an Object type with missing fields' , ( ) => {
410+ it ( 'accepts an Object type with missing fields' , ( ) => {
411411 const schema = buildSchema ( `
412412 type Query {
413413 test: IncompleteObject
414414 }
415415
416416 type IncompleteObject
417417 ` ) ;
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 ( [ ] ) ;
424419
425420 const manualSchema = schemaWithFieldType (
426421 new GraphQLObjectType ( {
427422 name : 'IncompleteObject' ,
428423 fields : { } ,
429424 } ) ,
430425 ) ;
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 ( [ ] ) ;
436427
437428 const manualSchema2 = schemaWithFieldType (
438429 new GraphQLObjectType ( {
@@ -442,11 +433,7 @@ describe('Type System: Objects must have fields', () => {
442433 } ,
443434 } ) ,
444435 ) ;
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 ( [ ] ) ;
450437 } ) ;
451438
452439 it ( 'rejects an Object type with incorrectly named fields' , ( ) => {
@@ -707,7 +694,7 @@ describe('Type System: Input Objects must have fields', () => {
707694 expect ( validateSchema ( schema ) ) . to . deep . equal ( [ ] ) ;
708695 } ) ;
709696
710- it ( 'rejects an Input Object type with missing fields' , ( ) => {
697+ it ( 'accepts an Input Object type with missing fields' , ( ) => {
711698 let schema = buildSchema ( `
712699 type Query {
713700 field(arg: SomeInputObject): String
@@ -725,13 +712,7 @@ describe('Type System: Input Objects must have fields', () => {
725712 ` ) ,
726713 ) ;
727714
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 ( [ ] ) ;
735716 } ) ;
736717
737718 it ( 'accepts an Input Object with breakable circular reference' , ( ) => {
0 commit comments