@@ -226,7 +226,7 @@ describe('Execute: Handles inputs', () => {
226
226
errors : [
227
227
{
228
228
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"].' ,
230
230
path : [ 'fieldWithObjectInput' ] ,
231
231
locations : [ { line : 3 , column : 41 } ] ,
232
232
} ,
@@ -262,9 +262,10 @@ describe('Execute: Handles inputs', () => {
262
262
errors : [
263
263
{
264
264
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 ' ,
266
266
path : [ 'fieldWithObjectInput' ] ,
267
267
locations : [ { line : 3 , column : 41 } ] ,
268
+ extensions : { code : 'FaultyScalarErrorExtensionCode' } ,
268
269
} ,
269
270
] ,
270
271
} ) ;
@@ -418,7 +419,7 @@ describe('Execute: Handles inputs', () => {
418
419
errors : [
419
420
{
420
421
message :
421
- 'Variable "$input" got invalid value "SerializedValue" at "input.e"; FaultyScalarErrorMessage' ,
422
+ 'Variable "$input" has invalid value at .e: FaultyScalarErrorMessage' ,
422
423
locations : [ { line : 2 , column : 16 } ] ,
423
424
extensions : { code : 'FaultyScalarErrorExtensionCode' } ,
424
425
} ,
@@ -434,7 +435,7 @@ describe('Execute: Handles inputs', () => {
434
435
errors : [
435
436
{
436
437
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.' ,
438
439
locations : [ { line : 2 , column : 16 } ] ,
439
440
} ,
440
441
] ,
@@ -448,7 +449,7 @@ describe('Execute: Handles inputs', () => {
448
449
errors : [
449
450
{
450
451
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" .' ,
452
453
locations : [ { line : 2 , column : 16 } ] ,
453
454
} ,
454
455
] ,
@@ -462,7 +463,7 @@ describe('Execute: Handles inputs', () => {
462
463
errors : [
463
464
{
464
465
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" } .' ,
466
467
locations : [ { line : 2 , column : 16 } ] ,
467
468
} ,
468
469
] ,
@@ -481,12 +482,12 @@ describe('Execute: Handles inputs', () => {
481
482
errors : [
482
483
{
483
484
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" } .' ,
485
486
locations : [ { line : 2 , column : 18 } ] ,
486
487
} ,
487
488
{
488
489
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" } } .' ,
490
491
locations : [ { line : 2 , column : 18 } ] ,
491
492
} ,
492
493
] ,
@@ -503,7 +504,7 @@ describe('Execute: Handles inputs', () => {
503
504
errors : [
504
505
{
505
506
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" }.' ,
507
508
locations : [ { line : 2 , column : 16 } ] ,
508
509
} ,
509
510
] ,
@@ -678,7 +679,7 @@ describe('Execute: Handles inputs', () => {
678
679
errors : [
679
680
{
680
681
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.' ,
682
683
locations : [ { line : 2 , column : 16 } ] ,
683
684
} ,
684
685
] ,
@@ -697,7 +698,7 @@ describe('Execute: Handles inputs', () => {
697
698
errors : [
698
699
{
699
700
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.' ,
701
702
locations : [ { line : 2 , column : 16 } ] ,
702
703
} ,
703
704
] ,
@@ -763,7 +764,7 @@ describe('Execute: Handles inputs', () => {
763
764
errors : [
764
765
{
765
766
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]' ,
767
768
locations : [ { line : 2 , column : 16 } ] ,
768
769
} ,
769
770
] ,
@@ -791,7 +792,7 @@ describe('Execute: Handles inputs', () => {
791
792
errors : [
792
793
{
793
794
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.' ,
795
796
locations : [ { line : 3 , column : 50 } ] ,
796
797
path : [ 'fieldWithNonNullableStringInput' ] ,
797
798
} ,
@@ -846,7 +847,7 @@ describe('Execute: Handles inputs', () => {
846
847
errors : [
847
848
{
848
849
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.' ,
850
851
locations : [ { line : 2 , column : 16 } ] ,
851
852
} ,
852
853
] ,
@@ -909,7 +910,7 @@ describe('Execute: Handles inputs', () => {
909
910
errors : [
910
911
{
911
912
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.' ,
913
914
locations : [ { line : 2 , column : 16 } ] ,
914
915
} ,
915
916
] ,
@@ -928,7 +929,7 @@ describe('Execute: Handles inputs', () => {
928
929
errors : [
929
930
{
930
931
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.' ,
932
933
locations : [ { line : 2 , column : 16 } ] ,
933
934
} ,
934
935
] ,
@@ -958,7 +959,7 @@ describe('Execute: Handles inputs', () => {
958
959
errors : [
959
960
{
960
961
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.' ,
962
963
locations : [ { line : 2 , column : 16 } ] ,
963
964
} ,
964
965
] ,
@@ -1043,7 +1044,7 @@ describe('Execute: Handles inputs', () => {
1043
1044
errors : [
1044
1045
{
1045
1046
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' ,
1047
1048
locations : [ { line : 3 , column : 48 } ] ,
1048
1049
path : [ 'fieldWithDefaultArgumentValue' ] ,
1049
1050
} ,
@@ -1083,7 +1084,7 @@ describe('Execute: Handles inputs', () => {
1083
1084
1084
1085
function invalidValueError ( value : number , index : number ) {
1085
1086
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 } ` ,
1087
1088
locations : [ { line : 2 , column : 14 } ] ,
1088
1089
} ;
1089
1090
}
0 commit comments