-
Notifications
You must be signed in to change notification settings - Fork 1.5k
/
Copy patherror_test.yaml
121 lines (114 loc) · 3.11 KB
/
error_test.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
-
name: "Unknown root field"
gqlrequest: |
query {
getAuthorszzz(id: "0x1") { name }
}
gqlvariables:
{ }
errors:
[ { "message": "Cannot query field \"getAuthorszzz\" on type \"Query\". Did you mean
\"getAuthor\"?",
"locations": [ { "line": 2, "column": 3 } ] } ]
-
name: "Unknown field"
gqlrequest: |
query {
getAuthor(id: "0x1") { namezzz }
}
gqlvariables:
{ }
errors:
[ { "message": "Cannot query field \"namezzz\" on type \"Author\". Did you mean \"name\"?",
"locations": [ { "line": 2, "column": 26 } ] } ]
-
name: "Undefined variable"
gqlrequest: |
query {
getAuthor(id: $theID) { name }
}
gqlvariables:
{ }
errors:
[ { "message": "Variable \"$theID\" is not defined.",
"locations": [ { "line": 2, "column": 17 } ] } ]
-
name: "input of wrong type"
gqlrequest: |
query {
queryAuthor(filter: { reputation: { le: "hi there" } }) { name }
}
gqlvariables:
{ }
errors:
[ { "message": "Expected type Float, found \"hi there\".",
"locations": [ { "line": 2, "column": 44 } ] } ]
-
name: "unknown variable type"
gqlrequest: |
query queryAuthor($filter: AuthorFiltarzzz!) {
queryAuthor(filter: $filter) { name }
}
gqlvariables:
{ "filter": "type was wrong" }
errors:
[ { "message": "Variable type provided AuthorFiltarzzz! is incompatible with expected
type AuthorFilter",
"locations": [{ "line": 2, "column": 23}]},
{ "message": "Variable \"$filter\" of type \"AuthorFiltarzzz!\" used in position
expecting type \"AuthorFilter\".",
"locations": [ { "line": 2, "column": 23 } ] },
{ "message": "Unknown type \"AuthorFiltarzzz\".",
"locations": [ { "line": 1, "column": 1 } ] } ]
-
name: "variable of wrong type"
gqlrequest: |
query queryAuthor($filter: AuthorFilter!) {
queryAuthor(filter: $filter) { name }
}
gqlvariables:
{ "filter": 57 }
errors:
[ { "message": "must be defined",
"path": [ "variable", "filter"] } ]
-
name: "variable field of wrong type"
gqlrequest: |
query queryAuthor($filter: AuthorFilter!) {
queryAuthor(filter: $filter) { name }
}
gqlvariables:
{ "filter": { "reputation": { le: "hi there" } } }
errors:
[ { "message": "must be defined",
"path": [ "variable", "filter"] } ]
-
name: "subscription on type without @withSubscription directive should retur error"
gqlrequest: |
subscription {
getAuthor(id: "0x1") { name }
}
gqlvariables:
{ }
errors:
[ { "message": "Cannot query field \"getAuthor\" on type \"Subscription\".",
"locations": [ { "line": 2, "column": 3 } ] } ]
-
name: "Out of range error for int type"
gqlrequest: |
mutation {
addPost(input:[{title:"Dgraph",author:{name:"Bob"},numLikes:2147483648}]){
post{
title
numLikes
author{
name
}
}
}
}
gqlvariables:
{ }
errors:
[ { "message": "Out of range value '2147483648', for Variable type `Int`",
"locations": [ { "line": 2, "column": 63 } ] } ]