|
25 | 25 | assert_equal(6, errors.length)
|
26 | 26 |
|
27 | 27 | query_root_error = {
|
28 |
| - "message"=>"Argument 'id' on Field 'cheese' has an invalid value", |
| 28 | + "message"=>"Argument 'id' on Field 'cheese' has an invalid value. Expected type 'Int!'.", |
29 | 29 | "locations"=>[{"line"=>3, "column"=>7}],
|
30 | 30 | "path"=>["query getCheese", "cheese", "id"],
|
31 | 31 | }
|
32 | 32 | assert_includes(errors, query_root_error)
|
33 | 33 |
|
34 | 34 | directive_error = {
|
35 |
| - "message"=>"Argument 'if' on Directive 'skip' has an invalid value", |
| 35 | + "message"=>"Argument 'if' on Directive 'skip' has an invalid value. Expected type 'Boolean!'.", |
36 | 36 | "locations"=>[{"line"=>4, "column"=>30}],
|
37 | 37 | "path"=>["query getCheese", "cheese", "source", "if"],
|
38 | 38 | }
|
39 | 39 | assert_includes(errors, directive_error)
|
40 | 40 |
|
41 | 41 | input_object_error = {
|
42 |
| - "message"=>"Argument 'product' on Field 'badSource' has an invalid value", |
| 42 | + "message"=>"Argument 'product' on Field 'badSource' has an invalid value. Expected type '[DairyProductInput]'.", |
43 | 43 | "locations"=>[{"line"=>6, "column"=>7}],
|
44 | 44 | "path"=>["query getCheese", "badSource", "product"],
|
45 | 45 | }
|
46 | 46 | assert_includes(errors, input_object_error)
|
47 | 47 |
|
48 | 48 | input_object_field_error = {
|
49 |
| - "message"=>"Argument 'source' on InputObject 'DairyProductInput' has an invalid value", |
| 49 | + "message"=>"Argument 'source' on InputObject 'DairyProductInput' has an invalid value. Expected type 'DairyAnimal!'.", |
50 | 50 | "locations"=>[{"line"=>6, "column"=>40}],
|
51 | 51 | "path"=>["query getCheese", "badSource", "product", "source"],
|
52 | 52 | }
|
53 | 53 | assert_includes(errors, input_object_field_error)
|
54 | 54 |
|
55 | 55 | missing_required_field_error = {
|
56 |
| - "message"=>"Argument 'product' on Field 'missingSource' has an invalid value", |
| 56 | + "message"=>"Argument 'product' on Field 'missingSource' has an invalid value. Expected type '[DairyProductInput]'.", |
57 | 57 | "locations"=>[{"line"=>7, "column"=>7}],
|
58 | 58 | "path"=>["query getCheese", "missingSource", "product"],
|
59 | 59 | }
|
60 | 60 | assert_includes(errors, missing_required_field_error)
|
61 | 61 |
|
62 | 62 | fragment_error = {
|
63 |
| - "message"=>"Argument 'source' on Field 'similarCheese' has an invalid value", |
| 63 | + "message"=>"Argument 'source' on Field 'similarCheese' has an invalid value. Expected type '[DairyAnimal!]!'.", |
64 | 64 | "locations"=>[{"line"=>13, "column"=>7}],
|
65 | 65 | "path"=>["fragment cheeseFields", "similarCheese", "source"],
|
66 | 66 | }
|
|
0 commit comments