@@ -226,7 +226,7 @@ describe('Execute: Handles inputs', () => {
226226 errors : [
227227 {
228228 message :
229- 'Argument TestType.fieldWithObjectInput(input:) of type TestInputObject has invalid value ["foo", "bar", "baz"].' ,
229+ 'Argument TestType.fieldWithObjectInput(input:) has invalid value: Expected value of type TestInputObject to be an object, found: ["foo", "bar", "baz"].' ,
230230 path : [ 'fieldWithObjectInput' ] ,
231231 locations : [ { line : 3 , column : 41 } ] ,
232232 } ,
@@ -262,9 +262,10 @@ describe('Execute: Handles inputs', () => {
262262 errors : [
263263 {
264264 message :
265- 'Argument TestType.fieldWithObjectInput(input:) of type TestInputObject has invalid value { c: "foo", e: "bar" }. ' ,
265+ 'Argument TestType.fieldWithObjectInput(input:) has invalid value at . e: FaultyScalarErrorMessage ' ,
266266 path : [ 'fieldWithObjectInput' ] ,
267267 locations : [ { line : 3 , column : 41 } ] ,
268+ extensions : { code : 'FaultyScalarErrorExtensionCode' } ,
268269 } ,
269270 ] ,
270271 } ) ;
@@ -418,7 +419,7 @@ describe('Execute: Handles inputs', () => {
418419 errors : [
419420 {
420421 message :
421- 'Variable "$input" got invalid value "SerializedValue" at "input.e"; FaultyScalarErrorMessage' ,
422+ 'Variable "$input" has invalid value at .e: FaultyScalarErrorMessage' ,
422423 locations : [ { line : 2 , column : 16 } ] ,
423424 extensions : { code : 'FaultyScalarErrorExtensionCode' } ,
424425 } ,
@@ -434,7 +435,7 @@ describe('Execute: Handles inputs', () => {
434435 errors : [
435436 {
436437 message :
437- 'Variable "$input" got invalid value null at "input.c"; Expected non-nullable type " String!" not to be null.' ,
438+ 'Variable "$input" has invalid value at .c: Expected value of non-null type String! not to be null.' ,
438439 locations : [ { line : 2 , column : 16 } ] ,
439440 } ,
440441 ] ,
@@ -448,7 +449,7 @@ describe('Execute: Handles inputs', () => {
448449 errors : [
449450 {
450451 message :
451- 'Variable "$input" got invalid value "foo bar"; Expected type " TestInputObject" to be an object.' ,
452+ 'Variable "$input" has invalid value: Expected value of type TestInputObject to be an object, found: "foo bar" .' ,
452453 locations : [ { line : 2 , column : 16 } ] ,
453454 } ,
454455 ] ,
@@ -462,7 +463,7 @@ describe('Execute: Handles inputs', () => {
462463 errors : [
463464 {
464465 message :
465- 'Variable "$input" got invalid value { a: "foo", b: "bar" }; Field "c" of required type "String!" was not provided .' ,
466+ 'Variable "$input" has invalid value: Expected value of type TestInputObject to include required field "c", found: { a: "foo", b: "bar" } .' ,
466467 locations : [ { line : 2 , column : 16 } ] ,
467468 } ,
468469 ] ,
@@ -481,12 +482,12 @@ describe('Execute: Handles inputs', () => {
481482 errors : [
482483 {
483484 message :
484- 'Variable "$input" got invalid value { a: "foo" } at "input.na"; Field "c" of required type "String!" was not provided .' ,
485+ 'Variable "$input" has invalid value at .na: Expected value of type TestInputObject to include required field "c", found: { a: "foo" } .' ,
485486 locations : [ { line : 2 , column : 18 } ] ,
486487 } ,
487488 {
488489 message :
489- 'Variable "$input" got invalid value { na: { a: "foo" } }; Field "nb" of required type "String!" was not provided .' ,
490+ 'Variable "$input" has invalid value: Expected value of type TestNestedInputObject to include required field "nb", found: { na: { a: "foo" } } .' ,
490491 locations : [ { line : 2 , column : 18 } ] ,
491492 } ,
492493 ] ,
@@ -503,7 +504,7 @@ describe('Execute: Handles inputs', () => {
503504 errors : [
504505 {
505506 message :
506- 'Variable "$input" got invalid value { a: "foo", b: "bar", c: "baz", extra: "dog" }; Field "extra" is not defined by type "TestInputObject" .' ,
507+ 'Variable "$input" has invalid value: Expected value of type TestInputObject not to include unknown field "extra", found: { a: "foo", b: "bar", c: "baz", extra: "dog" }.' ,
507508 locations : [ { line : 2 , column : 16 } ] ,
508509 } ,
509510 ] ,
@@ -678,7 +679,7 @@ describe('Execute: Handles inputs', () => {
678679 errors : [
679680 {
680681 message :
681- 'Variable "$value" of required type String! was not provided.' ,
682+ 'Variable "$value" has invalid value: Expected a value of non-null type String! to be provided.' ,
682683 locations : [ { line : 2 , column : 16 } ] ,
683684 } ,
684685 ] ,
@@ -697,7 +698,7 @@ describe('Execute: Handles inputs', () => {
697698 errors : [
698699 {
699700 message :
700- 'Variable "$value" of non-null type String! must not be null.' ,
701+ 'Variable "$value" has invalid value: Expected value of non-null type String! not to be null.' ,
701702 locations : [ { line : 2 , column : 16 } ] ,
702703 } ,
703704 ] ,
@@ -763,7 +764,7 @@ describe('Execute: Handles inputs', () => {
763764 errors : [
764765 {
765766 message :
766- 'Variable "$value" got invalid value [1, 2, 3]; String cannot represent a non string value: [1, 2, 3]' ,
767+ 'Variable "$value" has invalid value: String cannot represent a non string value: [1, 2, 3]' ,
767768 locations : [ { line : 2 , column : 16 } ] ,
768769 } ,
769770 ] ,
@@ -791,7 +792,7 @@ describe('Execute: Handles inputs', () => {
791792 errors : [
792793 {
793794 message :
794- 'Argument TestType.fieldWithNonNullableStringInput(input:) of required type String! was provided the variable "$foo" which was not provided a runtime value.' ,
795+ 'Argument TestType.fieldWithNonNullableStringInput(input:) has invalid value: Expected variable "$foo" provided to type String! to provide a runtime value.' ,
795796 locations : [ { line : 3 , column : 50 } ] ,
796797 path : [ 'fieldWithNonNullableStringInput' ] ,
797798 } ,
@@ -846,7 +847,7 @@ describe('Execute: Handles inputs', () => {
846847 errors : [
847848 {
848849 message :
849- 'Variable "$input" of non-null type [String]! must not be null.' ,
850+ 'Variable "$input" has invalid value: Expected value of non-null type [String]! not to be null.' ,
850851 locations : [ { line : 2 , column : 16 } ] ,
851852 } ,
852853 ] ,
@@ -909,7 +910,7 @@ describe('Execute: Handles inputs', () => {
909910 errors : [
910911 {
911912 message :
912- 'Variable "$input" got invalid value null at "input [1]"; Expected non-nullable type " String!" not to be null.' ,
913+ 'Variable "$input" has invalid value at [1]: Expected value of non-null type String! not to be null.' ,
913914 locations : [ { line : 2 , column : 16 } ] ,
914915 } ,
915916 ] ,
@@ -928,7 +929,7 @@ describe('Execute: Handles inputs', () => {
928929 errors : [
929930 {
930931 message :
931- 'Variable "$input" of non-null type [String!]! must not be null.' ,
932+ 'Variable "$input" has invalid value: Expected value of non-null type [String!]! not to be null.' ,
932933 locations : [ { line : 2 , column : 16 } ] ,
933934 } ,
934935 ] ,
@@ -958,7 +959,7 @@ describe('Execute: Handles inputs', () => {
958959 errors : [
959960 {
960961 message :
961- 'Variable "$input" got invalid value null at "input [1]"; Expected non-nullable type " String!" not to be null.' ,
962+ 'Variable "$input" has invalid value at [1]: Expected value of non-null type String! not to be null.' ,
962963 locations : [ { line : 2 , column : 16 } ] ,
963964 } ,
964965 ] ,
@@ -1043,7 +1044,7 @@ describe('Execute: Handles inputs', () => {
10431044 errors : [
10441045 {
10451046 message :
1046- 'Argument TestType.fieldWithDefaultArgumentValue(input:) of type String has invalid value WRONG_TYPE. ' ,
1047+ 'Argument TestType.fieldWithDefaultArgumentValue(input:) has invalid value: String cannot represent a non string value: WRONG_TYPE' ,
10471048 locations : [ { line : 3 , column : 48 } ] ,
10481049 path : [ 'fieldWithDefaultArgumentValue' ] ,
10491050 } ,
@@ -1083,7 +1084,7 @@ describe('Execute: Handles inputs', () => {
10831084
10841085 function invalidValueError ( value : number , index : number ) {
10851086 return {
1086- message : `Variable "$input" got invalid value ${ value } at "input [${ index } ]"; String cannot represent a non string value: ${ value } ` ,
1087+ message : `Variable "$input" has invalid value at [${ index } ]: String cannot represent a non string value: ${ value } ` ,
10871088 locations : [ { line : 2 , column : 14 } ] ,
10881089 } ;
10891090 }
0 commit comments