@@ -92,6 +92,55 @@ Object {
92
92
}
93
93
` ;
94
94
95
+ exports [` should validate correctly - extensions field - object error - error 1` ] = `
96
+ Object {
97
+ " data" : Object {
98
+ " AddUserErrorObjectExtensions" : Object {
99
+ " error" : Object {
100
+ " details" : Array [
101
+ Object {
102
+ " errors" : Array [
103
+ " firstName must be at least 1 characters" ,
104
+ ],
105
+ " field" : " firstName" ,
106
+ },
107
+ Object {
108
+ " errors" : Array [
109
+ " lastName must be at least 1 characters" ,
110
+ ],
111
+ " field" : " lastName" ,
112
+ },
113
+ Object {
114
+ " errors" : Array [
115
+ " age must be greater than or equal to 18" ,
116
+ ],
117
+ " field" : " age" ,
118
+ },
119
+ ],
120
+ " message" : " 3 errors occurred" ,
121
+ },
122
+ " user" : null ,
123
+ },
124
+ },
125
+ }
126
+ ` ;
127
+
128
+ exports [` should validate correctly - extensions field - object error - pass 1` ] = `
129
+ Object {
130
+ " data" : Object {
131
+ " AddUserErrorObjectExtensions" : Object {
132
+ " error" : null ,
133
+ " user" : Object {
134
+ " age" : 18 ,
135
+ " firstName" : " Jon" ,
136
+ " id" : 3 ,
137
+ " lastName" : " Doe" ,
138
+ },
139
+ },
140
+ },
141
+ }
142
+ ` ;
143
+
95
144
exports [` should validate correctly - object error - error 1` ] = `
96
145
Object {
97
146
" data" : Object {
@@ -125,6 +174,39 @@ Object {
125
174
}
126
175
` ;
127
176
177
+ exports [` should validate correctly - object error - error 2` ] = `
178
+ Object {
179
+ " data" : Object {
180
+ " AddUserErrorObject" : Object {
181
+ " error" : Object {
182
+ " details" : Array [
183
+ Object {
184
+ " errors" : Array [
185
+ " firstName must be at least 1 characters" ,
186
+ ],
187
+ " field" : " firstName" ,
188
+ },
189
+ Object {
190
+ " errors" : Array [
191
+ " lastName must be at least 1 characters" ,
192
+ ],
193
+ " field" : " lastName" ,
194
+ },
195
+ Object {
196
+ " errors" : Array [
197
+ " age must be greater than or equal to 18" ,
198
+ ],
199
+ " field" : " age" ,
200
+ },
201
+ ],
202
+ " message" : " 3 errors occurred" ,
203
+ },
204
+ " user" : null ,
205
+ },
206
+ },
207
+ }
208
+ ` ;
209
+
128
210
exports [` should validate correctly - object error - pass 1` ] = `
129
211
Object {
130
212
" data" : Object {
@@ -141,6 +223,22 @@ Object {
141
223
}
142
224
` ;
143
225
226
+ exports [` should validate correctly - object error - pass 2` ] = `
227
+ Object {
228
+ " data" : Object {
229
+ " AddUserErrorObject" : Object {
230
+ " error" : null ,
231
+ " user" : Object {
232
+ " age" : 18 ,
233
+ " firstName" : " Jon" ,
234
+ " id" : 3 ,
235
+ " lastName" : " Doe" ,
236
+ },
237
+ },
238
+ },
239
+ }
240
+ ` ;
241
+
144
242
exports [` should validate correctly - string error - error 1` ] = `
145
243
Object {
146
244
" data" : Object {
0 commit comments