@@ -198,7 +198,7 @@ describe('Execute: Handles inputs', () => {
198198 errors : [
199199 {
200200 message :
201- 'Argument "input" has invalid value ["foo", "bar", "baz"].' ,
201+ 'Argument "input" has invalid value: Expected value of type "TestInputObject" to be an object, found ["foo", "bar", "baz"].' ,
202202 path : [ 'fieldWithObjectInput' ] ,
203203 locations : [ { line : 3 , column : 41 } ] ,
204204 } ,
@@ -368,7 +368,7 @@ describe('Execute: Handles inputs', () => {
368368 errors : [
369369 {
370370 message :
371- 'Variable "$input" got invalid value null at "input.c"; Expected non-nullable type "String!" not to be null.' ,
371+ 'Variable "$input" has invalid value at .c: Expected value of non-null type "String!" not to be null.' ,
372372 locations : [ { line : 2 , column : 16 } ] ,
373373 } ,
374374 ] ,
@@ -382,7 +382,7 @@ describe('Execute: Handles inputs', () => {
382382 errors : [
383383 {
384384 message :
385- 'Variable "$input" got invalid value "foo bar"; Expected type "TestInputObject" to be an object.' ,
385+ 'Variable "$input" has invalid value: Expected value of type "TestInputObject" to be an object, found "foo bar" .' ,
386386 locations : [ { line : 2 , column : 16 } ] ,
387387 } ,
388388 ] ,
@@ -396,7 +396,7 @@ describe('Execute: Handles inputs', () => {
396396 errors : [
397397 {
398398 message :
399- 'Variable "$input" got invalid value { a: "foo", b: "bar" }; Field "c" of required type "String!" was not provided. ' ,
399+ 'Variable "$input" has invalid value: Expected value of type "TestInputObject" to include required field "c", found { a: "foo", b: "bar" } ' ,
400400 locations : [ { line : 2 , column : 16 } ] ,
401401 } ,
402402 ] ,
@@ -415,12 +415,12 @@ describe('Execute: Handles inputs', () => {
415415 errors : [
416416 {
417417 message :
418- 'Variable "$input" got invalid value { a: "foo" } at "input.na"; Field "c" of required type "String!" was not provided. ' ,
418+ 'Variable "$input" has invalid value at .na: Expected value of type "TestInputObject" to include required field "c", found { a: "foo" } ' ,
419419 locations : [ { line : 2 , column : 18 } ] ,
420420 } ,
421421 {
422422 message :
423- 'Variable "$input" got invalid value { na: { a: "foo" } }; Field "nb" of required type "String!" was not provided. ' ,
423+ 'Variable "$input" has invalid value: Expected value of type "TestNestedInputObject" to include required field "nb", found { na: { a: "foo" } } ' ,
424424 locations : [ { line : 2 , column : 18 } ] ,
425425 } ,
426426 ] ,
@@ -437,7 +437,7 @@ describe('Execute: Handles inputs', () => {
437437 errors : [
438438 {
439439 message :
440- 'Variable "$input" got invalid value { a: "foo", b: "bar", c: "baz", extra: "dog" }; Field "extra" is not defined by type "TestInputObject". ' ,
440+ '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" }' ,
441441 locations : [ { line : 2 , column : 16 } ] ,
442442 } ,
443443 ] ,
@@ -612,7 +612,7 @@ describe('Execute: Handles inputs', () => {
612612 errors : [
613613 {
614614 message :
615- 'Variable "$value" of required type "String!" was not provided.' ,
615+ 'Variable "$value" has invalid value: Expected a value of non-null type "String!" to be provided.' ,
616616 locations : [ { line : 2 , column : 16 } ] ,
617617 } ,
618618 ] ,
@@ -631,7 +631,7 @@ describe('Execute: Handles inputs', () => {
631631 errors : [
632632 {
633633 message :
634- 'Variable "$value" of non-null type "String!" must not be null.' ,
634+ 'Variable "$value" has invalid value: Expected value of non-null type "String!" not to be null.' ,
635635 locations : [ { line : 2 , column : 16 } ] ,
636636 } ,
637637 ] ,
@@ -697,7 +697,7 @@ describe('Execute: Handles inputs', () => {
697697 errors : [
698698 {
699699 message :
700- 'Variable "$value" got invalid value [1, 2, 3]; String cannot represent a non string value: [1, 2, 3]' ,
700+ 'Variable "$value" has invalid value: String cannot represent a non string value: [1, 2, 3]' ,
701701 locations : [ { line : 2 , column : 16 } ] ,
702702 } ,
703703 ] ,
@@ -725,7 +725,7 @@ describe('Execute: Handles inputs', () => {
725725 errors : [
726726 {
727727 message :
728- 'Argument "input" of required type "String!" was provided the variable "$foo" which was not provided a runtime value.' ,
728+ 'Argument "input" has invalid value: Expected variable "$foo" provided to type "String!" to provide a runtime value.' ,
729729 locations : [ { line : 3 , column : 50 } ] ,
730730 path : [ 'fieldWithNonNullableStringInput' ] ,
731731 } ,
@@ -780,7 +780,7 @@ describe('Execute: Handles inputs', () => {
780780 errors : [
781781 {
782782 message :
783- 'Variable "$input" of non-null type "[String]!" must not be null.' ,
783+ 'Variable "$input" has invalid value: Expected value of non-null type "[String]!" not to be null.' ,
784784 locations : [ { line : 2 , column : 16 } ] ,
785785 } ,
786786 ] ,
@@ -843,7 +843,7 @@ describe('Execute: Handles inputs', () => {
843843 errors : [
844844 {
845845 message :
846- 'Variable "$input" got invalid value null at "input [1]"; Expected non-nullable type "String!" not to be null.' ,
846+ 'Variable "$input" has invalid value at [1]: Expected value of non-null type "String!" not to be null.' ,
847847 locations : [ { line : 2 , column : 16 } ] ,
848848 } ,
849849 ] ,
@@ -862,7 +862,7 @@ describe('Execute: Handles inputs', () => {
862862 errors : [
863863 {
864864 message :
865- 'Variable "$input" of non-null type "[String!]!" must not be null.' ,
865+ 'Variable "$input" has invalid value: Expected value of non-null type "[String!]!" not to be null.' ,
866866 locations : [ { line : 2 , column : 16 } ] ,
867867 } ,
868868 ] ,
@@ -892,7 +892,7 @@ describe('Execute: Handles inputs', () => {
892892 errors : [
893893 {
894894 message :
895- 'Variable "$input" got invalid value null at "input [1]"; Expected non-nullable type "String!" not to be null.' ,
895+ 'Variable "$input" has invalid value at [1]: Expected value of non-null type "String!" not to be null.' ,
896896 locations : [ { line : 2 , column : 16 } ] ,
897897 } ,
898898 ] ,
@@ -976,7 +976,8 @@ describe('Execute: Handles inputs', () => {
976976 } ,
977977 errors : [
978978 {
979- message : 'Argument "input" has invalid value WRONG_TYPE.' ,
979+ message :
980+ 'Argument "input" has invalid value: String cannot represent a non string value: WRONG_TYPE' ,
980981 locations : [ { line : 3 , column : 48 } ] ,
981982 path : [ 'fieldWithDefaultArgumentValue' ] ,
982983 } ,
@@ -1016,7 +1017,7 @@ describe('Execute: Handles inputs', () => {
10161017
10171018 function invalidValueError ( value : number , index : number ) {
10181019 return {
1019- message : `Variable "$input" got invalid value ${ value } at "input [${ index } ]"; String cannot represent a non string value: ${ value } ` ,
1020+ message : `Variable "$input" has invalid value at [${ index } ]: String cannot represent a non string value: ${ value } ` ,
10201021 locations : [ { line : 2 , column : 14 } ] ,
10211022 } ;
10221023 }
0 commit comments