1
2
3 package followschema
4
5 import (
6 "context"
7 "errors"
8 "fmt"
9 "io"
10 "strconv"
11 "sync"
12 "sync/atomic"
13 "time"
14
15 introspection1 "github.com/99designs/gqlgen/codegen/testserver/followschema/introspection"
16 invalid_packagename "github.com/99designs/gqlgen/codegen/testserver/followschema/invalid-packagename"
17 "github.com/99designs/gqlgen/codegen/testserver/followschema/otherpkg"
18 "github.com/99designs/gqlgen/graphql"
19 "github.com/99designs/gqlgen/graphql/introspection"
20 "github.com/vektah/gqlparser/v2/ast"
21 )
22
23
24
25 type ForcedResolverResolver interface {
26 Field(ctx context.Context, obj *ForcedResolver) (*Circle, error)
27 }
28 type ModelMethodsResolver interface {
29 ResolverField(ctx context.Context, obj *ModelMethods) (bool, error)
30 }
31 type PetResolver interface {
32 Friends(ctx context.Context, obj *Pet, limit *int) ([]*Pet, error)
33 }
34 type QueryResolver interface {
35 InvalidIdentifier(ctx context.Context) (*invalid_packagename.InvalidIdentifier, error)
36 Collision(ctx context.Context) (*introspection1.It, error)
37 MapInput(ctx context.Context, input map[string]interface{}) (*bool, error)
38 Recursive(ctx context.Context, input *RecursiveInputSlice) (*bool, error)
39 NestedInputs(ctx context.Context, input [][]*OuterInput) (*bool, error)
40 NestedOutputs(ctx context.Context) ([][]*OuterObject, error)
41 ModelMethods(ctx context.Context) (*ModelMethods, error)
42 User(ctx context.Context, id int) (*User, error)
43 NullableArg(ctx context.Context, arg *int) (*string, error)
44 InputSlice(ctx context.Context, arg []string) (bool, error)
45 InputNullableSlice(ctx context.Context, arg []string) (bool, error)
46 InputOmittable(ctx context.Context, arg OmittableInput) (string, error)
47 ShapeUnion(ctx context.Context) (ShapeUnion, error)
48 Autobind(ctx context.Context) (*Autobind, error)
49 DeprecatedField(ctx context.Context) (string, error)
50 Overlapping(ctx context.Context) (*OverlappingFields, error)
51 DefaultParameters(ctx context.Context, falsyBoolean *bool, truthyBoolean *bool) (*DefaultParametersMirror, error)
52 DeferCase1(ctx context.Context) (*DeferModel, error)
53 DeferCase2(ctx context.Context) ([]*DeferModel, error)
54 DirectiveArg(ctx context.Context, arg string) (*string, error)
55 DirectiveNullableArg(ctx context.Context, arg *int, arg2 *int, arg3 *string) (*string, error)
56 DirectiveInputNullable(ctx context.Context, arg *InputDirectives) (*string, error)
57 DirectiveInput(ctx context.Context, arg InputDirectives) (*string, error)
58 DirectiveInputType(ctx context.Context, arg InnerInput) (*string, error)
59 DirectiveObject(ctx context.Context) (*ObjectDirectives, error)
60 DirectiveObjectWithCustomGoModel(ctx context.Context) (*ObjectDirectivesWithCustomGoModel, error)
61 DirectiveFieldDef(ctx context.Context, ret string) (string, error)
62 DirectiveField(ctx context.Context) (*string, error)
63 DirectiveDouble(ctx context.Context) (*string, error)
64 DirectiveUnimplemented(ctx context.Context) (*string, error)
65 EmbeddedCase1(ctx context.Context) (*EmbeddedCase1, error)
66 EmbeddedCase2(ctx context.Context) (*EmbeddedCase2, error)
67 EmbeddedCase3(ctx context.Context) (*EmbeddedCase3, error)
68 EnumInInput(ctx context.Context, input *InputWithEnumValue) (EnumTest, error)
69 Shapes(ctx context.Context) ([]Shape, error)
70 NoShape(ctx context.Context) (Shape, error)
71 Node(ctx context.Context) (Node, error)
72 NoShapeTypedNil(ctx context.Context) (Shape, error)
73 Animal(ctx context.Context) (Animal, error)
74 NotAnInterface(ctx context.Context) (BackedByInterface, error)
75 Dog(ctx context.Context) (*Dog, error)
76 Issue896a(ctx context.Context) ([]*CheckIssue896, error)
77 MapStringInterface(ctx context.Context, in map[string]interface{}) (map[string]interface{}, error)
78 MapNestedStringInterface(ctx context.Context, in *NestedMapInput) (map[string]interface{}, error)
79 ErrorBubble(ctx context.Context) (*Error, error)
80 ErrorBubbleList(ctx context.Context) ([]*Error, error)
81 ErrorList(ctx context.Context) ([]*Error, error)
82 Errors(ctx context.Context) (*Errors, error)
83 Valid(ctx context.Context) (string, error)
84 Invalid(ctx context.Context) (string, error)
85 Panics(ctx context.Context) (*Panics, error)
86 PrimitiveObject(ctx context.Context) ([]Primitive, error)
87 PrimitiveStringObject(ctx context.Context) ([]PrimitiveString, error)
88 PtrToAnyContainer(ctx context.Context) (*PtrToAnyContainer, error)
89 PtrToSliceContainer(ctx context.Context) (*PtrToSliceContainer, error)
90 Infinity(ctx context.Context) (float64, error)
91 StringFromContextInterface(ctx context.Context) (*StringFromContextInterface, error)
92 StringFromContextFunction(ctx context.Context) (string, error)
93 DefaultScalar(ctx context.Context, arg string) (string, error)
94 Slices(ctx context.Context) (*Slices, error)
95 ScalarSlice(ctx context.Context) ([]byte, error)
96 Fallback(ctx context.Context, arg FallbackToStringEncoding) (FallbackToStringEncoding, error)
97 OptionalUnion(ctx context.Context) (TestUnion, error)
98 VOkCaseValue(ctx context.Context) (*VOkCaseValue, error)
99 VOkCaseNil(ctx context.Context) (*VOkCaseNil, error)
100 ValidType(ctx context.Context) (*ValidType, error)
101 VariadicModel(ctx context.Context) (*VariadicModel, error)
102 WrappedStruct(ctx context.Context) (*WrappedStruct, error)
103 WrappedScalar(ctx context.Context) (otherpkg.Scalar, error)
104 WrappedMap(ctx context.Context) (WrappedMap, error)
105 WrappedSlice(ctx context.Context) (WrappedSlice, error)
106 }
107 type SubscriptionResolver interface {
108 Updated(ctx context.Context) (<-chan string, error)
109 InitPayload(ctx context.Context) (<-chan string, error)
110 DirectiveArg(ctx context.Context, arg string) (<-chan *string, error)
111 DirectiveNullableArg(ctx context.Context, arg *int, arg2 *int, arg3 *string) (<-chan *string, error)
112 DirectiveDouble(ctx context.Context) (<-chan *string, error)
113 DirectiveUnimplemented(ctx context.Context) (<-chan *string, error)
114 Issue896b(ctx context.Context) (<-chan []*CheckIssue896, error)
115 ErrorRequired(ctx context.Context) (<-chan *Error, error)
116 }
117 type UserResolver interface {
118 Friends(ctx context.Context, obj *User) ([]*User, error)
119
120 Pets(ctx context.Context, obj *User, limit *int) ([]*Pet, error)
121 }
122
123
124
125
126
127 func (ec *executionContext) dir_defer_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
128 var err error
129 args := map[string]interface{}{}
130 var arg0 *bool
131 if tmp, ok := rawArgs["if"]; ok {
132 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("if"))
133 arg0, err = ec.unmarshalOBoolean2ᚖbool(ctx, tmp)
134 if err != nil {
135 return nil, err
136 }
137 }
138 args["if"] = arg0
139 var arg1 *string
140 if tmp, ok := rawArgs["label"]; ok {
141 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("label"))
142 arg1, err = ec.unmarshalOString2ᚖstring(ctx, tmp)
143 if err != nil {
144 return nil, err
145 }
146 }
147 args["label"] = arg1
148 return args, nil
149 }
150
151 func (ec *executionContext) field_Pet_friends_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
152 var err error
153 args := map[string]interface{}{}
154 var arg0 *int
155 if tmp, ok := rawArgs["limit"]; ok {
156 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("limit"))
157 arg0, err = ec.unmarshalOInt2ᚖint(ctx, tmp)
158 if err != nil {
159 return nil, err
160 }
161 }
162 args["limit"] = arg0
163 return args, nil
164 }
165
166 func (ec *executionContext) field_Query___type_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
167 var err error
168 args := map[string]interface{}{}
169 var arg0 string
170 if tmp, ok := rawArgs["name"]; ok {
171 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name"))
172 arg0, err = ec.unmarshalNString2string(ctx, tmp)
173 if err != nil {
174 return nil, err
175 }
176 }
177 args["name"] = arg0
178 return args, nil
179 }
180
181 func (ec *executionContext) field_Query_defaultParameters_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
182 var err error
183 args := map[string]interface{}{}
184 var arg0 *bool
185 if tmp, ok := rawArgs["falsyBoolean"]; ok {
186 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("falsyBoolean"))
187 arg0, err = ec.unmarshalOBoolean2ᚖbool(ctx, tmp)
188 if err != nil {
189 return nil, err
190 }
191 }
192 args["falsyBoolean"] = arg0
193 var arg1 *bool
194 if tmp, ok := rawArgs["truthyBoolean"]; ok {
195 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("truthyBoolean"))
196 arg1, err = ec.unmarshalOBoolean2ᚖbool(ctx, tmp)
197 if err != nil {
198 return nil, err
199 }
200 }
201 args["truthyBoolean"] = arg1
202 return args, nil
203 }
204
205 func (ec *executionContext) field_Query_defaultScalar_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
206 var err error
207 args := map[string]interface{}{}
208 var arg0 string
209 if tmp, ok := rawArgs["arg"]; ok {
210 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("arg"))
211 arg0, err = ec.unmarshalNDefaultScalarImplementation2string(ctx, tmp)
212 if err != nil {
213 return nil, err
214 }
215 }
216 args["arg"] = arg0
217 return args, nil
218 }
219
220 func (ec *executionContext) field_Query_directiveArg_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
221 var err error
222 args := map[string]interface{}{}
223 var arg0 string
224 if tmp, ok := rawArgs["arg"]; ok {
225 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("arg"))
226 directive0 := func(ctx context.Context) (interface{}, error) { return ec.unmarshalNString2string(ctx, tmp) }
227 directive1 := func(ctx context.Context) (interface{}, error) {
228 min, err := ec.unmarshalNInt2int(ctx, 1)
229 if err != nil {
230 return nil, err
231 }
232 max, err := ec.unmarshalOInt2ᚖint(ctx, 255)
233 if err != nil {
234 return nil, err
235 }
236 message, err := ec.unmarshalOString2ᚖstring(ctx, "invalid length")
237 if err != nil {
238 return nil, err
239 }
240 if ec.directives.Length == nil {
241 return nil, errors.New("directive length is not implemented")
242 }
243 return ec.directives.Length(ctx, rawArgs, directive0, min, max, message)
244 }
245
246 tmp, err = directive1(ctx)
247 if err != nil {
248 return nil, graphql.ErrorOnPath(ctx, err)
249 }
250 if data, ok := tmp.(string); ok {
251 arg0 = data
252 } else {
253 return nil, graphql.ErrorOnPath(ctx, fmt.Errorf(`unexpected type %T from directive, should be string`, tmp))
254 }
255 }
256 args["arg"] = arg0
257 return args, nil
258 }
259
260 func (ec *executionContext) field_Query_directiveFieldDef_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
261 var err error
262 args := map[string]interface{}{}
263 var arg0 string
264 if tmp, ok := rawArgs["ret"]; ok {
265 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("ret"))
266 arg0, err = ec.unmarshalNString2string(ctx, tmp)
267 if err != nil {
268 return nil, err
269 }
270 }
271 args["ret"] = arg0
272 return args, nil
273 }
274
275 func (ec *executionContext) field_Query_directiveInputNullable_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
276 var err error
277 args := map[string]interface{}{}
278 var arg0 *InputDirectives
279 if tmp, ok := rawArgs["arg"]; ok {
280 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("arg"))
281 arg0, err = ec.unmarshalOInputDirectives2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐInputDirectives(ctx, tmp)
282 if err != nil {
283 return nil, err
284 }
285 }
286 args["arg"] = arg0
287 return args, nil
288 }
289
290 func (ec *executionContext) field_Query_directiveInputType_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
291 var err error
292 args := map[string]interface{}{}
293 var arg0 InnerInput
294 if tmp, ok := rawArgs["arg"]; ok {
295 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("arg"))
296 directive0 := func(ctx context.Context) (interface{}, error) {
297 return ec.unmarshalNInnerInput2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐInnerInput(ctx, tmp)
298 }
299 directive1 := func(ctx context.Context) (interface{}, error) {
300 if ec.directives.Custom == nil {
301 return nil, errors.New("directive custom is not implemented")
302 }
303 return ec.directives.Custom(ctx, rawArgs, directive0)
304 }
305
306 tmp, err = directive1(ctx)
307 if err != nil {
308 return nil, graphql.ErrorOnPath(ctx, err)
309 }
310 if data, ok := tmp.(InnerInput); ok {
311 arg0 = data
312 } else {
313 return nil, graphql.ErrorOnPath(ctx, fmt.Errorf(`unexpected type %T from directive, should be github.com/99designs/gqlgen/codegen/testserver/followschema.InnerInput`, tmp))
314 }
315 }
316 args["arg"] = arg0
317 return args, nil
318 }
319
320 func (ec *executionContext) field_Query_directiveInput_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
321 var err error
322 args := map[string]interface{}{}
323 var arg0 InputDirectives
324 if tmp, ok := rawArgs["arg"]; ok {
325 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("arg"))
326 arg0, err = ec.unmarshalNInputDirectives2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐInputDirectives(ctx, tmp)
327 if err != nil {
328 return nil, err
329 }
330 }
331 args["arg"] = arg0
332 return args, nil
333 }
334
335 func (ec *executionContext) field_Query_directiveNullableArg_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
336 var err error
337 args := map[string]interface{}{}
338 var arg0 *int
339 if tmp, ok := rawArgs["arg"]; ok {
340 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("arg"))
341 directive0 := func(ctx context.Context) (interface{}, error) { return ec.unmarshalOInt2ᚖint(ctx, tmp) }
342 directive1 := func(ctx context.Context) (interface{}, error) {
343 min, err := ec.unmarshalOInt2ᚖint(ctx, 0)
344 if err != nil {
345 return nil, err
346 }
347 if ec.directives.Range == nil {
348 return nil, errors.New("directive range is not implemented")
349 }
350 return ec.directives.Range(ctx, rawArgs, directive0, min, nil)
351 }
352
353 tmp, err = directive1(ctx)
354 if err != nil {
355 return nil, graphql.ErrorOnPath(ctx, err)
356 }
357 if data, ok := tmp.(*int); ok {
358 arg0 = data
359 } else if tmp == nil {
360 arg0 = nil
361 } else {
362 return nil, graphql.ErrorOnPath(ctx, fmt.Errorf(`unexpected type %T from directive, should be *int`, tmp))
363 }
364 }
365 args["arg"] = arg0
366 var arg1 *int
367 if tmp, ok := rawArgs["arg2"]; ok {
368 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("arg2"))
369 directive0 := func(ctx context.Context) (interface{}, error) { return ec.unmarshalOInt2ᚖint(ctx, tmp) }
370 directive1 := func(ctx context.Context) (interface{}, error) {
371 min, err := ec.unmarshalOInt2ᚖint(ctx, 0)
372 if err != nil {
373 return nil, err
374 }
375 if ec.directives.Range == nil {
376 return nil, errors.New("directive range is not implemented")
377 }
378 return ec.directives.Range(ctx, rawArgs, directive0, min, nil)
379 }
380
381 tmp, err = directive1(ctx)
382 if err != nil {
383 return nil, graphql.ErrorOnPath(ctx, err)
384 }
385 if data, ok := tmp.(*int); ok {
386 arg1 = data
387 } else if tmp == nil {
388 arg1 = nil
389 } else {
390 return nil, graphql.ErrorOnPath(ctx, fmt.Errorf(`unexpected type %T from directive, should be *int`, tmp))
391 }
392 }
393 args["arg2"] = arg1
394 var arg2 *string
395 if tmp, ok := rawArgs["arg3"]; ok {
396 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("arg3"))
397 directive0 := func(ctx context.Context) (interface{}, error) { return ec.unmarshalOString2ᚖstring(ctx, tmp) }
398 directive1 := func(ctx context.Context) (interface{}, error) {
399 if ec.directives.ToNull == nil {
400 return nil, errors.New("directive toNull is not implemented")
401 }
402 return ec.directives.ToNull(ctx, rawArgs, directive0)
403 }
404
405 tmp, err = directive1(ctx)
406 if err != nil {
407 return nil, graphql.ErrorOnPath(ctx, err)
408 }
409 if data, ok := tmp.(*string); ok {
410 arg2 = data
411 } else if tmp == nil {
412 arg2 = nil
413 } else {
414 return nil, graphql.ErrorOnPath(ctx, fmt.Errorf(`unexpected type %T from directive, should be *string`, tmp))
415 }
416 }
417 args["arg3"] = arg2
418 return args, nil
419 }
420
421 func (ec *executionContext) field_Query_enumInInput_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
422 var err error
423 args := map[string]interface{}{}
424 var arg0 *InputWithEnumValue
425 if tmp, ok := rawArgs["input"]; ok {
426 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input"))
427 arg0, err = ec.unmarshalOInputWithEnumValue2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐInputWithEnumValue(ctx, tmp)
428 if err != nil {
429 return nil, err
430 }
431 }
432 args["input"] = arg0
433 return args, nil
434 }
435
436 func (ec *executionContext) field_Query_fallback_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
437 var err error
438 args := map[string]interface{}{}
439 var arg0 FallbackToStringEncoding
440 if tmp, ok := rawArgs["arg"]; ok {
441 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("arg"))
442 arg0, err = ec.unmarshalNFallbackToStringEncoding2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐFallbackToStringEncoding(ctx, tmp)
443 if err != nil {
444 return nil, err
445 }
446 }
447 args["arg"] = arg0
448 return args, nil
449 }
450
451 func (ec *executionContext) field_Query_inputNullableSlice_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
452 var err error
453 args := map[string]interface{}{}
454 var arg0 []string
455 if tmp, ok := rawArgs["arg"]; ok {
456 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("arg"))
457 arg0, err = ec.unmarshalOString2ᚕstringᚄ(ctx, tmp)
458 if err != nil {
459 return nil, err
460 }
461 }
462 args["arg"] = arg0
463 return args, nil
464 }
465
466 func (ec *executionContext) field_Query_inputOmittable_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
467 var err error
468 args := map[string]interface{}{}
469 var arg0 OmittableInput
470 if tmp, ok := rawArgs["arg"]; ok {
471 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("arg"))
472 arg0, err = ec.unmarshalNOmittableInput2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐOmittableInput(ctx, tmp)
473 if err != nil {
474 return nil, err
475 }
476 }
477 args["arg"] = arg0
478 return args, nil
479 }
480
481 func (ec *executionContext) field_Query_inputSlice_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
482 var err error
483 args := map[string]interface{}{}
484 var arg0 []string
485 if tmp, ok := rawArgs["arg"]; ok {
486 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("arg"))
487 arg0, err = ec.unmarshalNString2ᚕstringᚄ(ctx, tmp)
488 if err != nil {
489 return nil, err
490 }
491 }
492 args["arg"] = arg0
493 return args, nil
494 }
495
496 func (ec *executionContext) field_Query_mapInput_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
497 var err error
498 args := map[string]interface{}{}
499 var arg0 map[string]interface{}
500 if tmp, ok := rawArgs["input"]; ok {
501 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input"))
502 arg0, err = ec.unmarshalOChanges2map(ctx, tmp)
503 if err != nil {
504 return nil, err
505 }
506 }
507 args["input"] = arg0
508 return args, nil
509 }
510
511 func (ec *executionContext) field_Query_mapNestedStringInterface_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
512 var err error
513 args := map[string]interface{}{}
514 var arg0 *NestedMapInput
515 if tmp, ok := rawArgs["in"]; ok {
516 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("in"))
517 arg0, err = ec.unmarshalONestedMapInput2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐNestedMapInput(ctx, tmp)
518 if err != nil {
519 return nil, err
520 }
521 }
522 args["in"] = arg0
523 return args, nil
524 }
525
526 func (ec *executionContext) field_Query_mapStringInterface_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
527 var err error
528 args := map[string]interface{}{}
529 var arg0 map[string]interface{}
530 if tmp, ok := rawArgs["in"]; ok {
531 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("in"))
532 arg0, err = ec.unmarshalOMapStringInterfaceInput2map(ctx, tmp)
533 if err != nil {
534 return nil, err
535 }
536 }
537 args["in"] = arg0
538 return args, nil
539 }
540
541 func (ec *executionContext) field_Query_nestedInputs_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
542 var err error
543 args := map[string]interface{}{}
544 var arg0 [][]*OuterInput
545 if tmp, ok := rawArgs["input"]; ok {
546 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input"))
547 arg0, err = ec.unmarshalOOuterInput2ᚕᚕᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐOuterInput(ctx, tmp)
548 if err != nil {
549 return nil, err
550 }
551 }
552 args["input"] = arg0
553 return args, nil
554 }
555
556 func (ec *executionContext) field_Query_nullableArg_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
557 var err error
558 args := map[string]interface{}{}
559 var arg0 *int
560 if tmp, ok := rawArgs["arg"]; ok {
561 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("arg"))
562 arg0, err = ec.unmarshalOInt2ᚖint(ctx, tmp)
563 if err != nil {
564 return nil, err
565 }
566 }
567 args["arg"] = arg0
568 return args, nil
569 }
570
571 func (ec *executionContext) field_Query_recursive_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
572 var err error
573 args := map[string]interface{}{}
574 var arg0 *RecursiveInputSlice
575 if tmp, ok := rawArgs["input"]; ok {
576 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input"))
577 arg0, err = ec.unmarshalORecursiveInputSlice2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐRecursiveInputSlice(ctx, tmp)
578 if err != nil {
579 return nil, err
580 }
581 }
582 args["input"] = arg0
583 return args, nil
584 }
585
586 func (ec *executionContext) field_Query_user_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
587 var err error
588 args := map[string]interface{}{}
589 var arg0 int
590 if tmp, ok := rawArgs["id"]; ok {
591 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("id"))
592 arg0, err = ec.unmarshalNInt2int(ctx, tmp)
593 if err != nil {
594 return nil, err
595 }
596 }
597 args["id"] = arg0
598 return args, nil
599 }
600
601 func (ec *executionContext) field_Subscription_directiveArg_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
602 var err error
603 args := map[string]interface{}{}
604 var arg0 string
605 if tmp, ok := rawArgs["arg"]; ok {
606 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("arg"))
607 directive0 := func(ctx context.Context) (interface{}, error) { return ec.unmarshalNString2string(ctx, tmp) }
608 directive1 := func(ctx context.Context) (interface{}, error) {
609 min, err := ec.unmarshalNInt2int(ctx, 1)
610 if err != nil {
611 return nil, err
612 }
613 max, err := ec.unmarshalOInt2ᚖint(ctx, 255)
614 if err != nil {
615 return nil, err
616 }
617 message, err := ec.unmarshalOString2ᚖstring(ctx, "invalid length")
618 if err != nil {
619 return nil, err
620 }
621 if ec.directives.Length == nil {
622 return nil, errors.New("directive length is not implemented")
623 }
624 return ec.directives.Length(ctx, rawArgs, directive0, min, max, message)
625 }
626
627 tmp, err = directive1(ctx)
628 if err != nil {
629 return nil, graphql.ErrorOnPath(ctx, err)
630 }
631 if data, ok := tmp.(string); ok {
632 arg0 = data
633 } else {
634 return nil, graphql.ErrorOnPath(ctx, fmt.Errorf(`unexpected type %T from directive, should be string`, tmp))
635 }
636 }
637 args["arg"] = arg0
638 return args, nil
639 }
640
641 func (ec *executionContext) field_Subscription_directiveNullableArg_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
642 var err error
643 args := map[string]interface{}{}
644 var arg0 *int
645 if tmp, ok := rawArgs["arg"]; ok {
646 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("arg"))
647 directive0 := func(ctx context.Context) (interface{}, error) { return ec.unmarshalOInt2ᚖint(ctx, tmp) }
648 directive1 := func(ctx context.Context) (interface{}, error) {
649 min, err := ec.unmarshalOInt2ᚖint(ctx, 0)
650 if err != nil {
651 return nil, err
652 }
653 if ec.directives.Range == nil {
654 return nil, errors.New("directive range is not implemented")
655 }
656 return ec.directives.Range(ctx, rawArgs, directive0, min, nil)
657 }
658
659 tmp, err = directive1(ctx)
660 if err != nil {
661 return nil, graphql.ErrorOnPath(ctx, err)
662 }
663 if data, ok := tmp.(*int); ok {
664 arg0 = data
665 } else if tmp == nil {
666 arg0 = nil
667 } else {
668 return nil, graphql.ErrorOnPath(ctx, fmt.Errorf(`unexpected type %T from directive, should be *int`, tmp))
669 }
670 }
671 args["arg"] = arg0
672 var arg1 *int
673 if tmp, ok := rawArgs["arg2"]; ok {
674 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("arg2"))
675 directive0 := func(ctx context.Context) (interface{}, error) { return ec.unmarshalOInt2ᚖint(ctx, tmp) }
676 directive1 := func(ctx context.Context) (interface{}, error) {
677 min, err := ec.unmarshalOInt2ᚖint(ctx, 0)
678 if err != nil {
679 return nil, err
680 }
681 if ec.directives.Range == nil {
682 return nil, errors.New("directive range is not implemented")
683 }
684 return ec.directives.Range(ctx, rawArgs, directive0, min, nil)
685 }
686
687 tmp, err = directive1(ctx)
688 if err != nil {
689 return nil, graphql.ErrorOnPath(ctx, err)
690 }
691 if data, ok := tmp.(*int); ok {
692 arg1 = data
693 } else if tmp == nil {
694 arg1 = nil
695 } else {
696 return nil, graphql.ErrorOnPath(ctx, fmt.Errorf(`unexpected type %T from directive, should be *int`, tmp))
697 }
698 }
699 args["arg2"] = arg1
700 var arg2 *string
701 if tmp, ok := rawArgs["arg3"]; ok {
702 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("arg3"))
703 directive0 := func(ctx context.Context) (interface{}, error) { return ec.unmarshalOString2ᚖstring(ctx, tmp) }
704 directive1 := func(ctx context.Context) (interface{}, error) {
705 if ec.directives.ToNull == nil {
706 return nil, errors.New("directive toNull is not implemented")
707 }
708 return ec.directives.ToNull(ctx, rawArgs, directive0)
709 }
710
711 tmp, err = directive1(ctx)
712 if err != nil {
713 return nil, graphql.ErrorOnPath(ctx, err)
714 }
715 if data, ok := tmp.(*string); ok {
716 arg2 = data
717 } else if tmp == nil {
718 arg2 = nil
719 } else {
720 return nil, graphql.ErrorOnPath(ctx, fmt.Errorf(`unexpected type %T from directive, should be *string`, tmp))
721 }
722 }
723 args["arg3"] = arg2
724 return args, nil
725 }
726
727 func (ec *executionContext) field_User_pets_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
728 var err error
729 args := map[string]interface{}{}
730 var arg0 *int
731 if tmp, ok := rawArgs["limit"]; ok {
732 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("limit"))
733 arg0, err = ec.unmarshalOInt2ᚖint(ctx, tmp)
734 if err != nil {
735 return nil, err
736 }
737 }
738 args["limit"] = arg0
739 return args, nil
740 }
741
742
743
744
745
746
747
748
749
750 func (ec *executionContext) _Autobind_int(ctx context.Context, field graphql.CollectedField, obj *Autobind) (ret graphql.Marshaler) {
751 fc, err := ec.fieldContext_Autobind_int(ctx, field)
752 if err != nil {
753 return graphql.Null
754 }
755 ctx = graphql.WithFieldContext(ctx, fc)
756 defer func() {
757 if r := recover(); r != nil {
758 ec.Error(ctx, ec.Recover(ctx, r))
759 ret = graphql.Null
760 }
761 }()
762 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
763 ctx = rctx
764 return obj.Int, nil
765 })
766
767 if resTmp == nil {
768 if !graphql.HasFieldError(ctx, fc) {
769 ec.Errorf(ctx, "must not be null")
770 }
771 return graphql.Null
772 }
773 res := resTmp.(int)
774 fc.Result = res
775 return ec.marshalNInt2int(ctx, field.Selections, res)
776 }
777
778 func (ec *executionContext) fieldContext_Autobind_int(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
779 fc = &graphql.FieldContext{
780 Object: "Autobind",
781 Field: field,
782 IsMethod: false,
783 IsResolver: false,
784 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
785 return nil, errors.New("field of type Int does not have child fields")
786 },
787 }
788 return fc, nil
789 }
790
791 func (ec *executionContext) _Autobind_int32(ctx context.Context, field graphql.CollectedField, obj *Autobind) (ret graphql.Marshaler) {
792 fc, err := ec.fieldContext_Autobind_int32(ctx, field)
793 if err != nil {
794 return graphql.Null
795 }
796 ctx = graphql.WithFieldContext(ctx, fc)
797 defer func() {
798 if r := recover(); r != nil {
799 ec.Error(ctx, ec.Recover(ctx, r))
800 ret = graphql.Null
801 }
802 }()
803 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
804 ctx = rctx
805 return obj.Int32, nil
806 })
807
808 if resTmp == nil {
809 if !graphql.HasFieldError(ctx, fc) {
810 ec.Errorf(ctx, "must not be null")
811 }
812 return graphql.Null
813 }
814 res := resTmp.(int32)
815 fc.Result = res
816 return ec.marshalNInt2int32(ctx, field.Selections, res)
817 }
818
819 func (ec *executionContext) fieldContext_Autobind_int32(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
820 fc = &graphql.FieldContext{
821 Object: "Autobind",
822 Field: field,
823 IsMethod: false,
824 IsResolver: false,
825 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
826 return nil, errors.New("field of type Int does not have child fields")
827 },
828 }
829 return fc, nil
830 }
831
832 func (ec *executionContext) _Autobind_int64(ctx context.Context, field graphql.CollectedField, obj *Autobind) (ret graphql.Marshaler) {
833 fc, err := ec.fieldContext_Autobind_int64(ctx, field)
834 if err != nil {
835 return graphql.Null
836 }
837 ctx = graphql.WithFieldContext(ctx, fc)
838 defer func() {
839 if r := recover(); r != nil {
840 ec.Error(ctx, ec.Recover(ctx, r))
841 ret = graphql.Null
842 }
843 }()
844 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
845 ctx = rctx
846 return obj.Int64, nil
847 })
848
849 if resTmp == nil {
850 if !graphql.HasFieldError(ctx, fc) {
851 ec.Errorf(ctx, "must not be null")
852 }
853 return graphql.Null
854 }
855 res := resTmp.(int64)
856 fc.Result = res
857 return ec.marshalNInt2int64(ctx, field.Selections, res)
858 }
859
860 func (ec *executionContext) fieldContext_Autobind_int64(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
861 fc = &graphql.FieldContext{
862 Object: "Autobind",
863 Field: field,
864 IsMethod: false,
865 IsResolver: false,
866 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
867 return nil, errors.New("field of type Int does not have child fields")
868 },
869 }
870 return fc, nil
871 }
872
873 func (ec *executionContext) _Autobind_idStr(ctx context.Context, field graphql.CollectedField, obj *Autobind) (ret graphql.Marshaler) {
874 fc, err := ec.fieldContext_Autobind_idStr(ctx, field)
875 if err != nil {
876 return graphql.Null
877 }
878 ctx = graphql.WithFieldContext(ctx, fc)
879 defer func() {
880 if r := recover(); r != nil {
881 ec.Error(ctx, ec.Recover(ctx, r))
882 ret = graphql.Null
883 }
884 }()
885 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
886 ctx = rctx
887 return obj.IdStr, nil
888 })
889
890 if resTmp == nil {
891 if !graphql.HasFieldError(ctx, fc) {
892 ec.Errorf(ctx, "must not be null")
893 }
894 return graphql.Null
895 }
896 res := resTmp.(string)
897 fc.Result = res
898 return ec.marshalNID2string(ctx, field.Selections, res)
899 }
900
901 func (ec *executionContext) fieldContext_Autobind_idStr(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
902 fc = &graphql.FieldContext{
903 Object: "Autobind",
904 Field: field,
905 IsMethod: false,
906 IsResolver: false,
907 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
908 return nil, errors.New("field of type ID does not have child fields")
909 },
910 }
911 return fc, nil
912 }
913
914 func (ec *executionContext) _Autobind_idInt(ctx context.Context, field graphql.CollectedField, obj *Autobind) (ret graphql.Marshaler) {
915 fc, err := ec.fieldContext_Autobind_idInt(ctx, field)
916 if err != nil {
917 return graphql.Null
918 }
919 ctx = graphql.WithFieldContext(ctx, fc)
920 defer func() {
921 if r := recover(); r != nil {
922 ec.Error(ctx, ec.Recover(ctx, r))
923 ret = graphql.Null
924 }
925 }()
926 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
927 ctx = rctx
928 return obj.IdInt, nil
929 })
930
931 if resTmp == nil {
932 if !graphql.HasFieldError(ctx, fc) {
933 ec.Errorf(ctx, "must not be null")
934 }
935 return graphql.Null
936 }
937 res := resTmp.(int)
938 fc.Result = res
939 return ec.marshalNID2int(ctx, field.Selections, res)
940 }
941
942 func (ec *executionContext) fieldContext_Autobind_idInt(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
943 fc = &graphql.FieldContext{
944 Object: "Autobind",
945 Field: field,
946 IsMethod: false,
947 IsResolver: false,
948 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
949 return nil, errors.New("field of type ID does not have child fields")
950 },
951 }
952 return fc, nil
953 }
954
955 func (ec *executionContext) _EmbeddedPointer_ID(ctx context.Context, field graphql.CollectedField, obj *EmbeddedPointerModel) (ret graphql.Marshaler) {
956 fc, err := ec.fieldContext_EmbeddedPointer_ID(ctx, field)
957 if err != nil {
958 return graphql.Null
959 }
960 ctx = graphql.WithFieldContext(ctx, fc)
961 defer func() {
962 if r := recover(); r != nil {
963 ec.Error(ctx, ec.Recover(ctx, r))
964 ret = graphql.Null
965 }
966 }()
967 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
968 ctx = rctx
969 return obj.ID, nil
970 })
971
972 if resTmp == nil {
973 return graphql.Null
974 }
975 res := resTmp.(string)
976 fc.Result = res
977 return ec.marshalOString2string(ctx, field.Selections, res)
978 }
979
980 func (ec *executionContext) fieldContext_EmbeddedPointer_ID(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
981 fc = &graphql.FieldContext{
982 Object: "EmbeddedPointer",
983 Field: field,
984 IsMethod: false,
985 IsResolver: false,
986 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
987 return nil, errors.New("field of type String does not have child fields")
988 },
989 }
990 return fc, nil
991 }
992
993 func (ec *executionContext) _EmbeddedPointer_Title(ctx context.Context, field graphql.CollectedField, obj *EmbeddedPointerModel) (ret graphql.Marshaler) {
994 fc, err := ec.fieldContext_EmbeddedPointer_Title(ctx, field)
995 if err != nil {
996 return graphql.Null
997 }
998 ctx = graphql.WithFieldContext(ctx, fc)
999 defer func() {
1000 if r := recover(); r != nil {
1001 ec.Error(ctx, ec.Recover(ctx, r))
1002 ret = graphql.Null
1003 }
1004 }()
1005 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
1006 ctx = rctx
1007 return obj.Title, nil
1008 })
1009
1010 if resTmp == nil {
1011 return graphql.Null
1012 }
1013 res := resTmp.(string)
1014 fc.Result = res
1015 return ec.marshalOString2string(ctx, field.Selections, res)
1016 }
1017
1018 func (ec *executionContext) fieldContext_EmbeddedPointer_Title(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
1019 fc = &graphql.FieldContext{
1020 Object: "EmbeddedPointer",
1021 Field: field,
1022 IsMethod: false,
1023 IsResolver: false,
1024 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
1025 return nil, errors.New("field of type String does not have child fields")
1026 },
1027 }
1028 return fc, nil
1029 }
1030
1031 func (ec *executionContext) _ForcedResolver_field(ctx context.Context, field graphql.CollectedField, obj *ForcedResolver) (ret graphql.Marshaler) {
1032 fc, err := ec.fieldContext_ForcedResolver_field(ctx, field)
1033 if err != nil {
1034 return graphql.Null
1035 }
1036 ctx = graphql.WithFieldContext(ctx, fc)
1037 defer func() {
1038 if r := recover(); r != nil {
1039 ec.Error(ctx, ec.Recover(ctx, r))
1040 ret = graphql.Null
1041 }
1042 }()
1043 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
1044 ctx = rctx
1045 return ec.resolvers.ForcedResolver().Field(rctx, obj)
1046 })
1047
1048 if resTmp == nil {
1049 return graphql.Null
1050 }
1051 res := resTmp.(*Circle)
1052 fc.Result = res
1053 return ec.marshalOCircle2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐCircle(ctx, field.Selections, res)
1054 }
1055
1056 func (ec *executionContext) fieldContext_ForcedResolver_field(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
1057 fc = &graphql.FieldContext{
1058 Object: "ForcedResolver",
1059 Field: field,
1060 IsMethod: true,
1061 IsResolver: true,
1062 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
1063 switch field.Name {
1064 case "radius":
1065 return ec.fieldContext_Circle_radius(ctx, field)
1066 case "area":
1067 return ec.fieldContext_Circle_area(ctx, field)
1068 case "coordinates":
1069 return ec.fieldContext_Circle_coordinates(ctx, field)
1070 }
1071 return nil, fmt.Errorf("no field named %q was found under type Circle", field.Name)
1072 },
1073 }
1074 return fc, nil
1075 }
1076
1077 func (ec *executionContext) _InnerObject_id(ctx context.Context, field graphql.CollectedField, obj *InnerObject) (ret graphql.Marshaler) {
1078 fc, err := ec.fieldContext_InnerObject_id(ctx, field)
1079 if err != nil {
1080 return graphql.Null
1081 }
1082 ctx = graphql.WithFieldContext(ctx, fc)
1083 defer func() {
1084 if r := recover(); r != nil {
1085 ec.Error(ctx, ec.Recover(ctx, r))
1086 ret = graphql.Null
1087 }
1088 }()
1089 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
1090 ctx = rctx
1091 return obj.ID, nil
1092 })
1093
1094 if resTmp == nil {
1095 if !graphql.HasFieldError(ctx, fc) {
1096 ec.Errorf(ctx, "must not be null")
1097 }
1098 return graphql.Null
1099 }
1100 res := resTmp.(int)
1101 fc.Result = res
1102 return ec.marshalNInt2int(ctx, field.Selections, res)
1103 }
1104
1105 func (ec *executionContext) fieldContext_InnerObject_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
1106 fc = &graphql.FieldContext{
1107 Object: "InnerObject",
1108 Field: field,
1109 IsMethod: false,
1110 IsResolver: false,
1111 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
1112 return nil, errors.New("field of type Int does not have child fields")
1113 },
1114 }
1115 return fc, nil
1116 }
1117
1118 func (ec *executionContext) _InvalidIdentifier_id(ctx context.Context, field graphql.CollectedField, obj *invalid_packagename.InvalidIdentifier) (ret graphql.Marshaler) {
1119 fc, err := ec.fieldContext_InvalidIdentifier_id(ctx, field)
1120 if err != nil {
1121 return graphql.Null
1122 }
1123 ctx = graphql.WithFieldContext(ctx, fc)
1124 defer func() {
1125 if r := recover(); r != nil {
1126 ec.Error(ctx, ec.Recover(ctx, r))
1127 ret = graphql.Null
1128 }
1129 }()
1130 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
1131 ctx = rctx
1132 return obj.ID, nil
1133 })
1134
1135 if resTmp == nil {
1136 if !graphql.HasFieldError(ctx, fc) {
1137 ec.Errorf(ctx, "must not be null")
1138 }
1139 return graphql.Null
1140 }
1141 res := resTmp.(int)
1142 fc.Result = res
1143 return ec.marshalNInt2int(ctx, field.Selections, res)
1144 }
1145
1146 func (ec *executionContext) fieldContext_InvalidIdentifier_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
1147 fc = &graphql.FieldContext{
1148 Object: "InvalidIdentifier",
1149 Field: field,
1150 IsMethod: false,
1151 IsResolver: false,
1152 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
1153 return nil, errors.New("field of type Int does not have child fields")
1154 },
1155 }
1156 return fc, nil
1157 }
1158
1159 func (ec *executionContext) _It_id(ctx context.Context, field graphql.CollectedField, obj *introspection1.It) (ret graphql.Marshaler) {
1160 fc, err := ec.fieldContext_It_id(ctx, field)
1161 if err != nil {
1162 return graphql.Null
1163 }
1164 ctx = graphql.WithFieldContext(ctx, fc)
1165 defer func() {
1166 if r := recover(); r != nil {
1167 ec.Error(ctx, ec.Recover(ctx, r))
1168 ret = graphql.Null
1169 }
1170 }()
1171 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
1172 ctx = rctx
1173 return obj.ID, nil
1174 })
1175
1176 if resTmp == nil {
1177 if !graphql.HasFieldError(ctx, fc) {
1178 ec.Errorf(ctx, "must not be null")
1179 }
1180 return graphql.Null
1181 }
1182 res := resTmp.(string)
1183 fc.Result = res
1184 return ec.marshalNID2string(ctx, field.Selections, res)
1185 }
1186
1187 func (ec *executionContext) fieldContext_It_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
1188 fc = &graphql.FieldContext{
1189 Object: "It",
1190 Field: field,
1191 IsMethod: false,
1192 IsResolver: false,
1193 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
1194 return nil, errors.New("field of type ID does not have child fields")
1195 },
1196 }
1197 return fc, nil
1198 }
1199
1200 func (ec *executionContext) _ModelMethods_resolverField(ctx context.Context, field graphql.CollectedField, obj *ModelMethods) (ret graphql.Marshaler) {
1201 fc, err := ec.fieldContext_ModelMethods_resolverField(ctx, field)
1202 if err != nil {
1203 return graphql.Null
1204 }
1205 ctx = graphql.WithFieldContext(ctx, fc)
1206 defer func() {
1207 if r := recover(); r != nil {
1208 ec.Error(ctx, ec.Recover(ctx, r))
1209 ret = graphql.Null
1210 }
1211 }()
1212 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
1213 ctx = rctx
1214 return ec.resolvers.ModelMethods().ResolverField(rctx, obj)
1215 })
1216
1217 if resTmp == nil {
1218 if !graphql.HasFieldError(ctx, fc) {
1219 ec.Errorf(ctx, "must not be null")
1220 }
1221 return graphql.Null
1222 }
1223 res := resTmp.(bool)
1224 fc.Result = res
1225 return ec.marshalNBoolean2bool(ctx, field.Selections, res)
1226 }
1227
1228 func (ec *executionContext) fieldContext_ModelMethods_resolverField(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
1229 fc = &graphql.FieldContext{
1230 Object: "ModelMethods",
1231 Field: field,
1232 IsMethod: true,
1233 IsResolver: true,
1234 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
1235 return nil, errors.New("field of type Boolean does not have child fields")
1236 },
1237 }
1238 return fc, nil
1239 }
1240
1241 func (ec *executionContext) _ModelMethods_noContext(ctx context.Context, field graphql.CollectedField, obj *ModelMethods) (ret graphql.Marshaler) {
1242 fc, err := ec.fieldContext_ModelMethods_noContext(ctx, field)
1243 if err != nil {
1244 return graphql.Null
1245 }
1246 ctx = graphql.WithFieldContext(ctx, fc)
1247 defer func() {
1248 if r := recover(); r != nil {
1249 ec.Error(ctx, ec.Recover(ctx, r))
1250 ret = graphql.Null
1251 }
1252 }()
1253 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
1254 ctx = rctx
1255 return obj.NoContext(), nil
1256 })
1257
1258 if resTmp == nil {
1259 if !graphql.HasFieldError(ctx, fc) {
1260 ec.Errorf(ctx, "must not be null")
1261 }
1262 return graphql.Null
1263 }
1264 res := resTmp.(bool)
1265 fc.Result = res
1266 return ec.marshalNBoolean2bool(ctx, field.Selections, res)
1267 }
1268
1269 func (ec *executionContext) fieldContext_ModelMethods_noContext(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
1270 fc = &graphql.FieldContext{
1271 Object: "ModelMethods",
1272 Field: field,
1273 IsMethod: true,
1274 IsResolver: false,
1275 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
1276 return nil, errors.New("field of type Boolean does not have child fields")
1277 },
1278 }
1279 return fc, nil
1280 }
1281
1282 func (ec *executionContext) _ModelMethods_withContext(ctx context.Context, field graphql.CollectedField, obj *ModelMethods) (ret graphql.Marshaler) {
1283 fc, err := ec.fieldContext_ModelMethods_withContext(ctx, field)
1284 if err != nil {
1285 return graphql.Null
1286 }
1287 ctx = graphql.WithFieldContext(ctx, fc)
1288 defer func() {
1289 if r := recover(); r != nil {
1290 ec.Error(ctx, ec.Recover(ctx, r))
1291 ret = graphql.Null
1292 }
1293 }()
1294 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
1295 ctx = rctx
1296 return obj.WithContext(ctx), nil
1297 })
1298
1299 if resTmp == nil {
1300 if !graphql.HasFieldError(ctx, fc) {
1301 ec.Errorf(ctx, "must not be null")
1302 }
1303 return graphql.Null
1304 }
1305 res := resTmp.(bool)
1306 fc.Result = res
1307 return ec.marshalNBoolean2bool(ctx, field.Selections, res)
1308 }
1309
1310 func (ec *executionContext) fieldContext_ModelMethods_withContext(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
1311 fc = &graphql.FieldContext{
1312 Object: "ModelMethods",
1313 Field: field,
1314 IsMethod: true,
1315 IsResolver: false,
1316 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
1317 return nil, errors.New("field of type Boolean does not have child fields")
1318 },
1319 }
1320 return fc, nil
1321 }
1322
1323 func (ec *executionContext) _OuterObject_inner(ctx context.Context, field graphql.CollectedField, obj *OuterObject) (ret graphql.Marshaler) {
1324 fc, err := ec.fieldContext_OuterObject_inner(ctx, field)
1325 if err != nil {
1326 return graphql.Null
1327 }
1328 ctx = graphql.WithFieldContext(ctx, fc)
1329 defer func() {
1330 if r := recover(); r != nil {
1331 ec.Error(ctx, ec.Recover(ctx, r))
1332 ret = graphql.Null
1333 }
1334 }()
1335 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
1336 ctx = rctx
1337 return obj.Inner, nil
1338 })
1339
1340 if resTmp == nil {
1341 if !graphql.HasFieldError(ctx, fc) {
1342 ec.Errorf(ctx, "must not be null")
1343 }
1344 return graphql.Null
1345 }
1346 res := resTmp.(*InnerObject)
1347 fc.Result = res
1348 return ec.marshalNInnerObject2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐInnerObject(ctx, field.Selections, res)
1349 }
1350
1351 func (ec *executionContext) fieldContext_OuterObject_inner(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
1352 fc = &graphql.FieldContext{
1353 Object: "OuterObject",
1354 Field: field,
1355 IsMethod: false,
1356 IsResolver: false,
1357 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
1358 switch field.Name {
1359 case "id":
1360 return ec.fieldContext_InnerObject_id(ctx, field)
1361 }
1362 return nil, fmt.Errorf("no field named %q was found under type InnerObject", field.Name)
1363 },
1364 }
1365 return fc, nil
1366 }
1367
1368 func (ec *executionContext) _Pet_id(ctx context.Context, field graphql.CollectedField, obj *Pet) (ret graphql.Marshaler) {
1369 fc, err := ec.fieldContext_Pet_id(ctx, field)
1370 if err != nil {
1371 return graphql.Null
1372 }
1373 ctx = graphql.WithFieldContext(ctx, fc)
1374 defer func() {
1375 if r := recover(); r != nil {
1376 ec.Error(ctx, ec.Recover(ctx, r))
1377 ret = graphql.Null
1378 }
1379 }()
1380 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
1381 ctx = rctx
1382 return obj.ID, nil
1383 })
1384
1385 if resTmp == nil {
1386 if !graphql.HasFieldError(ctx, fc) {
1387 ec.Errorf(ctx, "must not be null")
1388 }
1389 return graphql.Null
1390 }
1391 res := resTmp.(int)
1392 fc.Result = res
1393 return ec.marshalNInt2int(ctx, field.Selections, res)
1394 }
1395
1396 func (ec *executionContext) fieldContext_Pet_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
1397 fc = &graphql.FieldContext{
1398 Object: "Pet",
1399 Field: field,
1400 IsMethod: false,
1401 IsResolver: false,
1402 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
1403 return nil, errors.New("field of type Int does not have child fields")
1404 },
1405 }
1406 return fc, nil
1407 }
1408
1409 func (ec *executionContext) _Pet_friends(ctx context.Context, field graphql.CollectedField, obj *Pet) (ret graphql.Marshaler) {
1410 fc, err := ec.fieldContext_Pet_friends(ctx, field)
1411 if err != nil {
1412 return graphql.Null
1413 }
1414 ctx = graphql.WithFieldContext(ctx, fc)
1415 defer func() {
1416 if r := recover(); r != nil {
1417 ec.Error(ctx, ec.Recover(ctx, r))
1418 ret = graphql.Null
1419 }
1420 }()
1421 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
1422 ctx = rctx
1423 return ec.resolvers.Pet().Friends(rctx, obj, fc.Args["limit"].(*int))
1424 })
1425
1426 if resTmp == nil {
1427 return graphql.Null
1428 }
1429 res := resTmp.([]*Pet)
1430 fc.Result = res
1431 return ec.marshalOPet2ᚕᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐPetᚄ(ctx, field.Selections, res)
1432 }
1433
1434 func (ec *executionContext) fieldContext_Pet_friends(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
1435 fc = &graphql.FieldContext{
1436 Object: "Pet",
1437 Field: field,
1438 IsMethod: true,
1439 IsResolver: true,
1440 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
1441 switch field.Name {
1442 case "id":
1443 return ec.fieldContext_Pet_id(ctx, field)
1444 case "friends":
1445 return ec.fieldContext_Pet_friends(ctx, field)
1446 }
1447 return nil, fmt.Errorf("no field named %q was found under type Pet", field.Name)
1448 },
1449 }
1450 defer func() {
1451 if r := recover(); r != nil {
1452 err = ec.Recover(ctx, r)
1453 ec.Error(ctx, err)
1454 }
1455 }()
1456 ctx = graphql.WithFieldContext(ctx, fc)
1457 if fc.Args, err = ec.field_Pet_friends_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
1458 ec.Error(ctx, err)
1459 return fc, err
1460 }
1461 return fc, nil
1462 }
1463
1464 func (ec *executionContext) _Query_invalidIdentifier(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
1465 fc, err := ec.fieldContext_Query_invalidIdentifier(ctx, field)
1466 if err != nil {
1467 return graphql.Null
1468 }
1469 ctx = graphql.WithFieldContext(ctx, fc)
1470 defer func() {
1471 if r := recover(); r != nil {
1472 ec.Error(ctx, ec.Recover(ctx, r))
1473 ret = graphql.Null
1474 }
1475 }()
1476 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) {
1477 ctx = rctx
1478 return ec.resolvers.Query().InvalidIdentifier(rctx)
1479 })
1480
1481 if resTmp == nil {
1482 return graphql.Null
1483 }
1484 res := resTmp.(*invalid_packagename.InvalidIdentifier)
1485 fc.Result = res
1486 return ec.marshalOInvalidIdentifier2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚋinvalidᚑpackagenameᚐInvalidIdentifier(ctx, field.Selections, res)
1487 }
1488
1489 func (ec *executionContext) fieldContext_Query_invalidIdentifier(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
1490 fc = &graphql.FieldContext{
1491 Object: "Query",
1492 Field: field,
1493 IsMethod: true,
1494 IsResolver: true,
1495 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
1496 switch field.Name {
1497 case "id":
1498 return ec.fieldContext_InvalidIdentifier_id(ctx, field)
1499 }
1500 return nil, fmt.Errorf("no field named %q was found under type InvalidIdentifier", field.Name)
1501 },
1502 }
1503 return fc, nil
1504 }
1505
1506 func (ec *executionContext) _Query_collision(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
1507 fc, err := ec.fieldContext_Query_collision(ctx, field)
1508 if err != nil {
1509 return graphql.Null
1510 }
1511 ctx = graphql.WithFieldContext(ctx, fc)
1512 defer func() {
1513 if r := recover(); r != nil {
1514 ec.Error(ctx, ec.Recover(ctx, r))
1515 ret = graphql.Null
1516 }
1517 }()
1518 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) {
1519 ctx = rctx
1520 return ec.resolvers.Query().Collision(rctx)
1521 })
1522
1523 if resTmp == nil {
1524 return graphql.Null
1525 }
1526 res := resTmp.(*introspection1.It)
1527 fc.Result = res
1528 return ec.marshalOIt2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚋintrospectionᚐIt(ctx, field.Selections, res)
1529 }
1530
1531 func (ec *executionContext) fieldContext_Query_collision(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
1532 fc = &graphql.FieldContext{
1533 Object: "Query",
1534 Field: field,
1535 IsMethod: true,
1536 IsResolver: true,
1537 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
1538 switch field.Name {
1539 case "id":
1540 return ec.fieldContext_It_id(ctx, field)
1541 }
1542 return nil, fmt.Errorf("no field named %q was found under type It", field.Name)
1543 },
1544 }
1545 return fc, nil
1546 }
1547
1548 func (ec *executionContext) _Query_mapInput(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
1549 fc, err := ec.fieldContext_Query_mapInput(ctx, field)
1550 if err != nil {
1551 return graphql.Null
1552 }
1553 ctx = graphql.WithFieldContext(ctx, fc)
1554 defer func() {
1555 if r := recover(); r != nil {
1556 ec.Error(ctx, ec.Recover(ctx, r))
1557 ret = graphql.Null
1558 }
1559 }()
1560 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) {
1561 ctx = rctx
1562 return ec.resolvers.Query().MapInput(rctx, fc.Args["input"].(map[string]interface{}))
1563 })
1564
1565 if resTmp == nil {
1566 return graphql.Null
1567 }
1568 res := resTmp.(*bool)
1569 fc.Result = res
1570 return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res)
1571 }
1572
1573 func (ec *executionContext) fieldContext_Query_mapInput(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
1574 fc = &graphql.FieldContext{
1575 Object: "Query",
1576 Field: field,
1577 IsMethod: true,
1578 IsResolver: true,
1579 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
1580 return nil, errors.New("field of type Boolean does not have child fields")
1581 },
1582 }
1583 defer func() {
1584 if r := recover(); r != nil {
1585 err = ec.Recover(ctx, r)
1586 ec.Error(ctx, err)
1587 }
1588 }()
1589 ctx = graphql.WithFieldContext(ctx, fc)
1590 if fc.Args, err = ec.field_Query_mapInput_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
1591 ec.Error(ctx, err)
1592 return fc, err
1593 }
1594 return fc, nil
1595 }
1596
1597 func (ec *executionContext) _Query_recursive(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
1598 fc, err := ec.fieldContext_Query_recursive(ctx, field)
1599 if err != nil {
1600 return graphql.Null
1601 }
1602 ctx = graphql.WithFieldContext(ctx, fc)
1603 defer func() {
1604 if r := recover(); r != nil {
1605 ec.Error(ctx, ec.Recover(ctx, r))
1606 ret = graphql.Null
1607 }
1608 }()
1609 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) {
1610 ctx = rctx
1611 return ec.resolvers.Query().Recursive(rctx, fc.Args["input"].(*RecursiveInputSlice))
1612 })
1613
1614 if resTmp == nil {
1615 return graphql.Null
1616 }
1617 res := resTmp.(*bool)
1618 fc.Result = res
1619 return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res)
1620 }
1621
1622 func (ec *executionContext) fieldContext_Query_recursive(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
1623 fc = &graphql.FieldContext{
1624 Object: "Query",
1625 Field: field,
1626 IsMethod: true,
1627 IsResolver: true,
1628 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
1629 return nil, errors.New("field of type Boolean does not have child fields")
1630 },
1631 }
1632 defer func() {
1633 if r := recover(); r != nil {
1634 err = ec.Recover(ctx, r)
1635 ec.Error(ctx, err)
1636 }
1637 }()
1638 ctx = graphql.WithFieldContext(ctx, fc)
1639 if fc.Args, err = ec.field_Query_recursive_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
1640 ec.Error(ctx, err)
1641 return fc, err
1642 }
1643 return fc, nil
1644 }
1645
1646 func (ec *executionContext) _Query_nestedInputs(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
1647 fc, err := ec.fieldContext_Query_nestedInputs(ctx, field)
1648 if err != nil {
1649 return graphql.Null
1650 }
1651 ctx = graphql.WithFieldContext(ctx, fc)
1652 defer func() {
1653 if r := recover(); r != nil {
1654 ec.Error(ctx, ec.Recover(ctx, r))
1655 ret = graphql.Null
1656 }
1657 }()
1658 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) {
1659 ctx = rctx
1660 return ec.resolvers.Query().NestedInputs(rctx, fc.Args["input"].([][]*OuterInput))
1661 })
1662
1663 if resTmp == nil {
1664 return graphql.Null
1665 }
1666 res := resTmp.(*bool)
1667 fc.Result = res
1668 return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res)
1669 }
1670
1671 func (ec *executionContext) fieldContext_Query_nestedInputs(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
1672 fc = &graphql.FieldContext{
1673 Object: "Query",
1674 Field: field,
1675 IsMethod: true,
1676 IsResolver: true,
1677 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
1678 return nil, errors.New("field of type Boolean does not have child fields")
1679 },
1680 }
1681 defer func() {
1682 if r := recover(); r != nil {
1683 err = ec.Recover(ctx, r)
1684 ec.Error(ctx, err)
1685 }
1686 }()
1687 ctx = graphql.WithFieldContext(ctx, fc)
1688 if fc.Args, err = ec.field_Query_nestedInputs_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
1689 ec.Error(ctx, err)
1690 return fc, err
1691 }
1692 return fc, nil
1693 }
1694
1695 func (ec *executionContext) _Query_nestedOutputs(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
1696 fc, err := ec.fieldContext_Query_nestedOutputs(ctx, field)
1697 if err != nil {
1698 return graphql.Null
1699 }
1700 ctx = graphql.WithFieldContext(ctx, fc)
1701 defer func() {
1702 if r := recover(); r != nil {
1703 ec.Error(ctx, ec.Recover(ctx, r))
1704 ret = graphql.Null
1705 }
1706 }()
1707 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) {
1708 ctx = rctx
1709 return ec.resolvers.Query().NestedOutputs(rctx)
1710 })
1711
1712 if resTmp == nil {
1713 return graphql.Null
1714 }
1715 res := resTmp.([][]*OuterObject)
1716 fc.Result = res
1717 return ec.marshalOOuterObject2ᚕᚕᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐOuterObject(ctx, field.Selections, res)
1718 }
1719
1720 func (ec *executionContext) fieldContext_Query_nestedOutputs(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
1721 fc = &graphql.FieldContext{
1722 Object: "Query",
1723 Field: field,
1724 IsMethod: true,
1725 IsResolver: true,
1726 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
1727 switch field.Name {
1728 case "inner":
1729 return ec.fieldContext_OuterObject_inner(ctx, field)
1730 }
1731 return nil, fmt.Errorf("no field named %q was found under type OuterObject", field.Name)
1732 },
1733 }
1734 return fc, nil
1735 }
1736
1737 func (ec *executionContext) _Query_modelMethods(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
1738 fc, err := ec.fieldContext_Query_modelMethods(ctx, field)
1739 if err != nil {
1740 return graphql.Null
1741 }
1742 ctx = graphql.WithFieldContext(ctx, fc)
1743 defer func() {
1744 if r := recover(); r != nil {
1745 ec.Error(ctx, ec.Recover(ctx, r))
1746 ret = graphql.Null
1747 }
1748 }()
1749 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) {
1750 ctx = rctx
1751 return ec.resolvers.Query().ModelMethods(rctx)
1752 })
1753
1754 if resTmp == nil {
1755 return graphql.Null
1756 }
1757 res := resTmp.(*ModelMethods)
1758 fc.Result = res
1759 return ec.marshalOModelMethods2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐModelMethods(ctx, field.Selections, res)
1760 }
1761
1762 func (ec *executionContext) fieldContext_Query_modelMethods(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
1763 fc = &graphql.FieldContext{
1764 Object: "Query",
1765 Field: field,
1766 IsMethod: true,
1767 IsResolver: true,
1768 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
1769 switch field.Name {
1770 case "resolverField":
1771 return ec.fieldContext_ModelMethods_resolverField(ctx, field)
1772 case "noContext":
1773 return ec.fieldContext_ModelMethods_noContext(ctx, field)
1774 case "withContext":
1775 return ec.fieldContext_ModelMethods_withContext(ctx, field)
1776 }
1777 return nil, fmt.Errorf("no field named %q was found under type ModelMethods", field.Name)
1778 },
1779 }
1780 return fc, nil
1781 }
1782
1783 func (ec *executionContext) _Query_user(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
1784 fc, err := ec.fieldContext_Query_user(ctx, field)
1785 if err != nil {
1786 return graphql.Null
1787 }
1788 ctx = graphql.WithFieldContext(ctx, fc)
1789 defer func() {
1790 if r := recover(); r != nil {
1791 ec.Error(ctx, ec.Recover(ctx, r))
1792 ret = graphql.Null
1793 }
1794 }()
1795 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) {
1796 ctx = rctx
1797 return ec.resolvers.Query().User(rctx, fc.Args["id"].(int))
1798 })
1799
1800 if resTmp == nil {
1801 if !graphql.HasFieldError(ctx, fc) {
1802 ec.Errorf(ctx, "must not be null")
1803 }
1804 return graphql.Null
1805 }
1806 res := resTmp.(*User)
1807 fc.Result = res
1808 return ec.marshalNUser2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐUser(ctx, field.Selections, res)
1809 }
1810
1811 func (ec *executionContext) fieldContext_Query_user(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
1812 fc = &graphql.FieldContext{
1813 Object: "Query",
1814 Field: field,
1815 IsMethod: true,
1816 IsResolver: true,
1817 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
1818 switch field.Name {
1819 case "id":
1820 return ec.fieldContext_User_id(ctx, field)
1821 case "friends":
1822 return ec.fieldContext_User_friends(ctx, field)
1823 case "created":
1824 return ec.fieldContext_User_created(ctx, field)
1825 case "updated":
1826 return ec.fieldContext_User_updated(ctx, field)
1827 case "pets":
1828 return ec.fieldContext_User_pets(ctx, field)
1829 }
1830 return nil, fmt.Errorf("no field named %q was found under type User", field.Name)
1831 },
1832 }
1833 defer func() {
1834 if r := recover(); r != nil {
1835 err = ec.Recover(ctx, r)
1836 ec.Error(ctx, err)
1837 }
1838 }()
1839 ctx = graphql.WithFieldContext(ctx, fc)
1840 if fc.Args, err = ec.field_Query_user_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
1841 ec.Error(ctx, err)
1842 return fc, err
1843 }
1844 return fc, nil
1845 }
1846
1847 func (ec *executionContext) _Query_nullableArg(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
1848 fc, err := ec.fieldContext_Query_nullableArg(ctx, field)
1849 if err != nil {
1850 return graphql.Null
1851 }
1852 ctx = graphql.WithFieldContext(ctx, fc)
1853 defer func() {
1854 if r := recover(); r != nil {
1855 ec.Error(ctx, ec.Recover(ctx, r))
1856 ret = graphql.Null
1857 }
1858 }()
1859 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) {
1860 ctx = rctx
1861 return ec.resolvers.Query().NullableArg(rctx, fc.Args["arg"].(*int))
1862 })
1863
1864 if resTmp == nil {
1865 return graphql.Null
1866 }
1867 res := resTmp.(*string)
1868 fc.Result = res
1869 return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
1870 }
1871
1872 func (ec *executionContext) fieldContext_Query_nullableArg(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
1873 fc = &graphql.FieldContext{
1874 Object: "Query",
1875 Field: field,
1876 IsMethod: true,
1877 IsResolver: true,
1878 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
1879 return nil, errors.New("field of type String does not have child fields")
1880 },
1881 }
1882 defer func() {
1883 if r := recover(); r != nil {
1884 err = ec.Recover(ctx, r)
1885 ec.Error(ctx, err)
1886 }
1887 }()
1888 ctx = graphql.WithFieldContext(ctx, fc)
1889 if fc.Args, err = ec.field_Query_nullableArg_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
1890 ec.Error(ctx, err)
1891 return fc, err
1892 }
1893 return fc, nil
1894 }
1895
1896 func (ec *executionContext) _Query_inputSlice(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
1897 fc, err := ec.fieldContext_Query_inputSlice(ctx, field)
1898 if err != nil {
1899 return graphql.Null
1900 }
1901 ctx = graphql.WithFieldContext(ctx, fc)
1902 defer func() {
1903 if r := recover(); r != nil {
1904 ec.Error(ctx, ec.Recover(ctx, r))
1905 ret = graphql.Null
1906 }
1907 }()
1908 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) {
1909 ctx = rctx
1910 return ec.resolvers.Query().InputSlice(rctx, fc.Args["arg"].([]string))
1911 })
1912
1913 if resTmp == nil {
1914 if !graphql.HasFieldError(ctx, fc) {
1915 ec.Errorf(ctx, "must not be null")
1916 }
1917 return graphql.Null
1918 }
1919 res := resTmp.(bool)
1920 fc.Result = res
1921 return ec.marshalNBoolean2bool(ctx, field.Selections, res)
1922 }
1923
1924 func (ec *executionContext) fieldContext_Query_inputSlice(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
1925 fc = &graphql.FieldContext{
1926 Object: "Query",
1927 Field: field,
1928 IsMethod: true,
1929 IsResolver: true,
1930 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
1931 return nil, errors.New("field of type Boolean does not have child fields")
1932 },
1933 }
1934 defer func() {
1935 if r := recover(); r != nil {
1936 err = ec.Recover(ctx, r)
1937 ec.Error(ctx, err)
1938 }
1939 }()
1940 ctx = graphql.WithFieldContext(ctx, fc)
1941 if fc.Args, err = ec.field_Query_inputSlice_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
1942 ec.Error(ctx, err)
1943 return fc, err
1944 }
1945 return fc, nil
1946 }
1947
1948 func (ec *executionContext) _Query_inputNullableSlice(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
1949 fc, err := ec.fieldContext_Query_inputNullableSlice(ctx, field)
1950 if err != nil {
1951 return graphql.Null
1952 }
1953 ctx = graphql.WithFieldContext(ctx, fc)
1954 defer func() {
1955 if r := recover(); r != nil {
1956 ec.Error(ctx, ec.Recover(ctx, r))
1957 ret = graphql.Null
1958 }
1959 }()
1960 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) {
1961 ctx = rctx
1962 return ec.resolvers.Query().InputNullableSlice(rctx, fc.Args["arg"].([]string))
1963 })
1964
1965 if resTmp == nil {
1966 if !graphql.HasFieldError(ctx, fc) {
1967 ec.Errorf(ctx, "must not be null")
1968 }
1969 return graphql.Null
1970 }
1971 res := resTmp.(bool)
1972 fc.Result = res
1973 return ec.marshalNBoolean2bool(ctx, field.Selections, res)
1974 }
1975
1976 func (ec *executionContext) fieldContext_Query_inputNullableSlice(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
1977 fc = &graphql.FieldContext{
1978 Object: "Query",
1979 Field: field,
1980 IsMethod: true,
1981 IsResolver: true,
1982 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
1983 return nil, errors.New("field of type Boolean does not have child fields")
1984 },
1985 }
1986 defer func() {
1987 if r := recover(); r != nil {
1988 err = ec.Recover(ctx, r)
1989 ec.Error(ctx, err)
1990 }
1991 }()
1992 ctx = graphql.WithFieldContext(ctx, fc)
1993 if fc.Args, err = ec.field_Query_inputNullableSlice_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
1994 ec.Error(ctx, err)
1995 return fc, err
1996 }
1997 return fc, nil
1998 }
1999
2000 func (ec *executionContext) _Query_inputOmittable(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
2001 fc, err := ec.fieldContext_Query_inputOmittable(ctx, field)
2002 if err != nil {
2003 return graphql.Null
2004 }
2005 ctx = graphql.WithFieldContext(ctx, fc)
2006 defer func() {
2007 if r := recover(); r != nil {
2008 ec.Error(ctx, ec.Recover(ctx, r))
2009 ret = graphql.Null
2010 }
2011 }()
2012 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) {
2013 ctx = rctx
2014 return ec.resolvers.Query().InputOmittable(rctx, fc.Args["arg"].(OmittableInput))
2015 })
2016
2017 if resTmp == nil {
2018 if !graphql.HasFieldError(ctx, fc) {
2019 ec.Errorf(ctx, "must not be null")
2020 }
2021 return graphql.Null
2022 }
2023 res := resTmp.(string)
2024 fc.Result = res
2025 return ec.marshalNString2string(ctx, field.Selections, res)
2026 }
2027
2028 func (ec *executionContext) fieldContext_Query_inputOmittable(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
2029 fc = &graphql.FieldContext{
2030 Object: "Query",
2031 Field: field,
2032 IsMethod: true,
2033 IsResolver: true,
2034 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
2035 return nil, errors.New("field of type String does not have child fields")
2036 },
2037 }
2038 defer func() {
2039 if r := recover(); r != nil {
2040 err = ec.Recover(ctx, r)
2041 ec.Error(ctx, err)
2042 }
2043 }()
2044 ctx = graphql.WithFieldContext(ctx, fc)
2045 if fc.Args, err = ec.field_Query_inputOmittable_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
2046 ec.Error(ctx, err)
2047 return fc, err
2048 }
2049 return fc, nil
2050 }
2051
2052 func (ec *executionContext) _Query_shapeUnion(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
2053 fc, err := ec.fieldContext_Query_shapeUnion(ctx, field)
2054 if err != nil {
2055 return graphql.Null
2056 }
2057 ctx = graphql.WithFieldContext(ctx, fc)
2058 defer func() {
2059 if r := recover(); r != nil {
2060 ec.Error(ctx, ec.Recover(ctx, r))
2061 ret = graphql.Null
2062 }
2063 }()
2064 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) {
2065 ctx = rctx
2066 return ec.resolvers.Query().ShapeUnion(rctx)
2067 })
2068
2069 if resTmp == nil {
2070 if !graphql.HasFieldError(ctx, fc) {
2071 ec.Errorf(ctx, "must not be null")
2072 }
2073 return graphql.Null
2074 }
2075 res := resTmp.(ShapeUnion)
2076 fc.Result = res
2077 return ec.marshalNShapeUnion2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐShapeUnion(ctx, field.Selections, res)
2078 }
2079
2080 func (ec *executionContext) fieldContext_Query_shapeUnion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
2081 fc = &graphql.FieldContext{
2082 Object: "Query",
2083 Field: field,
2084 IsMethod: true,
2085 IsResolver: true,
2086 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
2087 return nil, errors.New("field of type ShapeUnion does not have child fields")
2088 },
2089 }
2090 return fc, nil
2091 }
2092
2093 func (ec *executionContext) _Query_autobind(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
2094 fc, err := ec.fieldContext_Query_autobind(ctx, field)
2095 if err != nil {
2096 return graphql.Null
2097 }
2098 ctx = graphql.WithFieldContext(ctx, fc)
2099 defer func() {
2100 if r := recover(); r != nil {
2101 ec.Error(ctx, ec.Recover(ctx, r))
2102 ret = graphql.Null
2103 }
2104 }()
2105 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) {
2106 ctx = rctx
2107 return ec.resolvers.Query().Autobind(rctx)
2108 })
2109
2110 if resTmp == nil {
2111 return graphql.Null
2112 }
2113 res := resTmp.(*Autobind)
2114 fc.Result = res
2115 return ec.marshalOAutobind2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐAutobind(ctx, field.Selections, res)
2116 }
2117
2118 func (ec *executionContext) fieldContext_Query_autobind(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
2119 fc = &graphql.FieldContext{
2120 Object: "Query",
2121 Field: field,
2122 IsMethod: true,
2123 IsResolver: true,
2124 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
2125 switch field.Name {
2126 case "int":
2127 return ec.fieldContext_Autobind_int(ctx, field)
2128 case "int32":
2129 return ec.fieldContext_Autobind_int32(ctx, field)
2130 case "int64":
2131 return ec.fieldContext_Autobind_int64(ctx, field)
2132 case "idStr":
2133 return ec.fieldContext_Autobind_idStr(ctx, field)
2134 case "idInt":
2135 return ec.fieldContext_Autobind_idInt(ctx, field)
2136 }
2137 return nil, fmt.Errorf("no field named %q was found under type Autobind", field.Name)
2138 },
2139 }
2140 return fc, nil
2141 }
2142
2143 func (ec *executionContext) _Query_deprecatedField(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
2144 fc, err := ec.fieldContext_Query_deprecatedField(ctx, field)
2145 if err != nil {
2146 return graphql.Null
2147 }
2148 ctx = graphql.WithFieldContext(ctx, fc)
2149 defer func() {
2150 if r := recover(); r != nil {
2151 ec.Error(ctx, ec.Recover(ctx, r))
2152 ret = graphql.Null
2153 }
2154 }()
2155 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) {
2156 ctx = rctx
2157 return ec.resolvers.Query().DeprecatedField(rctx)
2158 })
2159
2160 if resTmp == nil {
2161 if !graphql.HasFieldError(ctx, fc) {
2162 ec.Errorf(ctx, "must not be null")
2163 }
2164 return graphql.Null
2165 }
2166 res := resTmp.(string)
2167 fc.Result = res
2168 return ec.marshalNString2string(ctx, field.Selections, res)
2169 }
2170
2171 func (ec *executionContext) fieldContext_Query_deprecatedField(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
2172 fc = &graphql.FieldContext{
2173 Object: "Query",
2174 Field: field,
2175 IsMethod: true,
2176 IsResolver: true,
2177 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
2178 return nil, errors.New("field of type String does not have child fields")
2179 },
2180 }
2181 return fc, nil
2182 }
2183
2184 func (ec *executionContext) _Query_overlapping(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
2185 fc, err := ec.fieldContext_Query_overlapping(ctx, field)
2186 if err != nil {
2187 return graphql.Null
2188 }
2189 ctx = graphql.WithFieldContext(ctx, fc)
2190 defer func() {
2191 if r := recover(); r != nil {
2192 ec.Error(ctx, ec.Recover(ctx, r))
2193 ret = graphql.Null
2194 }
2195 }()
2196 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) {
2197 ctx = rctx
2198 return ec.resolvers.Query().Overlapping(rctx)
2199 })
2200
2201 if resTmp == nil {
2202 return graphql.Null
2203 }
2204 res := resTmp.(*OverlappingFields)
2205 fc.Result = res
2206 return ec.marshalOOverlappingFields2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐOverlappingFields(ctx, field.Selections, res)
2207 }
2208
2209 func (ec *executionContext) fieldContext_Query_overlapping(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
2210 fc = &graphql.FieldContext{
2211 Object: "Query",
2212 Field: field,
2213 IsMethod: true,
2214 IsResolver: true,
2215 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
2216 switch field.Name {
2217 case "oneFoo":
2218 return ec.fieldContext_OverlappingFields_oneFoo(ctx, field)
2219 case "twoFoo":
2220 return ec.fieldContext_OverlappingFields_twoFoo(ctx, field)
2221 case "oldFoo":
2222 return ec.fieldContext_OverlappingFields_oldFoo(ctx, field)
2223 case "newFoo":
2224 return ec.fieldContext_OverlappingFields_newFoo(ctx, field)
2225 case "new_foo":
2226 return ec.fieldContext_OverlappingFields_new_foo(ctx, field)
2227 }
2228 return nil, fmt.Errorf("no field named %q was found under type OverlappingFields", field.Name)
2229 },
2230 }
2231 return fc, nil
2232 }
2233
2234 func (ec *executionContext) _Query_defaultParameters(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
2235 fc, err := ec.fieldContext_Query_defaultParameters(ctx, field)
2236 if err != nil {
2237 return graphql.Null
2238 }
2239 ctx = graphql.WithFieldContext(ctx, fc)
2240 defer func() {
2241 if r := recover(); r != nil {
2242 ec.Error(ctx, ec.Recover(ctx, r))
2243 ret = graphql.Null
2244 }
2245 }()
2246 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) {
2247 ctx = rctx
2248 return ec.resolvers.Query().DefaultParameters(rctx, fc.Args["falsyBoolean"].(*bool), fc.Args["truthyBoolean"].(*bool))
2249 })
2250
2251 if resTmp == nil {
2252 if !graphql.HasFieldError(ctx, fc) {
2253 ec.Errorf(ctx, "must not be null")
2254 }
2255 return graphql.Null
2256 }
2257 res := resTmp.(*DefaultParametersMirror)
2258 fc.Result = res
2259 return ec.marshalNDefaultParametersMirror2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐDefaultParametersMirror(ctx, field.Selections, res)
2260 }
2261
2262 func (ec *executionContext) fieldContext_Query_defaultParameters(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
2263 fc = &graphql.FieldContext{
2264 Object: "Query",
2265 Field: field,
2266 IsMethod: true,
2267 IsResolver: true,
2268 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
2269 switch field.Name {
2270 case "falsyBoolean":
2271 return ec.fieldContext_DefaultParametersMirror_falsyBoolean(ctx, field)
2272 case "truthyBoolean":
2273 return ec.fieldContext_DefaultParametersMirror_truthyBoolean(ctx, field)
2274 }
2275 return nil, fmt.Errorf("no field named %q was found under type DefaultParametersMirror", field.Name)
2276 },
2277 }
2278 defer func() {
2279 if r := recover(); r != nil {
2280 err = ec.Recover(ctx, r)
2281 ec.Error(ctx, err)
2282 }
2283 }()
2284 ctx = graphql.WithFieldContext(ctx, fc)
2285 if fc.Args, err = ec.field_Query_defaultParameters_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
2286 ec.Error(ctx, err)
2287 return fc, err
2288 }
2289 return fc, nil
2290 }
2291
2292 func (ec *executionContext) _Query_deferCase1(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
2293 fc, err := ec.fieldContext_Query_deferCase1(ctx, field)
2294 if err != nil {
2295 return graphql.Null
2296 }
2297 ctx = graphql.WithFieldContext(ctx, fc)
2298 defer func() {
2299 if r := recover(); r != nil {
2300 ec.Error(ctx, ec.Recover(ctx, r))
2301 ret = graphql.Null
2302 }
2303 }()
2304 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) {
2305 ctx = rctx
2306 return ec.resolvers.Query().DeferCase1(rctx)
2307 })
2308
2309 if resTmp == nil {
2310 return graphql.Null
2311 }
2312 res := resTmp.(*DeferModel)
2313 fc.Result = res
2314 return ec.marshalODeferModel2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐDeferModel(ctx, field.Selections, res)
2315 }
2316
2317 func (ec *executionContext) fieldContext_Query_deferCase1(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
2318 fc = &graphql.FieldContext{
2319 Object: "Query",
2320 Field: field,
2321 IsMethod: true,
2322 IsResolver: true,
2323 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
2324 switch field.Name {
2325 case "id":
2326 return ec.fieldContext_DeferModel_id(ctx, field)
2327 case "name":
2328 return ec.fieldContext_DeferModel_name(ctx, field)
2329 case "values":
2330 return ec.fieldContext_DeferModel_values(ctx, field)
2331 }
2332 return nil, fmt.Errorf("no field named %q was found under type DeferModel", field.Name)
2333 },
2334 }
2335 return fc, nil
2336 }
2337
2338 func (ec *executionContext) _Query_deferCase2(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
2339 fc, err := ec.fieldContext_Query_deferCase2(ctx, field)
2340 if err != nil {
2341 return graphql.Null
2342 }
2343 ctx = graphql.WithFieldContext(ctx, fc)
2344 defer func() {
2345 if r := recover(); r != nil {
2346 ec.Error(ctx, ec.Recover(ctx, r))
2347 ret = graphql.Null
2348 }
2349 }()
2350 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) {
2351 ctx = rctx
2352 return ec.resolvers.Query().DeferCase2(rctx)
2353 })
2354
2355 if resTmp == nil {
2356 return graphql.Null
2357 }
2358 res := resTmp.([]*DeferModel)
2359 fc.Result = res
2360 return ec.marshalODeferModel2ᚕᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐDeferModelᚄ(ctx, field.Selections, res)
2361 }
2362
2363 func (ec *executionContext) fieldContext_Query_deferCase2(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
2364 fc = &graphql.FieldContext{
2365 Object: "Query",
2366 Field: field,
2367 IsMethod: true,
2368 IsResolver: true,
2369 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
2370 switch field.Name {
2371 case "id":
2372 return ec.fieldContext_DeferModel_id(ctx, field)
2373 case "name":
2374 return ec.fieldContext_DeferModel_name(ctx, field)
2375 case "values":
2376 return ec.fieldContext_DeferModel_values(ctx, field)
2377 }
2378 return nil, fmt.Errorf("no field named %q was found under type DeferModel", field.Name)
2379 },
2380 }
2381 return fc, nil
2382 }
2383
2384 func (ec *executionContext) _Query_directiveArg(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
2385 fc, err := ec.fieldContext_Query_directiveArg(ctx, field)
2386 if err != nil {
2387 return graphql.Null
2388 }
2389 ctx = graphql.WithFieldContext(ctx, fc)
2390 defer func() {
2391 if r := recover(); r != nil {
2392 ec.Error(ctx, ec.Recover(ctx, r))
2393 ret = graphql.Null
2394 }
2395 }()
2396 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) {
2397 ctx = rctx
2398 return ec.resolvers.Query().DirectiveArg(rctx, fc.Args["arg"].(string))
2399 })
2400
2401 if resTmp == nil {
2402 return graphql.Null
2403 }
2404 res := resTmp.(*string)
2405 fc.Result = res
2406 return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
2407 }
2408
2409 func (ec *executionContext) fieldContext_Query_directiveArg(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
2410 fc = &graphql.FieldContext{
2411 Object: "Query",
2412 Field: field,
2413 IsMethod: true,
2414 IsResolver: true,
2415 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
2416 return nil, errors.New("field of type String does not have child fields")
2417 },
2418 }
2419 defer func() {
2420 if r := recover(); r != nil {
2421 err = ec.Recover(ctx, r)
2422 ec.Error(ctx, err)
2423 }
2424 }()
2425 ctx = graphql.WithFieldContext(ctx, fc)
2426 if fc.Args, err = ec.field_Query_directiveArg_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
2427 ec.Error(ctx, err)
2428 return fc, err
2429 }
2430 return fc, nil
2431 }
2432
2433 func (ec *executionContext) _Query_directiveNullableArg(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
2434 fc, err := ec.fieldContext_Query_directiveNullableArg(ctx, field)
2435 if err != nil {
2436 return graphql.Null
2437 }
2438 ctx = graphql.WithFieldContext(ctx, fc)
2439 defer func() {
2440 if r := recover(); r != nil {
2441 ec.Error(ctx, ec.Recover(ctx, r))
2442 ret = graphql.Null
2443 }
2444 }()
2445 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) {
2446 ctx = rctx
2447 return ec.resolvers.Query().DirectiveNullableArg(rctx, fc.Args["arg"].(*int), fc.Args["arg2"].(*int), fc.Args["arg3"].(*string))
2448 })
2449
2450 if resTmp == nil {
2451 return graphql.Null
2452 }
2453 res := resTmp.(*string)
2454 fc.Result = res
2455 return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
2456 }
2457
2458 func (ec *executionContext) fieldContext_Query_directiveNullableArg(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
2459 fc = &graphql.FieldContext{
2460 Object: "Query",
2461 Field: field,
2462 IsMethod: true,
2463 IsResolver: true,
2464 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
2465 return nil, errors.New("field of type String does not have child fields")
2466 },
2467 }
2468 defer func() {
2469 if r := recover(); r != nil {
2470 err = ec.Recover(ctx, r)
2471 ec.Error(ctx, err)
2472 }
2473 }()
2474 ctx = graphql.WithFieldContext(ctx, fc)
2475 if fc.Args, err = ec.field_Query_directiveNullableArg_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
2476 ec.Error(ctx, err)
2477 return fc, err
2478 }
2479 return fc, nil
2480 }
2481
2482 func (ec *executionContext) _Query_directiveInputNullable(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
2483 fc, err := ec.fieldContext_Query_directiveInputNullable(ctx, field)
2484 if err != nil {
2485 return graphql.Null
2486 }
2487 ctx = graphql.WithFieldContext(ctx, fc)
2488 defer func() {
2489 if r := recover(); r != nil {
2490 ec.Error(ctx, ec.Recover(ctx, r))
2491 ret = graphql.Null
2492 }
2493 }()
2494 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) {
2495 ctx = rctx
2496 return ec.resolvers.Query().DirectiveInputNullable(rctx, fc.Args["arg"].(*InputDirectives))
2497 })
2498
2499 if resTmp == nil {
2500 return graphql.Null
2501 }
2502 res := resTmp.(*string)
2503 fc.Result = res
2504 return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
2505 }
2506
2507 func (ec *executionContext) fieldContext_Query_directiveInputNullable(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
2508 fc = &graphql.FieldContext{
2509 Object: "Query",
2510 Field: field,
2511 IsMethod: true,
2512 IsResolver: true,
2513 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
2514 return nil, errors.New("field of type String does not have child fields")
2515 },
2516 }
2517 defer func() {
2518 if r := recover(); r != nil {
2519 err = ec.Recover(ctx, r)
2520 ec.Error(ctx, err)
2521 }
2522 }()
2523 ctx = graphql.WithFieldContext(ctx, fc)
2524 if fc.Args, err = ec.field_Query_directiveInputNullable_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
2525 ec.Error(ctx, err)
2526 return fc, err
2527 }
2528 return fc, nil
2529 }
2530
2531 func (ec *executionContext) _Query_directiveInput(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
2532 fc, err := ec.fieldContext_Query_directiveInput(ctx, field)
2533 if err != nil {
2534 return graphql.Null
2535 }
2536 ctx = graphql.WithFieldContext(ctx, fc)
2537 defer func() {
2538 if r := recover(); r != nil {
2539 ec.Error(ctx, ec.Recover(ctx, r))
2540 ret = graphql.Null
2541 }
2542 }()
2543 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) {
2544 ctx = rctx
2545 return ec.resolvers.Query().DirectiveInput(rctx, fc.Args["arg"].(InputDirectives))
2546 })
2547
2548 if resTmp == nil {
2549 return graphql.Null
2550 }
2551 res := resTmp.(*string)
2552 fc.Result = res
2553 return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
2554 }
2555
2556 func (ec *executionContext) fieldContext_Query_directiveInput(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
2557 fc = &graphql.FieldContext{
2558 Object: "Query",
2559 Field: field,
2560 IsMethod: true,
2561 IsResolver: true,
2562 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
2563 return nil, errors.New("field of type String does not have child fields")
2564 },
2565 }
2566 defer func() {
2567 if r := recover(); r != nil {
2568 err = ec.Recover(ctx, r)
2569 ec.Error(ctx, err)
2570 }
2571 }()
2572 ctx = graphql.WithFieldContext(ctx, fc)
2573 if fc.Args, err = ec.field_Query_directiveInput_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
2574 ec.Error(ctx, err)
2575 return fc, err
2576 }
2577 return fc, nil
2578 }
2579
2580 func (ec *executionContext) _Query_directiveInputType(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
2581 fc, err := ec.fieldContext_Query_directiveInputType(ctx, field)
2582 if err != nil {
2583 return graphql.Null
2584 }
2585 ctx = graphql.WithFieldContext(ctx, fc)
2586 defer func() {
2587 if r := recover(); r != nil {
2588 ec.Error(ctx, ec.Recover(ctx, r))
2589 ret = graphql.Null
2590 }
2591 }()
2592 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) {
2593 ctx = rctx
2594 return ec.resolvers.Query().DirectiveInputType(rctx, fc.Args["arg"].(InnerInput))
2595 })
2596
2597 if resTmp == nil {
2598 return graphql.Null
2599 }
2600 res := resTmp.(*string)
2601 fc.Result = res
2602 return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
2603 }
2604
2605 func (ec *executionContext) fieldContext_Query_directiveInputType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
2606 fc = &graphql.FieldContext{
2607 Object: "Query",
2608 Field: field,
2609 IsMethod: true,
2610 IsResolver: true,
2611 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
2612 return nil, errors.New("field of type String does not have child fields")
2613 },
2614 }
2615 defer func() {
2616 if r := recover(); r != nil {
2617 err = ec.Recover(ctx, r)
2618 ec.Error(ctx, err)
2619 }
2620 }()
2621 ctx = graphql.WithFieldContext(ctx, fc)
2622 if fc.Args, err = ec.field_Query_directiveInputType_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
2623 ec.Error(ctx, err)
2624 return fc, err
2625 }
2626 return fc, nil
2627 }
2628
2629 func (ec *executionContext) _Query_directiveObject(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
2630 fc, err := ec.fieldContext_Query_directiveObject(ctx, field)
2631 if err != nil {
2632 return graphql.Null
2633 }
2634 ctx = graphql.WithFieldContext(ctx, fc)
2635 defer func() {
2636 if r := recover(); r != nil {
2637 ec.Error(ctx, ec.Recover(ctx, r))
2638 ret = graphql.Null
2639 }
2640 }()
2641 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) {
2642 directive0 := func(rctx context.Context) (interface{}, error) {
2643 ctx = rctx
2644 return ec.resolvers.Query().DirectiveObject(rctx)
2645 }
2646 directive1 := func(ctx context.Context) (interface{}, error) {
2647 location, err := ec.unmarshalNString2string(ctx, "order1_1")
2648 if err != nil {
2649 return nil, err
2650 }
2651 if ec.directives.Order1 == nil {
2652 return nil, errors.New("directive order1 is not implemented")
2653 }
2654 return ec.directives.Order1(ctx, nil, directive0, location)
2655 }
2656 directive2 := func(ctx context.Context) (interface{}, error) {
2657 location, err := ec.unmarshalNString2string(ctx, "order1_2")
2658 if err != nil {
2659 return nil, err
2660 }
2661 if ec.directives.Order1 == nil {
2662 return nil, errors.New("directive order1 is not implemented")
2663 }
2664 return ec.directives.Order1(ctx, nil, directive1, location)
2665 }
2666 directive3 := func(ctx context.Context) (interface{}, error) {
2667 location, err := ec.unmarshalNString2string(ctx, "order2_1")
2668 if err != nil {
2669 return nil, err
2670 }
2671 if ec.directives.Order2 == nil {
2672 return nil, errors.New("directive order2 is not implemented")
2673 }
2674 return ec.directives.Order2(ctx, nil, directive2, location)
2675 }
2676 directive4 := func(ctx context.Context) (interface{}, error) {
2677 location, err := ec.unmarshalNString2string(ctx, "Query_field")
2678 if err != nil {
2679 return nil, err
2680 }
2681 if ec.directives.Order1 == nil {
2682 return nil, errors.New("directive order1 is not implemented")
2683 }
2684 return ec.directives.Order1(ctx, nil, directive3, location)
2685 }
2686
2687 tmp, err := directive4(rctx)
2688 if err != nil {
2689 return nil, graphql.ErrorOnPath(ctx, err)
2690 }
2691 if tmp == nil {
2692 return nil, nil
2693 }
2694 if data, ok := tmp.(*ObjectDirectives); ok {
2695 return data, nil
2696 }
2697 return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/99designs/gqlgen/codegen/testserver/followschema.ObjectDirectives`, tmp)
2698 })
2699
2700 if resTmp == nil {
2701 return graphql.Null
2702 }
2703 res := resTmp.(*ObjectDirectives)
2704 fc.Result = res
2705 return ec.marshalOObjectDirectives2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐObjectDirectives(ctx, field.Selections, res)
2706 }
2707
2708 func (ec *executionContext) fieldContext_Query_directiveObject(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
2709 fc = &graphql.FieldContext{
2710 Object: "Query",
2711 Field: field,
2712 IsMethod: true,
2713 IsResolver: true,
2714 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
2715 switch field.Name {
2716 case "text":
2717 return ec.fieldContext_ObjectDirectives_text(ctx, field)
2718 case "nullableText":
2719 return ec.fieldContext_ObjectDirectives_nullableText(ctx, field)
2720 case "order":
2721 return ec.fieldContext_ObjectDirectives_order(ctx, field)
2722 }
2723 return nil, fmt.Errorf("no field named %q was found under type ObjectDirectives", field.Name)
2724 },
2725 }
2726 return fc, nil
2727 }
2728
2729 func (ec *executionContext) _Query_directiveObjectWithCustomGoModel(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
2730 fc, err := ec.fieldContext_Query_directiveObjectWithCustomGoModel(ctx, field)
2731 if err != nil {
2732 return graphql.Null
2733 }
2734 ctx = graphql.WithFieldContext(ctx, fc)
2735 defer func() {
2736 if r := recover(); r != nil {
2737 ec.Error(ctx, ec.Recover(ctx, r))
2738 ret = graphql.Null
2739 }
2740 }()
2741 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) {
2742 ctx = rctx
2743 return ec.resolvers.Query().DirectiveObjectWithCustomGoModel(rctx)
2744 })
2745
2746 if resTmp == nil {
2747 return graphql.Null
2748 }
2749 res := resTmp.(*ObjectDirectivesWithCustomGoModel)
2750 fc.Result = res
2751 return ec.marshalOObjectDirectivesWithCustomGoModel2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐObjectDirectivesWithCustomGoModel(ctx, field.Selections, res)
2752 }
2753
2754 func (ec *executionContext) fieldContext_Query_directiveObjectWithCustomGoModel(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
2755 fc = &graphql.FieldContext{
2756 Object: "Query",
2757 Field: field,
2758 IsMethod: true,
2759 IsResolver: true,
2760 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
2761 switch field.Name {
2762 case "nullableText":
2763 return ec.fieldContext_ObjectDirectivesWithCustomGoModel_nullableText(ctx, field)
2764 }
2765 return nil, fmt.Errorf("no field named %q was found under type ObjectDirectivesWithCustomGoModel", field.Name)
2766 },
2767 }
2768 return fc, nil
2769 }
2770
2771 func (ec *executionContext) _Query_directiveFieldDef(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
2772 fc, err := ec.fieldContext_Query_directiveFieldDef(ctx, field)
2773 if err != nil {
2774 return graphql.Null
2775 }
2776 ctx = graphql.WithFieldContext(ctx, fc)
2777 defer func() {
2778 if r := recover(); r != nil {
2779 ec.Error(ctx, ec.Recover(ctx, r))
2780 ret = graphql.Null
2781 }
2782 }()
2783 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) {
2784 directive0 := func(rctx context.Context) (interface{}, error) {
2785 ctx = rctx
2786 return ec.resolvers.Query().DirectiveFieldDef(rctx, fc.Args["ret"].(string))
2787 }
2788 directive1 := func(ctx context.Context) (interface{}, error) {
2789 min, err := ec.unmarshalNInt2int(ctx, 1)
2790 if err != nil {
2791 return nil, err
2792 }
2793 message, err := ec.unmarshalOString2ᚖstring(ctx, "not valid")
2794 if err != nil {
2795 return nil, err
2796 }
2797 if ec.directives.Length == nil {
2798 return nil, errors.New("directive length is not implemented")
2799 }
2800 return ec.directives.Length(ctx, nil, directive0, min, nil, message)
2801 }
2802
2803 tmp, err := directive1(rctx)
2804 if err != nil {
2805 return nil, graphql.ErrorOnPath(ctx, err)
2806 }
2807 if tmp == nil {
2808 return nil, nil
2809 }
2810 if data, ok := tmp.(string); ok {
2811 return data, nil
2812 }
2813 return nil, fmt.Errorf(`unexpected type %T from directive, should be string`, tmp)
2814 })
2815
2816 if resTmp == nil {
2817 if !graphql.HasFieldError(ctx, fc) {
2818 ec.Errorf(ctx, "must not be null")
2819 }
2820 return graphql.Null
2821 }
2822 res := resTmp.(string)
2823 fc.Result = res
2824 return ec.marshalNString2string(ctx, field.Selections, res)
2825 }
2826
2827 func (ec *executionContext) fieldContext_Query_directiveFieldDef(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
2828 fc = &graphql.FieldContext{
2829 Object: "Query",
2830 Field: field,
2831 IsMethod: true,
2832 IsResolver: true,
2833 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
2834 return nil, errors.New("field of type String does not have child fields")
2835 },
2836 }
2837 defer func() {
2838 if r := recover(); r != nil {
2839 err = ec.Recover(ctx, r)
2840 ec.Error(ctx, err)
2841 }
2842 }()
2843 ctx = graphql.WithFieldContext(ctx, fc)
2844 if fc.Args, err = ec.field_Query_directiveFieldDef_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
2845 ec.Error(ctx, err)
2846 return fc, err
2847 }
2848 return fc, nil
2849 }
2850
2851 func (ec *executionContext) _Query_directiveField(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
2852 fc, err := ec.fieldContext_Query_directiveField(ctx, field)
2853 if err != nil {
2854 return graphql.Null
2855 }
2856 ctx = graphql.WithFieldContext(ctx, fc)
2857 defer func() {
2858 if r := recover(); r != nil {
2859 ec.Error(ctx, ec.Recover(ctx, r))
2860 ret = graphql.Null
2861 }
2862 }()
2863 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) {
2864 ctx = rctx
2865 return ec.resolvers.Query().DirectiveField(rctx)
2866 })
2867
2868 if resTmp == nil {
2869 return graphql.Null
2870 }
2871 res := resTmp.(*string)
2872 fc.Result = res
2873 return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
2874 }
2875
2876 func (ec *executionContext) fieldContext_Query_directiveField(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
2877 fc = &graphql.FieldContext{
2878 Object: "Query",
2879 Field: field,
2880 IsMethod: true,
2881 IsResolver: true,
2882 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
2883 return nil, errors.New("field of type String does not have child fields")
2884 },
2885 }
2886 return fc, nil
2887 }
2888
2889 func (ec *executionContext) _Query_directiveDouble(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
2890 fc, err := ec.fieldContext_Query_directiveDouble(ctx, field)
2891 if err != nil {
2892 return graphql.Null
2893 }
2894 ctx = graphql.WithFieldContext(ctx, fc)
2895 defer func() {
2896 if r := recover(); r != nil {
2897 ec.Error(ctx, ec.Recover(ctx, r))
2898 ret = graphql.Null
2899 }
2900 }()
2901 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) {
2902 directive0 := func(rctx context.Context) (interface{}, error) {
2903 ctx = rctx
2904 return ec.resolvers.Query().DirectiveDouble(rctx)
2905 }
2906 directive1 := func(ctx context.Context) (interface{}, error) {
2907 if ec.directives.Directive1 == nil {
2908 return nil, errors.New("directive directive1 is not implemented")
2909 }
2910 return ec.directives.Directive1(ctx, nil, directive0)
2911 }
2912 directive2 := func(ctx context.Context) (interface{}, error) {
2913 if ec.directives.Directive2 == nil {
2914 return nil, errors.New("directive directive2 is not implemented")
2915 }
2916 return ec.directives.Directive2(ctx, nil, directive1)
2917 }
2918
2919 tmp, err := directive2(rctx)
2920 if err != nil {
2921 return nil, graphql.ErrorOnPath(ctx, err)
2922 }
2923 if tmp == nil {
2924 return nil, nil
2925 }
2926 if data, ok := tmp.(*string); ok {
2927 return data, nil
2928 }
2929 return nil, fmt.Errorf(`unexpected type %T from directive, should be *string`, tmp)
2930 })
2931
2932 if resTmp == nil {
2933 return graphql.Null
2934 }
2935 res := resTmp.(*string)
2936 fc.Result = res
2937 return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
2938 }
2939
2940 func (ec *executionContext) fieldContext_Query_directiveDouble(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
2941 fc = &graphql.FieldContext{
2942 Object: "Query",
2943 Field: field,
2944 IsMethod: true,
2945 IsResolver: true,
2946 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
2947 return nil, errors.New("field of type String does not have child fields")
2948 },
2949 }
2950 return fc, nil
2951 }
2952
2953 func (ec *executionContext) _Query_directiveUnimplemented(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
2954 fc, err := ec.fieldContext_Query_directiveUnimplemented(ctx, field)
2955 if err != nil {
2956 return graphql.Null
2957 }
2958 ctx = graphql.WithFieldContext(ctx, fc)
2959 defer func() {
2960 if r := recover(); r != nil {
2961 ec.Error(ctx, ec.Recover(ctx, r))
2962 ret = graphql.Null
2963 }
2964 }()
2965 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) {
2966 directive0 := func(rctx context.Context) (interface{}, error) {
2967 ctx = rctx
2968 return ec.resolvers.Query().DirectiveUnimplemented(rctx)
2969 }
2970 directive1 := func(ctx context.Context) (interface{}, error) {
2971 if ec.directives.Unimplemented == nil {
2972 return nil, errors.New("directive unimplemented is not implemented")
2973 }
2974 return ec.directives.Unimplemented(ctx, nil, directive0)
2975 }
2976
2977 tmp, err := directive1(rctx)
2978 if err != nil {
2979 return nil, graphql.ErrorOnPath(ctx, err)
2980 }
2981 if tmp == nil {
2982 return nil, nil
2983 }
2984 if data, ok := tmp.(*string); ok {
2985 return data, nil
2986 }
2987 return nil, fmt.Errorf(`unexpected type %T from directive, should be *string`, tmp)
2988 })
2989
2990 if resTmp == nil {
2991 return graphql.Null
2992 }
2993 res := resTmp.(*string)
2994 fc.Result = res
2995 return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
2996 }
2997
2998 func (ec *executionContext) fieldContext_Query_directiveUnimplemented(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
2999 fc = &graphql.FieldContext{
3000 Object: "Query",
3001 Field: field,
3002 IsMethod: true,
3003 IsResolver: true,
3004 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
3005 return nil, errors.New("field of type String does not have child fields")
3006 },
3007 }
3008 return fc, nil
3009 }
3010
3011 func (ec *executionContext) _Query_embeddedCase1(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
3012 fc, err := ec.fieldContext_Query_embeddedCase1(ctx, field)
3013 if err != nil {
3014 return graphql.Null
3015 }
3016 ctx = graphql.WithFieldContext(ctx, fc)
3017 defer func() {
3018 if r := recover(); r != nil {
3019 ec.Error(ctx, ec.Recover(ctx, r))
3020 ret = graphql.Null
3021 }
3022 }()
3023 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) {
3024 ctx = rctx
3025 return ec.resolvers.Query().EmbeddedCase1(rctx)
3026 })
3027
3028 if resTmp == nil {
3029 return graphql.Null
3030 }
3031 res := resTmp.(*EmbeddedCase1)
3032 fc.Result = res
3033 return ec.marshalOEmbeddedCase12ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐEmbeddedCase1(ctx, field.Selections, res)
3034 }
3035
3036 func (ec *executionContext) fieldContext_Query_embeddedCase1(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
3037 fc = &graphql.FieldContext{
3038 Object: "Query",
3039 Field: field,
3040 IsMethod: true,
3041 IsResolver: true,
3042 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
3043 switch field.Name {
3044 case "exportedEmbeddedPointerExportedMethod":
3045 return ec.fieldContext_EmbeddedCase1_exportedEmbeddedPointerExportedMethod(ctx, field)
3046 }
3047 return nil, fmt.Errorf("no field named %q was found under type EmbeddedCase1", field.Name)
3048 },
3049 }
3050 return fc, nil
3051 }
3052
3053 func (ec *executionContext) _Query_embeddedCase2(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
3054 fc, err := ec.fieldContext_Query_embeddedCase2(ctx, field)
3055 if err != nil {
3056 return graphql.Null
3057 }
3058 ctx = graphql.WithFieldContext(ctx, fc)
3059 defer func() {
3060 if r := recover(); r != nil {
3061 ec.Error(ctx, ec.Recover(ctx, r))
3062 ret = graphql.Null
3063 }
3064 }()
3065 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) {
3066 ctx = rctx
3067 return ec.resolvers.Query().EmbeddedCase2(rctx)
3068 })
3069
3070 if resTmp == nil {
3071 return graphql.Null
3072 }
3073 res := resTmp.(*EmbeddedCase2)
3074 fc.Result = res
3075 return ec.marshalOEmbeddedCase22ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐEmbeddedCase2(ctx, field.Selections, res)
3076 }
3077
3078 func (ec *executionContext) fieldContext_Query_embeddedCase2(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
3079 fc = &graphql.FieldContext{
3080 Object: "Query",
3081 Field: field,
3082 IsMethod: true,
3083 IsResolver: true,
3084 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
3085 switch field.Name {
3086 case "unexportedEmbeddedPointerExportedMethod":
3087 return ec.fieldContext_EmbeddedCase2_unexportedEmbeddedPointerExportedMethod(ctx, field)
3088 }
3089 return nil, fmt.Errorf("no field named %q was found under type EmbeddedCase2", field.Name)
3090 },
3091 }
3092 return fc, nil
3093 }
3094
3095 func (ec *executionContext) _Query_embeddedCase3(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
3096 fc, err := ec.fieldContext_Query_embeddedCase3(ctx, field)
3097 if err != nil {
3098 return graphql.Null
3099 }
3100 ctx = graphql.WithFieldContext(ctx, fc)
3101 defer func() {
3102 if r := recover(); r != nil {
3103 ec.Error(ctx, ec.Recover(ctx, r))
3104 ret = graphql.Null
3105 }
3106 }()
3107 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) {
3108 ctx = rctx
3109 return ec.resolvers.Query().EmbeddedCase3(rctx)
3110 })
3111
3112 if resTmp == nil {
3113 return graphql.Null
3114 }
3115 res := resTmp.(*EmbeddedCase3)
3116 fc.Result = res
3117 return ec.marshalOEmbeddedCase32ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐEmbeddedCase3(ctx, field.Selections, res)
3118 }
3119
3120 func (ec *executionContext) fieldContext_Query_embeddedCase3(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
3121 fc = &graphql.FieldContext{
3122 Object: "Query",
3123 Field: field,
3124 IsMethod: true,
3125 IsResolver: true,
3126 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
3127 switch field.Name {
3128 case "unexportedEmbeddedInterfaceExportedMethod":
3129 return ec.fieldContext_EmbeddedCase3_unexportedEmbeddedInterfaceExportedMethod(ctx, field)
3130 }
3131 return nil, fmt.Errorf("no field named %q was found under type EmbeddedCase3", field.Name)
3132 },
3133 }
3134 return fc, nil
3135 }
3136
3137 func (ec *executionContext) _Query_enumInInput(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
3138 fc, err := ec.fieldContext_Query_enumInInput(ctx, field)
3139 if err != nil {
3140 return graphql.Null
3141 }
3142 ctx = graphql.WithFieldContext(ctx, fc)
3143 defer func() {
3144 if r := recover(); r != nil {
3145 ec.Error(ctx, ec.Recover(ctx, r))
3146 ret = graphql.Null
3147 }
3148 }()
3149 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) {
3150 ctx = rctx
3151 return ec.resolvers.Query().EnumInInput(rctx, fc.Args["input"].(*InputWithEnumValue))
3152 })
3153
3154 if resTmp == nil {
3155 if !graphql.HasFieldError(ctx, fc) {
3156 ec.Errorf(ctx, "must not be null")
3157 }
3158 return graphql.Null
3159 }
3160 res := resTmp.(EnumTest)
3161 fc.Result = res
3162 return ec.marshalNEnumTest2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐEnumTest(ctx, field.Selections, res)
3163 }
3164
3165 func (ec *executionContext) fieldContext_Query_enumInInput(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
3166 fc = &graphql.FieldContext{
3167 Object: "Query",
3168 Field: field,
3169 IsMethod: true,
3170 IsResolver: true,
3171 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
3172 return nil, errors.New("field of type EnumTest does not have child fields")
3173 },
3174 }
3175 defer func() {
3176 if r := recover(); r != nil {
3177 err = ec.Recover(ctx, r)
3178 ec.Error(ctx, err)
3179 }
3180 }()
3181 ctx = graphql.WithFieldContext(ctx, fc)
3182 if fc.Args, err = ec.field_Query_enumInInput_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
3183 ec.Error(ctx, err)
3184 return fc, err
3185 }
3186 return fc, nil
3187 }
3188
3189 func (ec *executionContext) _Query_shapes(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
3190 fc, err := ec.fieldContext_Query_shapes(ctx, field)
3191 if err != nil {
3192 return graphql.Null
3193 }
3194 ctx = graphql.WithFieldContext(ctx, fc)
3195 defer func() {
3196 if r := recover(); r != nil {
3197 ec.Error(ctx, ec.Recover(ctx, r))
3198 ret = graphql.Null
3199 }
3200 }()
3201 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) {
3202 ctx = rctx
3203 return ec.resolvers.Query().Shapes(rctx)
3204 })
3205
3206 if resTmp == nil {
3207 return graphql.Null
3208 }
3209 res := resTmp.([]Shape)
3210 fc.Result = res
3211 return ec.marshalOShape2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐShape(ctx, field.Selections, res)
3212 }
3213
3214 func (ec *executionContext) fieldContext_Query_shapes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
3215 fc = &graphql.FieldContext{
3216 Object: "Query",
3217 Field: field,
3218 IsMethod: true,
3219 IsResolver: true,
3220 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
3221 return nil, errors.New("FieldContext.Child cannot be called on type INTERFACE")
3222 },
3223 }
3224 return fc, nil
3225 }
3226
3227 func (ec *executionContext) _Query_noShape(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
3228 fc, err := ec.fieldContext_Query_noShape(ctx, field)
3229 if err != nil {
3230 return graphql.Null
3231 }
3232 ctx = graphql.WithFieldContext(ctx, fc)
3233 defer func() {
3234 if r := recover(); r != nil {
3235 ec.Error(ctx, ec.Recover(ctx, r))
3236 ret = graphql.Null
3237 }
3238 }()
3239 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) {
3240 directive0 := func(rctx context.Context) (interface{}, error) {
3241 ctx = rctx
3242 return ec.resolvers.Query().NoShape(rctx)
3243 }
3244 directive1 := func(ctx context.Context) (interface{}, error) {
3245 if ec.directives.MakeNil == nil {
3246 return nil, errors.New("directive makeNil is not implemented")
3247 }
3248 return ec.directives.MakeNil(ctx, nil, directive0)
3249 }
3250
3251 tmp, err := directive1(rctx)
3252 if err != nil {
3253 return nil, graphql.ErrorOnPath(ctx, err)
3254 }
3255 if tmp == nil {
3256 return nil, nil
3257 }
3258 if data, ok := tmp.(Shape); ok {
3259 return data, nil
3260 }
3261 return nil, fmt.Errorf(`unexpected type %T from directive, should be github.com/99designs/gqlgen/codegen/testserver/followschema.Shape`, tmp)
3262 })
3263
3264 if resTmp == nil {
3265 return graphql.Null
3266 }
3267 res := resTmp.(Shape)
3268 fc.Result = res
3269 return ec.marshalOShape2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐShape(ctx, field.Selections, res)
3270 }
3271
3272 func (ec *executionContext) fieldContext_Query_noShape(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
3273 fc = &graphql.FieldContext{
3274 Object: "Query",
3275 Field: field,
3276 IsMethod: true,
3277 IsResolver: true,
3278 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
3279 return nil, errors.New("FieldContext.Child cannot be called on type INTERFACE")
3280 },
3281 }
3282 return fc, nil
3283 }
3284
3285 func (ec *executionContext) _Query_node(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
3286 fc, err := ec.fieldContext_Query_node(ctx, field)
3287 if err != nil {
3288 return graphql.Null
3289 }
3290 ctx = graphql.WithFieldContext(ctx, fc)
3291 defer func() {
3292 if r := recover(); r != nil {
3293 ec.Error(ctx, ec.Recover(ctx, r))
3294 ret = graphql.Null
3295 }
3296 }()
3297 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) {
3298 ctx = rctx
3299 return ec.resolvers.Query().Node(rctx)
3300 })
3301
3302 if resTmp == nil {
3303 if !graphql.HasFieldError(ctx, fc) {
3304 ec.Errorf(ctx, "must not be null")
3305 }
3306 return graphql.Null
3307 }
3308 res := resTmp.(Node)
3309 fc.Result = res
3310 return ec.marshalNNode2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐNode(ctx, field.Selections, res)
3311 }
3312
3313 func (ec *executionContext) fieldContext_Query_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
3314 fc = &graphql.FieldContext{
3315 Object: "Query",
3316 Field: field,
3317 IsMethod: true,
3318 IsResolver: true,
3319 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
3320 return nil, errors.New("FieldContext.Child cannot be called on type INTERFACE")
3321 },
3322 }
3323 return fc, nil
3324 }
3325
3326 func (ec *executionContext) _Query_noShapeTypedNil(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
3327 fc, err := ec.fieldContext_Query_noShapeTypedNil(ctx, field)
3328 if err != nil {
3329 return graphql.Null
3330 }
3331 ctx = graphql.WithFieldContext(ctx, fc)
3332 defer func() {
3333 if r := recover(); r != nil {
3334 ec.Error(ctx, ec.Recover(ctx, r))
3335 ret = graphql.Null
3336 }
3337 }()
3338 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) {
3339 directive0 := func(rctx context.Context) (interface{}, error) {
3340 ctx = rctx
3341 return ec.resolvers.Query().NoShapeTypedNil(rctx)
3342 }
3343 directive1 := func(ctx context.Context) (interface{}, error) {
3344 if ec.directives.MakeTypedNil == nil {
3345 return nil, errors.New("directive makeTypedNil is not implemented")
3346 }
3347 return ec.directives.MakeTypedNil(ctx, nil, directive0)
3348 }
3349
3350 tmp, err := directive1(rctx)
3351 if err != nil {
3352 return nil, graphql.ErrorOnPath(ctx, err)
3353 }
3354 if tmp == nil {
3355 return nil, nil
3356 }
3357 if data, ok := tmp.(Shape); ok {
3358 return data, nil
3359 }
3360 return nil, fmt.Errorf(`unexpected type %T from directive, should be github.com/99designs/gqlgen/codegen/testserver/followschema.Shape`, tmp)
3361 })
3362
3363 if resTmp == nil {
3364 return graphql.Null
3365 }
3366 res := resTmp.(Shape)
3367 fc.Result = res
3368 return ec.marshalOShape2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐShape(ctx, field.Selections, res)
3369 }
3370
3371 func (ec *executionContext) fieldContext_Query_noShapeTypedNil(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
3372 fc = &graphql.FieldContext{
3373 Object: "Query",
3374 Field: field,
3375 IsMethod: true,
3376 IsResolver: true,
3377 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
3378 return nil, errors.New("FieldContext.Child cannot be called on type INTERFACE")
3379 },
3380 }
3381 return fc, nil
3382 }
3383
3384 func (ec *executionContext) _Query_animal(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
3385 fc, err := ec.fieldContext_Query_animal(ctx, field)
3386 if err != nil {
3387 return graphql.Null
3388 }
3389 ctx = graphql.WithFieldContext(ctx, fc)
3390 defer func() {
3391 if r := recover(); r != nil {
3392 ec.Error(ctx, ec.Recover(ctx, r))
3393 ret = graphql.Null
3394 }
3395 }()
3396 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) {
3397 directive0 := func(rctx context.Context) (interface{}, error) {
3398 ctx = rctx
3399 return ec.resolvers.Query().Animal(rctx)
3400 }
3401 directive1 := func(ctx context.Context) (interface{}, error) {
3402 if ec.directives.MakeTypedNil == nil {
3403 return nil, errors.New("directive makeTypedNil is not implemented")
3404 }
3405 return ec.directives.MakeTypedNil(ctx, nil, directive0)
3406 }
3407
3408 tmp, err := directive1(rctx)
3409 if err != nil {
3410 return nil, graphql.ErrorOnPath(ctx, err)
3411 }
3412 if tmp == nil {
3413 return nil, nil
3414 }
3415 if data, ok := tmp.(Animal); ok {
3416 return data, nil
3417 }
3418 return nil, fmt.Errorf(`unexpected type %T from directive, should be github.com/99designs/gqlgen/codegen/testserver/followschema.Animal`, tmp)
3419 })
3420
3421 if resTmp == nil {
3422 return graphql.Null
3423 }
3424 res := resTmp.(Animal)
3425 fc.Result = res
3426 return ec.marshalOAnimal2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐAnimal(ctx, field.Selections, res)
3427 }
3428
3429 func (ec *executionContext) fieldContext_Query_animal(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
3430 fc = &graphql.FieldContext{
3431 Object: "Query",
3432 Field: field,
3433 IsMethod: true,
3434 IsResolver: true,
3435 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
3436 return nil, errors.New("FieldContext.Child cannot be called on type INTERFACE")
3437 },
3438 }
3439 return fc, nil
3440 }
3441
3442 func (ec *executionContext) _Query_notAnInterface(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
3443 fc, err := ec.fieldContext_Query_notAnInterface(ctx, field)
3444 if err != nil {
3445 return graphql.Null
3446 }
3447 ctx = graphql.WithFieldContext(ctx, fc)
3448 defer func() {
3449 if r := recover(); r != nil {
3450 ec.Error(ctx, ec.Recover(ctx, r))
3451 ret = graphql.Null
3452 }
3453 }()
3454 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) {
3455 ctx = rctx
3456 return ec.resolvers.Query().NotAnInterface(rctx)
3457 })
3458
3459 if resTmp == nil {
3460 return graphql.Null
3461 }
3462 res := resTmp.(BackedByInterface)
3463 fc.Result = res
3464 return ec.marshalOBackedByInterface2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐBackedByInterface(ctx, field.Selections, res)
3465 }
3466
3467 func (ec *executionContext) fieldContext_Query_notAnInterface(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
3468 fc = &graphql.FieldContext{
3469 Object: "Query",
3470 Field: field,
3471 IsMethod: true,
3472 IsResolver: true,
3473 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
3474 switch field.Name {
3475 case "id":
3476 return ec.fieldContext_BackedByInterface_id(ctx, field)
3477 case "thisShouldBind":
3478 return ec.fieldContext_BackedByInterface_thisShouldBind(ctx, field)
3479 case "thisShouldBindWithError":
3480 return ec.fieldContext_BackedByInterface_thisShouldBindWithError(ctx, field)
3481 }
3482 return nil, fmt.Errorf("no field named %q was found under type BackedByInterface", field.Name)
3483 },
3484 }
3485 return fc, nil
3486 }
3487
3488 func (ec *executionContext) _Query_dog(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
3489 fc, err := ec.fieldContext_Query_dog(ctx, field)
3490 if err != nil {
3491 return graphql.Null
3492 }
3493 ctx = graphql.WithFieldContext(ctx, fc)
3494 defer func() {
3495 if r := recover(); r != nil {
3496 ec.Error(ctx, ec.Recover(ctx, r))
3497 ret = graphql.Null
3498 }
3499 }()
3500 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) {
3501 ctx = rctx
3502 return ec.resolvers.Query().Dog(rctx)
3503 })
3504
3505 if resTmp == nil {
3506 return graphql.Null
3507 }
3508 res := resTmp.(*Dog)
3509 fc.Result = res
3510 return ec.marshalODog2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐDog(ctx, field.Selections, res)
3511 }
3512
3513 func (ec *executionContext) fieldContext_Query_dog(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
3514 fc = &graphql.FieldContext{
3515 Object: "Query",
3516 Field: field,
3517 IsMethod: true,
3518 IsResolver: true,
3519 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
3520 switch field.Name {
3521 case "species":
3522 return ec.fieldContext_Dog_species(ctx, field)
3523 case "size":
3524 return ec.fieldContext_Dog_size(ctx, field)
3525 case "dogBreed":
3526 return ec.fieldContext_Dog_dogBreed(ctx, field)
3527 }
3528 return nil, fmt.Errorf("no field named %q was found under type Dog", field.Name)
3529 },
3530 }
3531 return fc, nil
3532 }
3533
3534 func (ec *executionContext) _Query_issue896a(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
3535 fc, err := ec.fieldContext_Query_issue896a(ctx, field)
3536 if err != nil {
3537 return graphql.Null
3538 }
3539 ctx = graphql.WithFieldContext(ctx, fc)
3540 defer func() {
3541 if r := recover(); r != nil {
3542 ec.Error(ctx, ec.Recover(ctx, r))
3543 ret = graphql.Null
3544 }
3545 }()
3546 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) {
3547 ctx = rctx
3548 return ec.resolvers.Query().Issue896a(rctx)
3549 })
3550
3551 if resTmp == nil {
3552 return graphql.Null
3553 }
3554 res := resTmp.([]*CheckIssue896)
3555 fc.Result = res
3556 return ec.marshalOCheckIssue8962ᚕᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐCheckIssue896ᚄ(ctx, field.Selections, res)
3557 }
3558
3559 func (ec *executionContext) fieldContext_Query_issue896a(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
3560 fc = &graphql.FieldContext{
3561 Object: "Query",
3562 Field: field,
3563 IsMethod: true,
3564 IsResolver: true,
3565 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
3566 switch field.Name {
3567 case "id":
3568 return ec.fieldContext_CheckIssue896_id(ctx, field)
3569 }
3570 return nil, fmt.Errorf("no field named %q was found under type CheckIssue896", field.Name)
3571 },
3572 }
3573 return fc, nil
3574 }
3575
3576 func (ec *executionContext) _Query_mapStringInterface(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
3577 fc, err := ec.fieldContext_Query_mapStringInterface(ctx, field)
3578 if err != nil {
3579 return graphql.Null
3580 }
3581 ctx = graphql.WithFieldContext(ctx, fc)
3582 defer func() {
3583 if r := recover(); r != nil {
3584 ec.Error(ctx, ec.Recover(ctx, r))
3585 ret = graphql.Null
3586 }
3587 }()
3588 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) {
3589 ctx = rctx
3590 return ec.resolvers.Query().MapStringInterface(rctx, fc.Args["in"].(map[string]interface{}))
3591 })
3592
3593 if resTmp == nil {
3594 return graphql.Null
3595 }
3596 res := resTmp.(map[string]interface{})
3597 fc.Result = res
3598 return ec.marshalOMapStringInterfaceType2map(ctx, field.Selections, res)
3599 }
3600
3601 func (ec *executionContext) fieldContext_Query_mapStringInterface(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
3602 fc = &graphql.FieldContext{
3603 Object: "Query",
3604 Field: field,
3605 IsMethod: true,
3606 IsResolver: true,
3607 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
3608 switch field.Name {
3609 case "a":
3610 return ec.fieldContext_MapStringInterfaceType_a(ctx, field)
3611 case "b":
3612 return ec.fieldContext_MapStringInterfaceType_b(ctx, field)
3613 case "c":
3614 return ec.fieldContext_MapStringInterfaceType_c(ctx, field)
3615 case "nested":
3616 return ec.fieldContext_MapStringInterfaceType_nested(ctx, field)
3617 }
3618 return nil, fmt.Errorf("no field named %q was found under type MapStringInterfaceType", field.Name)
3619 },
3620 }
3621 defer func() {
3622 if r := recover(); r != nil {
3623 err = ec.Recover(ctx, r)
3624 ec.Error(ctx, err)
3625 }
3626 }()
3627 ctx = graphql.WithFieldContext(ctx, fc)
3628 if fc.Args, err = ec.field_Query_mapStringInterface_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
3629 ec.Error(ctx, err)
3630 return fc, err
3631 }
3632 return fc, nil
3633 }
3634
3635 func (ec *executionContext) _Query_mapNestedStringInterface(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
3636 fc, err := ec.fieldContext_Query_mapNestedStringInterface(ctx, field)
3637 if err != nil {
3638 return graphql.Null
3639 }
3640 ctx = graphql.WithFieldContext(ctx, fc)
3641 defer func() {
3642 if r := recover(); r != nil {
3643 ec.Error(ctx, ec.Recover(ctx, r))
3644 ret = graphql.Null
3645 }
3646 }()
3647 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) {
3648 ctx = rctx
3649 return ec.resolvers.Query().MapNestedStringInterface(rctx, fc.Args["in"].(*NestedMapInput))
3650 })
3651
3652 if resTmp == nil {
3653 return graphql.Null
3654 }
3655 res := resTmp.(map[string]interface{})
3656 fc.Result = res
3657 return ec.marshalOMapStringInterfaceType2map(ctx, field.Selections, res)
3658 }
3659
3660 func (ec *executionContext) fieldContext_Query_mapNestedStringInterface(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
3661 fc = &graphql.FieldContext{
3662 Object: "Query",
3663 Field: field,
3664 IsMethod: true,
3665 IsResolver: true,
3666 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
3667 switch field.Name {
3668 case "a":
3669 return ec.fieldContext_MapStringInterfaceType_a(ctx, field)
3670 case "b":
3671 return ec.fieldContext_MapStringInterfaceType_b(ctx, field)
3672 case "c":
3673 return ec.fieldContext_MapStringInterfaceType_c(ctx, field)
3674 case "nested":
3675 return ec.fieldContext_MapStringInterfaceType_nested(ctx, field)
3676 }
3677 return nil, fmt.Errorf("no field named %q was found under type MapStringInterfaceType", field.Name)
3678 },
3679 }
3680 defer func() {
3681 if r := recover(); r != nil {
3682 err = ec.Recover(ctx, r)
3683 ec.Error(ctx, err)
3684 }
3685 }()
3686 ctx = graphql.WithFieldContext(ctx, fc)
3687 if fc.Args, err = ec.field_Query_mapNestedStringInterface_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
3688 ec.Error(ctx, err)
3689 return fc, err
3690 }
3691 return fc, nil
3692 }
3693
3694 func (ec *executionContext) _Query_errorBubble(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
3695 fc, err := ec.fieldContext_Query_errorBubble(ctx, field)
3696 if err != nil {
3697 return graphql.Null
3698 }
3699 ctx = graphql.WithFieldContext(ctx, fc)
3700 defer func() {
3701 if r := recover(); r != nil {
3702 ec.Error(ctx, ec.Recover(ctx, r))
3703 ret = graphql.Null
3704 }
3705 }()
3706 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) {
3707 ctx = rctx
3708 return ec.resolvers.Query().ErrorBubble(rctx)
3709 })
3710
3711 if resTmp == nil {
3712 return graphql.Null
3713 }
3714 res := resTmp.(*Error)
3715 fc.Result = res
3716 return ec.marshalOError2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐError(ctx, field.Selections, res)
3717 }
3718
3719 func (ec *executionContext) fieldContext_Query_errorBubble(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
3720 fc = &graphql.FieldContext{
3721 Object: "Query",
3722 Field: field,
3723 IsMethod: true,
3724 IsResolver: true,
3725 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
3726 switch field.Name {
3727 case "id":
3728 return ec.fieldContext_Error_id(ctx, field)
3729 case "errorOnNonRequiredField":
3730 return ec.fieldContext_Error_errorOnNonRequiredField(ctx, field)
3731 case "errorOnRequiredField":
3732 return ec.fieldContext_Error_errorOnRequiredField(ctx, field)
3733 case "nilOnRequiredField":
3734 return ec.fieldContext_Error_nilOnRequiredField(ctx, field)
3735 }
3736 return nil, fmt.Errorf("no field named %q was found under type Error", field.Name)
3737 },
3738 }
3739 return fc, nil
3740 }
3741
3742 func (ec *executionContext) _Query_errorBubbleList(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
3743 fc, err := ec.fieldContext_Query_errorBubbleList(ctx, field)
3744 if err != nil {
3745 return graphql.Null
3746 }
3747 ctx = graphql.WithFieldContext(ctx, fc)
3748 defer func() {
3749 if r := recover(); r != nil {
3750 ec.Error(ctx, ec.Recover(ctx, r))
3751 ret = graphql.Null
3752 }
3753 }()
3754 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) {
3755 ctx = rctx
3756 return ec.resolvers.Query().ErrorBubbleList(rctx)
3757 })
3758
3759 if resTmp == nil {
3760 return graphql.Null
3761 }
3762 res := resTmp.([]*Error)
3763 fc.Result = res
3764 return ec.marshalOError2ᚕᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐErrorᚄ(ctx, field.Selections, res)
3765 }
3766
3767 func (ec *executionContext) fieldContext_Query_errorBubbleList(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
3768 fc = &graphql.FieldContext{
3769 Object: "Query",
3770 Field: field,
3771 IsMethod: true,
3772 IsResolver: true,
3773 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
3774 switch field.Name {
3775 case "id":
3776 return ec.fieldContext_Error_id(ctx, field)
3777 case "errorOnNonRequiredField":
3778 return ec.fieldContext_Error_errorOnNonRequiredField(ctx, field)
3779 case "errorOnRequiredField":
3780 return ec.fieldContext_Error_errorOnRequiredField(ctx, field)
3781 case "nilOnRequiredField":
3782 return ec.fieldContext_Error_nilOnRequiredField(ctx, field)
3783 }
3784 return nil, fmt.Errorf("no field named %q was found under type Error", field.Name)
3785 },
3786 }
3787 return fc, nil
3788 }
3789
3790 func (ec *executionContext) _Query_errorList(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
3791 fc, err := ec.fieldContext_Query_errorList(ctx, field)
3792 if err != nil {
3793 return graphql.Null
3794 }
3795 ctx = graphql.WithFieldContext(ctx, fc)
3796 defer func() {
3797 if r := recover(); r != nil {
3798 ec.Error(ctx, ec.Recover(ctx, r))
3799 ret = graphql.Null
3800 }
3801 }()
3802 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) {
3803 ctx = rctx
3804 return ec.resolvers.Query().ErrorList(rctx)
3805 })
3806
3807 if resTmp == nil {
3808 return graphql.Null
3809 }
3810 res := resTmp.([]*Error)
3811 fc.Result = res
3812 return ec.marshalOError2ᚕᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐError(ctx, field.Selections, res)
3813 }
3814
3815 func (ec *executionContext) fieldContext_Query_errorList(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
3816 fc = &graphql.FieldContext{
3817 Object: "Query",
3818 Field: field,
3819 IsMethod: true,
3820 IsResolver: true,
3821 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
3822 switch field.Name {
3823 case "id":
3824 return ec.fieldContext_Error_id(ctx, field)
3825 case "errorOnNonRequiredField":
3826 return ec.fieldContext_Error_errorOnNonRequiredField(ctx, field)
3827 case "errorOnRequiredField":
3828 return ec.fieldContext_Error_errorOnRequiredField(ctx, field)
3829 case "nilOnRequiredField":
3830 return ec.fieldContext_Error_nilOnRequiredField(ctx, field)
3831 }
3832 return nil, fmt.Errorf("no field named %q was found under type Error", field.Name)
3833 },
3834 }
3835 return fc, nil
3836 }
3837
3838 func (ec *executionContext) _Query_errors(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
3839 fc, err := ec.fieldContext_Query_errors(ctx, field)
3840 if err != nil {
3841 return graphql.Null
3842 }
3843 ctx = graphql.WithFieldContext(ctx, fc)
3844 defer func() {
3845 if r := recover(); r != nil {
3846 ec.Error(ctx, ec.Recover(ctx, r))
3847 ret = graphql.Null
3848 }
3849 }()
3850 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) {
3851 ctx = rctx
3852 return ec.resolvers.Query().Errors(rctx)
3853 })
3854
3855 if resTmp == nil {
3856 return graphql.Null
3857 }
3858 res := resTmp.(*Errors)
3859 fc.Result = res
3860 return ec.marshalOErrors2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐErrors(ctx, field.Selections, res)
3861 }
3862
3863 func (ec *executionContext) fieldContext_Query_errors(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
3864 fc = &graphql.FieldContext{
3865 Object: "Query",
3866 Field: field,
3867 IsMethod: true,
3868 IsResolver: true,
3869 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
3870 switch field.Name {
3871 case "a":
3872 return ec.fieldContext_Errors_a(ctx, field)
3873 case "b":
3874 return ec.fieldContext_Errors_b(ctx, field)
3875 case "c":
3876 return ec.fieldContext_Errors_c(ctx, field)
3877 case "d":
3878 return ec.fieldContext_Errors_d(ctx, field)
3879 case "e":
3880 return ec.fieldContext_Errors_e(ctx, field)
3881 }
3882 return nil, fmt.Errorf("no field named %q was found under type Errors", field.Name)
3883 },
3884 }
3885 return fc, nil
3886 }
3887
3888 func (ec *executionContext) _Query_valid(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
3889 fc, err := ec.fieldContext_Query_valid(ctx, field)
3890 if err != nil {
3891 return graphql.Null
3892 }
3893 ctx = graphql.WithFieldContext(ctx, fc)
3894 defer func() {
3895 if r := recover(); r != nil {
3896 ec.Error(ctx, ec.Recover(ctx, r))
3897 ret = graphql.Null
3898 }
3899 }()
3900 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) {
3901 ctx = rctx
3902 return ec.resolvers.Query().Valid(rctx)
3903 })
3904
3905 if resTmp == nil {
3906 if !graphql.HasFieldError(ctx, fc) {
3907 ec.Errorf(ctx, "must not be null")
3908 }
3909 return graphql.Null
3910 }
3911 res := resTmp.(string)
3912 fc.Result = res
3913 return ec.marshalNString2string(ctx, field.Selections, res)
3914 }
3915
3916 func (ec *executionContext) fieldContext_Query_valid(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
3917 fc = &graphql.FieldContext{
3918 Object: "Query",
3919 Field: field,
3920 IsMethod: true,
3921 IsResolver: true,
3922 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
3923 return nil, errors.New("field of type String does not have child fields")
3924 },
3925 }
3926 return fc, nil
3927 }
3928
3929 func (ec *executionContext) _Query_invalid(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
3930 fc, err := ec.fieldContext_Query_invalid(ctx, field)
3931 if err != nil {
3932 return graphql.Null
3933 }
3934 ctx = graphql.WithFieldContext(ctx, fc)
3935 defer func() {
3936 if r := recover(); r != nil {
3937 ec.Error(ctx, ec.Recover(ctx, r))
3938 ret = graphql.Null
3939 }
3940 }()
3941 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) {
3942 ctx = rctx
3943 return ec.resolvers.Query().Invalid(rctx)
3944 })
3945
3946 if resTmp == nil {
3947 if !graphql.HasFieldError(ctx, fc) {
3948 ec.Errorf(ctx, "must not be null")
3949 }
3950 return graphql.Null
3951 }
3952 res := resTmp.(string)
3953 fc.Result = res
3954 return ec.marshalNString2string(ctx, field.Selections, res)
3955 }
3956
3957 func (ec *executionContext) fieldContext_Query_invalid(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
3958 fc = &graphql.FieldContext{
3959 Object: "Query",
3960 Field: field,
3961 IsMethod: true,
3962 IsResolver: true,
3963 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
3964 return nil, errors.New("field of type String does not have child fields")
3965 },
3966 }
3967 return fc, nil
3968 }
3969
3970 func (ec *executionContext) _Query_panics(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
3971 fc, err := ec.fieldContext_Query_panics(ctx, field)
3972 if err != nil {
3973 return graphql.Null
3974 }
3975 ctx = graphql.WithFieldContext(ctx, fc)
3976 defer func() {
3977 if r := recover(); r != nil {
3978 ec.Error(ctx, ec.Recover(ctx, r))
3979 ret = graphql.Null
3980 }
3981 }()
3982 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) {
3983 ctx = rctx
3984 return ec.resolvers.Query().Panics(rctx)
3985 })
3986
3987 if resTmp == nil {
3988 return graphql.Null
3989 }
3990 res := resTmp.(*Panics)
3991 fc.Result = res
3992 return ec.marshalOPanics2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐPanics(ctx, field.Selections, res)
3993 }
3994
3995 func (ec *executionContext) fieldContext_Query_panics(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
3996 fc = &graphql.FieldContext{
3997 Object: "Query",
3998 Field: field,
3999 IsMethod: true,
4000 IsResolver: true,
4001 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
4002 switch field.Name {
4003 case "fieldScalarMarshal":
4004 return ec.fieldContext_Panics_fieldScalarMarshal(ctx, field)
4005 case "fieldFuncMarshal":
4006 return ec.fieldContext_Panics_fieldFuncMarshal(ctx, field)
4007 case "argUnmarshal":
4008 return ec.fieldContext_Panics_argUnmarshal(ctx, field)
4009 }
4010 return nil, fmt.Errorf("no field named %q was found under type Panics", field.Name)
4011 },
4012 }
4013 return fc, nil
4014 }
4015
4016 func (ec *executionContext) _Query_primitiveObject(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
4017 fc, err := ec.fieldContext_Query_primitiveObject(ctx, field)
4018 if err != nil {
4019 return graphql.Null
4020 }
4021 ctx = graphql.WithFieldContext(ctx, fc)
4022 defer func() {
4023 if r := recover(); r != nil {
4024 ec.Error(ctx, ec.Recover(ctx, r))
4025 ret = graphql.Null
4026 }
4027 }()
4028 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) {
4029 ctx = rctx
4030 return ec.resolvers.Query().PrimitiveObject(rctx)
4031 })
4032
4033 if resTmp == nil {
4034 if !graphql.HasFieldError(ctx, fc) {
4035 ec.Errorf(ctx, "must not be null")
4036 }
4037 return graphql.Null
4038 }
4039 res := resTmp.([]Primitive)
4040 fc.Result = res
4041 return ec.marshalNPrimitive2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐPrimitiveᚄ(ctx, field.Selections, res)
4042 }
4043
4044 func (ec *executionContext) fieldContext_Query_primitiveObject(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
4045 fc = &graphql.FieldContext{
4046 Object: "Query",
4047 Field: field,
4048 IsMethod: true,
4049 IsResolver: true,
4050 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
4051 switch field.Name {
4052 case "value":
4053 return ec.fieldContext_Primitive_value(ctx, field)
4054 case "squared":
4055 return ec.fieldContext_Primitive_squared(ctx, field)
4056 }
4057 return nil, fmt.Errorf("no field named %q was found under type Primitive", field.Name)
4058 },
4059 }
4060 return fc, nil
4061 }
4062
4063 func (ec *executionContext) _Query_primitiveStringObject(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
4064 fc, err := ec.fieldContext_Query_primitiveStringObject(ctx, field)
4065 if err != nil {
4066 return graphql.Null
4067 }
4068 ctx = graphql.WithFieldContext(ctx, fc)
4069 defer func() {
4070 if r := recover(); r != nil {
4071 ec.Error(ctx, ec.Recover(ctx, r))
4072 ret = graphql.Null
4073 }
4074 }()
4075 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) {
4076 ctx = rctx
4077 return ec.resolvers.Query().PrimitiveStringObject(rctx)
4078 })
4079
4080 if resTmp == nil {
4081 if !graphql.HasFieldError(ctx, fc) {
4082 ec.Errorf(ctx, "must not be null")
4083 }
4084 return graphql.Null
4085 }
4086 res := resTmp.([]PrimitiveString)
4087 fc.Result = res
4088 return ec.marshalNPrimitiveString2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐPrimitiveStringᚄ(ctx, field.Selections, res)
4089 }
4090
4091 func (ec *executionContext) fieldContext_Query_primitiveStringObject(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
4092 fc = &graphql.FieldContext{
4093 Object: "Query",
4094 Field: field,
4095 IsMethod: true,
4096 IsResolver: true,
4097 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
4098 switch field.Name {
4099 case "value":
4100 return ec.fieldContext_PrimitiveString_value(ctx, field)
4101 case "doubled":
4102 return ec.fieldContext_PrimitiveString_doubled(ctx, field)
4103 case "len":
4104 return ec.fieldContext_PrimitiveString_len(ctx, field)
4105 }
4106 return nil, fmt.Errorf("no field named %q was found under type PrimitiveString", field.Name)
4107 },
4108 }
4109 return fc, nil
4110 }
4111
4112 func (ec *executionContext) _Query_ptrToAnyContainer(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
4113 fc, err := ec.fieldContext_Query_ptrToAnyContainer(ctx, field)
4114 if err != nil {
4115 return graphql.Null
4116 }
4117 ctx = graphql.WithFieldContext(ctx, fc)
4118 defer func() {
4119 if r := recover(); r != nil {
4120 ec.Error(ctx, ec.Recover(ctx, r))
4121 ret = graphql.Null
4122 }
4123 }()
4124 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) {
4125 ctx = rctx
4126 return ec.resolvers.Query().PtrToAnyContainer(rctx)
4127 })
4128
4129 if resTmp == nil {
4130 if !graphql.HasFieldError(ctx, fc) {
4131 ec.Errorf(ctx, "must not be null")
4132 }
4133 return graphql.Null
4134 }
4135 res := resTmp.(*PtrToAnyContainer)
4136 fc.Result = res
4137 return ec.marshalNPtrToAnyContainer2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐPtrToAnyContainer(ctx, field.Selections, res)
4138 }
4139
4140 func (ec *executionContext) fieldContext_Query_ptrToAnyContainer(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
4141 fc = &graphql.FieldContext{
4142 Object: "Query",
4143 Field: field,
4144 IsMethod: true,
4145 IsResolver: true,
4146 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
4147 switch field.Name {
4148 case "ptrToAny":
4149 return ec.fieldContext_PtrToAnyContainer_ptrToAny(ctx, field)
4150 case "binding":
4151 return ec.fieldContext_PtrToAnyContainer_binding(ctx, field)
4152 }
4153 return nil, fmt.Errorf("no field named %q was found under type PtrToAnyContainer", field.Name)
4154 },
4155 }
4156 return fc, nil
4157 }
4158
4159 func (ec *executionContext) _Query_ptrToSliceContainer(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
4160 fc, err := ec.fieldContext_Query_ptrToSliceContainer(ctx, field)
4161 if err != nil {
4162 return graphql.Null
4163 }
4164 ctx = graphql.WithFieldContext(ctx, fc)
4165 defer func() {
4166 if r := recover(); r != nil {
4167 ec.Error(ctx, ec.Recover(ctx, r))
4168 ret = graphql.Null
4169 }
4170 }()
4171 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) {
4172 ctx = rctx
4173 return ec.resolvers.Query().PtrToSliceContainer(rctx)
4174 })
4175
4176 if resTmp == nil {
4177 if !graphql.HasFieldError(ctx, fc) {
4178 ec.Errorf(ctx, "must not be null")
4179 }
4180 return graphql.Null
4181 }
4182 res := resTmp.(*PtrToSliceContainer)
4183 fc.Result = res
4184 return ec.marshalNPtrToSliceContainer2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐPtrToSliceContainer(ctx, field.Selections, res)
4185 }
4186
4187 func (ec *executionContext) fieldContext_Query_ptrToSliceContainer(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
4188 fc = &graphql.FieldContext{
4189 Object: "Query",
4190 Field: field,
4191 IsMethod: true,
4192 IsResolver: true,
4193 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
4194 switch field.Name {
4195 case "ptrToSlice":
4196 return ec.fieldContext_PtrToSliceContainer_ptrToSlice(ctx, field)
4197 }
4198 return nil, fmt.Errorf("no field named %q was found under type PtrToSliceContainer", field.Name)
4199 },
4200 }
4201 return fc, nil
4202 }
4203
4204 func (ec *executionContext) _Query_infinity(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
4205 fc, err := ec.fieldContext_Query_infinity(ctx, field)
4206 if err != nil {
4207 return graphql.Null
4208 }
4209 ctx = graphql.WithFieldContext(ctx, fc)
4210 defer func() {
4211 if r := recover(); r != nil {
4212 ec.Error(ctx, ec.Recover(ctx, r))
4213 ret = graphql.Null
4214 }
4215 }()
4216 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) {
4217 ctx = rctx
4218 return ec.resolvers.Query().Infinity(rctx)
4219 })
4220
4221 if resTmp == nil {
4222 if !graphql.HasFieldError(ctx, fc) {
4223 ec.Errorf(ctx, "must not be null")
4224 }
4225 return graphql.Null
4226 }
4227 res := resTmp.(float64)
4228 fc.Result = res
4229 return ec.marshalNFloat2float64(ctx, field.Selections, res)
4230 }
4231
4232 func (ec *executionContext) fieldContext_Query_infinity(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
4233 fc = &graphql.FieldContext{
4234 Object: "Query",
4235 Field: field,
4236 IsMethod: true,
4237 IsResolver: true,
4238 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
4239 return nil, errors.New("field of type Float does not have child fields")
4240 },
4241 }
4242 return fc, nil
4243 }
4244
4245 func (ec *executionContext) _Query_stringFromContextInterface(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
4246 fc, err := ec.fieldContext_Query_stringFromContextInterface(ctx, field)
4247 if err != nil {
4248 return graphql.Null
4249 }
4250 ctx = graphql.WithFieldContext(ctx, fc)
4251 defer func() {
4252 if r := recover(); r != nil {
4253 ec.Error(ctx, ec.Recover(ctx, r))
4254 ret = graphql.Null
4255 }
4256 }()
4257 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) {
4258 ctx = rctx
4259 return ec.resolvers.Query().StringFromContextInterface(rctx)
4260 })
4261
4262 if resTmp == nil {
4263 if !graphql.HasFieldError(ctx, fc) {
4264 ec.Errorf(ctx, "must not be null")
4265 }
4266 return graphql.Null
4267 }
4268 res := resTmp.(*StringFromContextInterface)
4269 fc.Result = res
4270 return ec.marshalNStringFromContextInterface2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐStringFromContextInterface(ctx, field.Selections, res)
4271 }
4272
4273 func (ec *executionContext) fieldContext_Query_stringFromContextInterface(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
4274 fc = &graphql.FieldContext{
4275 Object: "Query",
4276 Field: field,
4277 IsMethod: true,
4278 IsResolver: true,
4279 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
4280 return nil, errors.New("field of type StringFromContextInterface does not have child fields")
4281 },
4282 }
4283 return fc, nil
4284 }
4285
4286 func (ec *executionContext) _Query_stringFromContextFunction(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
4287 fc, err := ec.fieldContext_Query_stringFromContextFunction(ctx, field)
4288 if err != nil {
4289 return graphql.Null
4290 }
4291 ctx = graphql.WithFieldContext(ctx, fc)
4292 defer func() {
4293 if r := recover(); r != nil {
4294 ec.Error(ctx, ec.Recover(ctx, r))
4295 ret = graphql.Null
4296 }
4297 }()
4298 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) {
4299 ctx = rctx
4300 return ec.resolvers.Query().StringFromContextFunction(rctx)
4301 })
4302
4303 if resTmp == nil {
4304 if !graphql.HasFieldError(ctx, fc) {
4305 ec.Errorf(ctx, "must not be null")
4306 }
4307 return graphql.Null
4308 }
4309 res := resTmp.(string)
4310 fc.Result = res
4311 return ec.marshalNStringFromContextFunction2string(ctx, field.Selections, res)
4312 }
4313
4314 func (ec *executionContext) fieldContext_Query_stringFromContextFunction(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
4315 fc = &graphql.FieldContext{
4316 Object: "Query",
4317 Field: field,
4318 IsMethod: true,
4319 IsResolver: true,
4320 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
4321 return nil, errors.New("field of type StringFromContextFunction does not have child fields")
4322 },
4323 }
4324 return fc, nil
4325 }
4326
4327 func (ec *executionContext) _Query_defaultScalar(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
4328 fc, err := ec.fieldContext_Query_defaultScalar(ctx, field)
4329 if err != nil {
4330 return graphql.Null
4331 }
4332 ctx = graphql.WithFieldContext(ctx, fc)
4333 defer func() {
4334 if r := recover(); r != nil {
4335 ec.Error(ctx, ec.Recover(ctx, r))
4336 ret = graphql.Null
4337 }
4338 }()
4339 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) {
4340 ctx = rctx
4341 return ec.resolvers.Query().DefaultScalar(rctx, fc.Args["arg"].(string))
4342 })
4343
4344 if resTmp == nil {
4345 if !graphql.HasFieldError(ctx, fc) {
4346 ec.Errorf(ctx, "must not be null")
4347 }
4348 return graphql.Null
4349 }
4350 res := resTmp.(string)
4351 fc.Result = res
4352 return ec.marshalNDefaultScalarImplementation2string(ctx, field.Selections, res)
4353 }
4354
4355 func (ec *executionContext) fieldContext_Query_defaultScalar(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
4356 fc = &graphql.FieldContext{
4357 Object: "Query",
4358 Field: field,
4359 IsMethod: true,
4360 IsResolver: true,
4361 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
4362 return nil, errors.New("field of type DefaultScalarImplementation does not have child fields")
4363 },
4364 }
4365 defer func() {
4366 if r := recover(); r != nil {
4367 err = ec.Recover(ctx, r)
4368 ec.Error(ctx, err)
4369 }
4370 }()
4371 ctx = graphql.WithFieldContext(ctx, fc)
4372 if fc.Args, err = ec.field_Query_defaultScalar_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
4373 ec.Error(ctx, err)
4374 return fc, err
4375 }
4376 return fc, nil
4377 }
4378
4379 func (ec *executionContext) _Query_slices(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
4380 fc, err := ec.fieldContext_Query_slices(ctx, field)
4381 if err != nil {
4382 return graphql.Null
4383 }
4384 ctx = graphql.WithFieldContext(ctx, fc)
4385 defer func() {
4386 if r := recover(); r != nil {
4387 ec.Error(ctx, ec.Recover(ctx, r))
4388 ret = graphql.Null
4389 }
4390 }()
4391 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) {
4392 ctx = rctx
4393 return ec.resolvers.Query().Slices(rctx)
4394 })
4395
4396 if resTmp == nil {
4397 return graphql.Null
4398 }
4399 res := resTmp.(*Slices)
4400 fc.Result = res
4401 return ec.marshalOSlices2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐSlices(ctx, field.Selections, res)
4402 }
4403
4404 func (ec *executionContext) fieldContext_Query_slices(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
4405 fc = &graphql.FieldContext{
4406 Object: "Query",
4407 Field: field,
4408 IsMethod: true,
4409 IsResolver: true,
4410 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
4411 switch field.Name {
4412 case "test1":
4413 return ec.fieldContext_Slices_test1(ctx, field)
4414 case "test2":
4415 return ec.fieldContext_Slices_test2(ctx, field)
4416 case "test3":
4417 return ec.fieldContext_Slices_test3(ctx, field)
4418 case "test4":
4419 return ec.fieldContext_Slices_test4(ctx, field)
4420 }
4421 return nil, fmt.Errorf("no field named %q was found under type Slices", field.Name)
4422 },
4423 }
4424 return fc, nil
4425 }
4426
4427 func (ec *executionContext) _Query_scalarSlice(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
4428 fc, err := ec.fieldContext_Query_scalarSlice(ctx, field)
4429 if err != nil {
4430 return graphql.Null
4431 }
4432 ctx = graphql.WithFieldContext(ctx, fc)
4433 defer func() {
4434 if r := recover(); r != nil {
4435 ec.Error(ctx, ec.Recover(ctx, r))
4436 ret = graphql.Null
4437 }
4438 }()
4439 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) {
4440 ctx = rctx
4441 return ec.resolvers.Query().ScalarSlice(rctx)
4442 })
4443
4444 if resTmp == nil {
4445 if !graphql.HasFieldError(ctx, fc) {
4446 ec.Errorf(ctx, "must not be null")
4447 }
4448 return graphql.Null
4449 }
4450 res := resTmp.([]byte)
4451 fc.Result = res
4452 return ec.marshalNBytes2ᚕbyte(ctx, field.Selections, res)
4453 }
4454
4455 func (ec *executionContext) fieldContext_Query_scalarSlice(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
4456 fc = &graphql.FieldContext{
4457 Object: "Query",
4458 Field: field,
4459 IsMethod: true,
4460 IsResolver: true,
4461 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
4462 return nil, errors.New("field of type Bytes does not have child fields")
4463 },
4464 }
4465 return fc, nil
4466 }
4467
4468 func (ec *executionContext) _Query_fallback(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
4469 fc, err := ec.fieldContext_Query_fallback(ctx, field)
4470 if err != nil {
4471 return graphql.Null
4472 }
4473 ctx = graphql.WithFieldContext(ctx, fc)
4474 defer func() {
4475 if r := recover(); r != nil {
4476 ec.Error(ctx, ec.Recover(ctx, r))
4477 ret = graphql.Null
4478 }
4479 }()
4480 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) {
4481 ctx = rctx
4482 return ec.resolvers.Query().Fallback(rctx, fc.Args["arg"].(FallbackToStringEncoding))
4483 })
4484
4485 if resTmp == nil {
4486 if !graphql.HasFieldError(ctx, fc) {
4487 ec.Errorf(ctx, "must not be null")
4488 }
4489 return graphql.Null
4490 }
4491 res := resTmp.(FallbackToStringEncoding)
4492 fc.Result = res
4493 return ec.marshalNFallbackToStringEncoding2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐFallbackToStringEncoding(ctx, field.Selections, res)
4494 }
4495
4496 func (ec *executionContext) fieldContext_Query_fallback(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
4497 fc = &graphql.FieldContext{
4498 Object: "Query",
4499 Field: field,
4500 IsMethod: true,
4501 IsResolver: true,
4502 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
4503 return nil, errors.New("field of type FallbackToStringEncoding does not have child fields")
4504 },
4505 }
4506 defer func() {
4507 if r := recover(); r != nil {
4508 err = ec.Recover(ctx, r)
4509 ec.Error(ctx, err)
4510 }
4511 }()
4512 ctx = graphql.WithFieldContext(ctx, fc)
4513 if fc.Args, err = ec.field_Query_fallback_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
4514 ec.Error(ctx, err)
4515 return fc, err
4516 }
4517 return fc, nil
4518 }
4519
4520 func (ec *executionContext) _Query_optionalUnion(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
4521 fc, err := ec.fieldContext_Query_optionalUnion(ctx, field)
4522 if err != nil {
4523 return graphql.Null
4524 }
4525 ctx = graphql.WithFieldContext(ctx, fc)
4526 defer func() {
4527 if r := recover(); r != nil {
4528 ec.Error(ctx, ec.Recover(ctx, r))
4529 ret = graphql.Null
4530 }
4531 }()
4532 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) {
4533 ctx = rctx
4534 return ec.resolvers.Query().OptionalUnion(rctx)
4535 })
4536
4537 if resTmp == nil {
4538 return graphql.Null
4539 }
4540 res := resTmp.(TestUnion)
4541 fc.Result = res
4542 return ec.marshalOTestUnion2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐTestUnion(ctx, field.Selections, res)
4543 }
4544
4545 func (ec *executionContext) fieldContext_Query_optionalUnion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
4546 fc = &graphql.FieldContext{
4547 Object: "Query",
4548 Field: field,
4549 IsMethod: true,
4550 IsResolver: true,
4551 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
4552 return nil, errors.New("field of type TestUnion does not have child fields")
4553 },
4554 }
4555 return fc, nil
4556 }
4557
4558 func (ec *executionContext) _Query_vOkCaseValue(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
4559 fc, err := ec.fieldContext_Query_vOkCaseValue(ctx, field)
4560 if err != nil {
4561 return graphql.Null
4562 }
4563 ctx = graphql.WithFieldContext(ctx, fc)
4564 defer func() {
4565 if r := recover(); r != nil {
4566 ec.Error(ctx, ec.Recover(ctx, r))
4567 ret = graphql.Null
4568 }
4569 }()
4570 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) {
4571 ctx = rctx
4572 return ec.resolvers.Query().VOkCaseValue(rctx)
4573 })
4574
4575 if resTmp == nil {
4576 return graphql.Null
4577 }
4578 res := resTmp.(*VOkCaseValue)
4579 fc.Result = res
4580 return ec.marshalOVOkCaseValue2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐVOkCaseValue(ctx, field.Selections, res)
4581 }
4582
4583 func (ec *executionContext) fieldContext_Query_vOkCaseValue(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
4584 fc = &graphql.FieldContext{
4585 Object: "Query",
4586 Field: field,
4587 IsMethod: true,
4588 IsResolver: true,
4589 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
4590 switch field.Name {
4591 case "value":
4592 return ec.fieldContext_VOkCaseValue_value(ctx, field)
4593 }
4594 return nil, fmt.Errorf("no field named %q was found under type VOkCaseValue", field.Name)
4595 },
4596 }
4597 return fc, nil
4598 }
4599
4600 func (ec *executionContext) _Query_vOkCaseNil(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
4601 fc, err := ec.fieldContext_Query_vOkCaseNil(ctx, field)
4602 if err != nil {
4603 return graphql.Null
4604 }
4605 ctx = graphql.WithFieldContext(ctx, fc)
4606 defer func() {
4607 if r := recover(); r != nil {
4608 ec.Error(ctx, ec.Recover(ctx, r))
4609 ret = graphql.Null
4610 }
4611 }()
4612 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) {
4613 ctx = rctx
4614 return ec.resolvers.Query().VOkCaseNil(rctx)
4615 })
4616
4617 if resTmp == nil {
4618 return graphql.Null
4619 }
4620 res := resTmp.(*VOkCaseNil)
4621 fc.Result = res
4622 return ec.marshalOVOkCaseNil2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐVOkCaseNil(ctx, field.Selections, res)
4623 }
4624
4625 func (ec *executionContext) fieldContext_Query_vOkCaseNil(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
4626 fc = &graphql.FieldContext{
4627 Object: "Query",
4628 Field: field,
4629 IsMethod: true,
4630 IsResolver: true,
4631 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
4632 switch field.Name {
4633 case "value":
4634 return ec.fieldContext_VOkCaseNil_value(ctx, field)
4635 }
4636 return nil, fmt.Errorf("no field named %q was found under type VOkCaseNil", field.Name)
4637 },
4638 }
4639 return fc, nil
4640 }
4641
4642 func (ec *executionContext) _Query_validType(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
4643 fc, err := ec.fieldContext_Query_validType(ctx, field)
4644 if err != nil {
4645 return graphql.Null
4646 }
4647 ctx = graphql.WithFieldContext(ctx, fc)
4648 defer func() {
4649 if r := recover(); r != nil {
4650 ec.Error(ctx, ec.Recover(ctx, r))
4651 ret = graphql.Null
4652 }
4653 }()
4654 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) {
4655 ctx = rctx
4656 return ec.resolvers.Query().ValidType(rctx)
4657 })
4658
4659 if resTmp == nil {
4660 return graphql.Null
4661 }
4662 res := resTmp.(*ValidType)
4663 fc.Result = res
4664 return ec.marshalOValidType2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐValidType(ctx, field.Selections, res)
4665 }
4666
4667 func (ec *executionContext) fieldContext_Query_validType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
4668 fc = &graphql.FieldContext{
4669 Object: "Query",
4670 Field: field,
4671 IsMethod: true,
4672 IsResolver: true,
4673 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
4674 switch field.Name {
4675 case "differentCase":
4676 return ec.fieldContext_ValidType_differentCase(ctx, field)
4677 case "different_case":
4678 return ec.fieldContext_ValidType_different_case(ctx, field)
4679 case "validInputKeywords":
4680 return ec.fieldContext_ValidType_validInputKeywords(ctx, field)
4681 case "validArgs":
4682 return ec.fieldContext_ValidType_validArgs(ctx, field)
4683 }
4684 return nil, fmt.Errorf("no field named %q was found under type ValidType", field.Name)
4685 },
4686 }
4687 return fc, nil
4688 }
4689
4690 func (ec *executionContext) _Query_variadicModel(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
4691 fc, err := ec.fieldContext_Query_variadicModel(ctx, field)
4692 if err != nil {
4693 return graphql.Null
4694 }
4695 ctx = graphql.WithFieldContext(ctx, fc)
4696 defer func() {
4697 if r := recover(); r != nil {
4698 ec.Error(ctx, ec.Recover(ctx, r))
4699 ret = graphql.Null
4700 }
4701 }()
4702 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) {
4703 ctx = rctx
4704 return ec.resolvers.Query().VariadicModel(rctx)
4705 })
4706
4707 if resTmp == nil {
4708 return graphql.Null
4709 }
4710 res := resTmp.(*VariadicModel)
4711 fc.Result = res
4712 return ec.marshalOVariadicModel2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐVariadicModel(ctx, field.Selections, res)
4713 }
4714
4715 func (ec *executionContext) fieldContext_Query_variadicModel(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
4716 fc = &graphql.FieldContext{
4717 Object: "Query",
4718 Field: field,
4719 IsMethod: true,
4720 IsResolver: true,
4721 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
4722 switch field.Name {
4723 case "value":
4724 return ec.fieldContext_VariadicModel_value(ctx, field)
4725 }
4726 return nil, fmt.Errorf("no field named %q was found under type VariadicModel", field.Name)
4727 },
4728 }
4729 return fc, nil
4730 }
4731
4732 func (ec *executionContext) _Query_wrappedStruct(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
4733 fc, err := ec.fieldContext_Query_wrappedStruct(ctx, field)
4734 if err != nil {
4735 return graphql.Null
4736 }
4737 ctx = graphql.WithFieldContext(ctx, fc)
4738 defer func() {
4739 if r := recover(); r != nil {
4740 ec.Error(ctx, ec.Recover(ctx, r))
4741 ret = graphql.Null
4742 }
4743 }()
4744 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) {
4745 ctx = rctx
4746 return ec.resolvers.Query().WrappedStruct(rctx)
4747 })
4748
4749 if resTmp == nil {
4750 if !graphql.HasFieldError(ctx, fc) {
4751 ec.Errorf(ctx, "must not be null")
4752 }
4753 return graphql.Null
4754 }
4755 res := resTmp.(*WrappedStruct)
4756 fc.Result = res
4757 return ec.marshalNWrappedStruct2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐWrappedStruct(ctx, field.Selections, res)
4758 }
4759
4760 func (ec *executionContext) fieldContext_Query_wrappedStruct(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
4761 fc = &graphql.FieldContext{
4762 Object: "Query",
4763 Field: field,
4764 IsMethod: true,
4765 IsResolver: true,
4766 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
4767 switch field.Name {
4768 case "name":
4769 return ec.fieldContext_WrappedStruct_name(ctx, field)
4770 case "desc":
4771 return ec.fieldContext_WrappedStruct_desc(ctx, field)
4772 }
4773 return nil, fmt.Errorf("no field named %q was found under type WrappedStruct", field.Name)
4774 },
4775 }
4776 return fc, nil
4777 }
4778
4779 func (ec *executionContext) _Query_wrappedScalar(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
4780 fc, err := ec.fieldContext_Query_wrappedScalar(ctx, field)
4781 if err != nil {
4782 return graphql.Null
4783 }
4784 ctx = graphql.WithFieldContext(ctx, fc)
4785 defer func() {
4786 if r := recover(); r != nil {
4787 ec.Error(ctx, ec.Recover(ctx, r))
4788 ret = graphql.Null
4789 }
4790 }()
4791 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) {
4792 ctx = rctx
4793 return ec.resolvers.Query().WrappedScalar(rctx)
4794 })
4795
4796 if resTmp == nil {
4797 if !graphql.HasFieldError(ctx, fc) {
4798 ec.Errorf(ctx, "must not be null")
4799 }
4800 return graphql.Null
4801 }
4802 res := resTmp.(otherpkg.Scalar)
4803 fc.Result = res
4804 return ec.marshalNWrappedScalar2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚋotherpkgᚐScalar(ctx, field.Selections, res)
4805 }
4806
4807 func (ec *executionContext) fieldContext_Query_wrappedScalar(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
4808 fc = &graphql.FieldContext{
4809 Object: "Query",
4810 Field: field,
4811 IsMethod: true,
4812 IsResolver: true,
4813 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
4814 return nil, errors.New("field of type WrappedScalar does not have child fields")
4815 },
4816 }
4817 return fc, nil
4818 }
4819
4820 func (ec *executionContext) _Query_wrappedMap(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
4821 fc, err := ec.fieldContext_Query_wrappedMap(ctx, field)
4822 if err != nil {
4823 return graphql.Null
4824 }
4825 ctx = graphql.WithFieldContext(ctx, fc)
4826 defer func() {
4827 if r := recover(); r != nil {
4828 ec.Error(ctx, ec.Recover(ctx, r))
4829 ret = graphql.Null
4830 }
4831 }()
4832 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) {
4833 ctx = rctx
4834 return ec.resolvers.Query().WrappedMap(rctx)
4835 })
4836
4837 if resTmp == nil {
4838 if !graphql.HasFieldError(ctx, fc) {
4839 ec.Errorf(ctx, "must not be null")
4840 }
4841 return graphql.Null
4842 }
4843 res := resTmp.(WrappedMap)
4844 fc.Result = res
4845 return ec.marshalNWrappedMap2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐWrappedMap(ctx, field.Selections, res)
4846 }
4847
4848 func (ec *executionContext) fieldContext_Query_wrappedMap(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
4849 fc = &graphql.FieldContext{
4850 Object: "Query",
4851 Field: field,
4852 IsMethod: true,
4853 IsResolver: true,
4854 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
4855 switch field.Name {
4856 case "get":
4857 return ec.fieldContext_WrappedMap_get(ctx, field)
4858 }
4859 return nil, fmt.Errorf("no field named %q was found under type WrappedMap", field.Name)
4860 },
4861 }
4862 return fc, nil
4863 }
4864
4865 func (ec *executionContext) _Query_wrappedSlice(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
4866 fc, err := ec.fieldContext_Query_wrappedSlice(ctx, field)
4867 if err != nil {
4868 return graphql.Null
4869 }
4870 ctx = graphql.WithFieldContext(ctx, fc)
4871 defer func() {
4872 if r := recover(); r != nil {
4873 ec.Error(ctx, ec.Recover(ctx, r))
4874 ret = graphql.Null
4875 }
4876 }()
4877 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) {
4878 ctx = rctx
4879 return ec.resolvers.Query().WrappedSlice(rctx)
4880 })
4881
4882 if resTmp == nil {
4883 if !graphql.HasFieldError(ctx, fc) {
4884 ec.Errorf(ctx, "must not be null")
4885 }
4886 return graphql.Null
4887 }
4888 res := resTmp.(WrappedSlice)
4889 fc.Result = res
4890 return ec.marshalNWrappedSlice2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐWrappedSlice(ctx, field.Selections, res)
4891 }
4892
4893 func (ec *executionContext) fieldContext_Query_wrappedSlice(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
4894 fc = &graphql.FieldContext{
4895 Object: "Query",
4896 Field: field,
4897 IsMethod: true,
4898 IsResolver: true,
4899 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
4900 switch field.Name {
4901 case "get":
4902 return ec.fieldContext_WrappedSlice_get(ctx, field)
4903 }
4904 return nil, fmt.Errorf("no field named %q was found under type WrappedSlice", field.Name)
4905 },
4906 }
4907 return fc, nil
4908 }
4909
4910 func (ec *executionContext) _Query___type(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
4911 fc, err := ec.fieldContext_Query___type(ctx, field)
4912 if err != nil {
4913 return graphql.Null
4914 }
4915 ctx = graphql.WithFieldContext(ctx, fc)
4916 defer func() {
4917 if r := recover(); r != nil {
4918 ec.Error(ctx, ec.Recover(ctx, r))
4919 ret = graphql.Null
4920 }
4921 }()
4922 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) {
4923 ctx = rctx
4924 return ec.introspectType(fc.Args["name"].(string))
4925 })
4926
4927 if resTmp == nil {
4928 return graphql.Null
4929 }
4930 res := resTmp.(*introspection.Type)
4931 fc.Result = res
4932 return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
4933 }
4934
4935 func (ec *executionContext) fieldContext_Query___type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
4936 fc = &graphql.FieldContext{
4937 Object: "Query",
4938 Field: field,
4939 IsMethod: true,
4940 IsResolver: false,
4941 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
4942 switch field.Name {
4943 case "kind":
4944 return ec.fieldContext___Type_kind(ctx, field)
4945 case "name":
4946 return ec.fieldContext___Type_name(ctx, field)
4947 case "description":
4948 return ec.fieldContext___Type_description(ctx, field)
4949 case "fields":
4950 return ec.fieldContext___Type_fields(ctx, field)
4951 case "interfaces":
4952 return ec.fieldContext___Type_interfaces(ctx, field)
4953 case "possibleTypes":
4954 return ec.fieldContext___Type_possibleTypes(ctx, field)
4955 case "enumValues":
4956 return ec.fieldContext___Type_enumValues(ctx, field)
4957 case "inputFields":
4958 return ec.fieldContext___Type_inputFields(ctx, field)
4959 case "ofType":
4960 return ec.fieldContext___Type_ofType(ctx, field)
4961 case "specifiedByURL":
4962 return ec.fieldContext___Type_specifiedByURL(ctx, field)
4963 }
4964 return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name)
4965 },
4966 }
4967 defer func() {
4968 if r := recover(); r != nil {
4969 err = ec.Recover(ctx, r)
4970 ec.Error(ctx, err)
4971 }
4972 }()
4973 ctx = graphql.WithFieldContext(ctx, fc)
4974 if fc.Args, err = ec.field_Query___type_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
4975 ec.Error(ctx, err)
4976 return fc, err
4977 }
4978 return fc, nil
4979 }
4980
4981 func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
4982 fc, err := ec.fieldContext_Query___schema(ctx, field)
4983 if err != nil {
4984 return graphql.Null
4985 }
4986 ctx = graphql.WithFieldContext(ctx, fc)
4987 defer func() {
4988 if r := recover(); r != nil {
4989 ec.Error(ctx, ec.Recover(ctx, r))
4990 ret = graphql.Null
4991 }
4992 }()
4993 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) {
4994 ctx = rctx
4995 return ec.introspectSchema()
4996 })
4997
4998 if resTmp == nil {
4999 return graphql.Null
5000 }
5001 res := resTmp.(*introspection.Schema)
5002 fc.Result = res
5003 return ec.marshalO__Schema2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐSchema(ctx, field.Selections, res)
5004 }
5005
5006 func (ec *executionContext) fieldContext_Query___schema(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
5007 fc = &graphql.FieldContext{
5008 Object: "Query",
5009 Field: field,
5010 IsMethod: true,
5011 IsResolver: false,
5012 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
5013 switch field.Name {
5014 case "description":
5015 return ec.fieldContext___Schema_description(ctx, field)
5016 case "types":
5017 return ec.fieldContext___Schema_types(ctx, field)
5018 case "queryType":
5019 return ec.fieldContext___Schema_queryType(ctx, field)
5020 case "mutationType":
5021 return ec.fieldContext___Schema_mutationType(ctx, field)
5022 case "subscriptionType":
5023 return ec.fieldContext___Schema_subscriptionType(ctx, field)
5024 case "directives":
5025 return ec.fieldContext___Schema_directives(ctx, field)
5026 }
5027 return nil, fmt.Errorf("no field named %q was found under type __Schema", field.Name)
5028 },
5029 }
5030 return fc, nil
5031 }
5032
5033 func (ec *executionContext) _Subscription_updated(ctx context.Context, field graphql.CollectedField) (ret func(ctx context.Context) graphql.Marshaler) {
5034 fc, err := ec.fieldContext_Subscription_updated(ctx, field)
5035 if err != nil {
5036 return nil
5037 }
5038 ctx = graphql.WithFieldContext(ctx, fc)
5039 defer func() {
5040 if r := recover(); r != nil {
5041 ec.Error(ctx, ec.Recover(ctx, r))
5042 ret = nil
5043 }
5044 }()
5045 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) {
5046 ctx = rctx
5047 return ec.resolvers.Subscription().Updated(rctx)
5048 })
5049
5050 if resTmp == nil {
5051 if !graphql.HasFieldError(ctx, fc) {
5052 ec.Errorf(ctx, "must not be null")
5053 }
5054 return nil
5055 }
5056 return func(ctx context.Context) graphql.Marshaler {
5057 select {
5058 case res, ok := <-resTmp.(<-chan string):
5059 if !ok {
5060 return nil
5061 }
5062 return graphql.WriterFunc(func(w io.Writer) {
5063 w.Write([]byte{'{'})
5064 graphql.MarshalString(field.Alias).MarshalGQL(w)
5065 w.Write([]byte{':'})
5066 ec.marshalNString2string(ctx, field.Selections, res).MarshalGQL(w)
5067 w.Write([]byte{'}'})
5068 })
5069 case <-ctx.Done():
5070 return nil
5071 }
5072 }
5073 }
5074
5075 func (ec *executionContext) fieldContext_Subscription_updated(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
5076 fc = &graphql.FieldContext{
5077 Object: "Subscription",
5078 Field: field,
5079 IsMethod: true,
5080 IsResolver: true,
5081 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
5082 return nil, errors.New("field of type String does not have child fields")
5083 },
5084 }
5085 return fc, nil
5086 }
5087
5088 func (ec *executionContext) _Subscription_initPayload(ctx context.Context, field graphql.CollectedField) (ret func(ctx context.Context) graphql.Marshaler) {
5089 fc, err := ec.fieldContext_Subscription_initPayload(ctx, field)
5090 if err != nil {
5091 return nil
5092 }
5093 ctx = graphql.WithFieldContext(ctx, fc)
5094 defer func() {
5095 if r := recover(); r != nil {
5096 ec.Error(ctx, ec.Recover(ctx, r))
5097 ret = nil
5098 }
5099 }()
5100 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) {
5101 ctx = rctx
5102 return ec.resolvers.Subscription().InitPayload(rctx)
5103 })
5104
5105 if resTmp == nil {
5106 if !graphql.HasFieldError(ctx, fc) {
5107 ec.Errorf(ctx, "must not be null")
5108 }
5109 return nil
5110 }
5111 return func(ctx context.Context) graphql.Marshaler {
5112 select {
5113 case res, ok := <-resTmp.(<-chan string):
5114 if !ok {
5115 return nil
5116 }
5117 return graphql.WriterFunc(func(w io.Writer) {
5118 w.Write([]byte{'{'})
5119 graphql.MarshalString(field.Alias).MarshalGQL(w)
5120 w.Write([]byte{':'})
5121 ec.marshalNString2string(ctx, field.Selections, res).MarshalGQL(w)
5122 w.Write([]byte{'}'})
5123 })
5124 case <-ctx.Done():
5125 return nil
5126 }
5127 }
5128 }
5129
5130 func (ec *executionContext) fieldContext_Subscription_initPayload(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
5131 fc = &graphql.FieldContext{
5132 Object: "Subscription",
5133 Field: field,
5134 IsMethod: true,
5135 IsResolver: true,
5136 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
5137 return nil, errors.New("field of type String does not have child fields")
5138 },
5139 }
5140 return fc, nil
5141 }
5142
5143 func (ec *executionContext) _Subscription_directiveArg(ctx context.Context, field graphql.CollectedField) (ret func(ctx context.Context) graphql.Marshaler) {
5144 fc, err := ec.fieldContext_Subscription_directiveArg(ctx, field)
5145 if err != nil {
5146 return nil
5147 }
5148 ctx = graphql.WithFieldContext(ctx, fc)
5149 defer func() {
5150 if r := recover(); r != nil {
5151 ec.Error(ctx, ec.Recover(ctx, r))
5152 ret = nil
5153 }
5154 }()
5155 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) {
5156 ctx = rctx
5157 return ec.resolvers.Subscription().DirectiveArg(rctx, fc.Args["arg"].(string))
5158 })
5159
5160 if resTmp == nil {
5161 return nil
5162 }
5163 return func(ctx context.Context) graphql.Marshaler {
5164 select {
5165 case res, ok := <-resTmp.(<-chan *string):
5166 if !ok {
5167 return nil
5168 }
5169 return graphql.WriterFunc(func(w io.Writer) {
5170 w.Write([]byte{'{'})
5171 graphql.MarshalString(field.Alias).MarshalGQL(w)
5172 w.Write([]byte{':'})
5173 ec.marshalOString2ᚖstring(ctx, field.Selections, res).MarshalGQL(w)
5174 w.Write([]byte{'}'})
5175 })
5176 case <-ctx.Done():
5177 return nil
5178 }
5179 }
5180 }
5181
5182 func (ec *executionContext) fieldContext_Subscription_directiveArg(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
5183 fc = &graphql.FieldContext{
5184 Object: "Subscription",
5185 Field: field,
5186 IsMethod: true,
5187 IsResolver: true,
5188 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
5189 return nil, errors.New("field of type String does not have child fields")
5190 },
5191 }
5192 defer func() {
5193 if r := recover(); r != nil {
5194 err = ec.Recover(ctx, r)
5195 ec.Error(ctx, err)
5196 }
5197 }()
5198 ctx = graphql.WithFieldContext(ctx, fc)
5199 if fc.Args, err = ec.field_Subscription_directiveArg_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
5200 ec.Error(ctx, err)
5201 return fc, err
5202 }
5203 return fc, nil
5204 }
5205
5206 func (ec *executionContext) _Subscription_directiveNullableArg(ctx context.Context, field graphql.CollectedField) (ret func(ctx context.Context) graphql.Marshaler) {
5207 fc, err := ec.fieldContext_Subscription_directiveNullableArg(ctx, field)
5208 if err != nil {
5209 return nil
5210 }
5211 ctx = graphql.WithFieldContext(ctx, fc)
5212 defer func() {
5213 if r := recover(); r != nil {
5214 ec.Error(ctx, ec.Recover(ctx, r))
5215 ret = nil
5216 }
5217 }()
5218 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) {
5219 ctx = rctx
5220 return ec.resolvers.Subscription().DirectiveNullableArg(rctx, fc.Args["arg"].(*int), fc.Args["arg2"].(*int), fc.Args["arg3"].(*string))
5221 })
5222
5223 if resTmp == nil {
5224 return nil
5225 }
5226 return func(ctx context.Context) graphql.Marshaler {
5227 select {
5228 case res, ok := <-resTmp.(<-chan *string):
5229 if !ok {
5230 return nil
5231 }
5232 return graphql.WriterFunc(func(w io.Writer) {
5233 w.Write([]byte{'{'})
5234 graphql.MarshalString(field.Alias).MarshalGQL(w)
5235 w.Write([]byte{':'})
5236 ec.marshalOString2ᚖstring(ctx, field.Selections, res).MarshalGQL(w)
5237 w.Write([]byte{'}'})
5238 })
5239 case <-ctx.Done():
5240 return nil
5241 }
5242 }
5243 }
5244
5245 func (ec *executionContext) fieldContext_Subscription_directiveNullableArg(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
5246 fc = &graphql.FieldContext{
5247 Object: "Subscription",
5248 Field: field,
5249 IsMethod: true,
5250 IsResolver: true,
5251 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
5252 return nil, errors.New("field of type String does not have child fields")
5253 },
5254 }
5255 defer func() {
5256 if r := recover(); r != nil {
5257 err = ec.Recover(ctx, r)
5258 ec.Error(ctx, err)
5259 }
5260 }()
5261 ctx = graphql.WithFieldContext(ctx, fc)
5262 if fc.Args, err = ec.field_Subscription_directiveNullableArg_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
5263 ec.Error(ctx, err)
5264 return fc, err
5265 }
5266 return fc, nil
5267 }
5268
5269 func (ec *executionContext) _Subscription_directiveDouble(ctx context.Context, field graphql.CollectedField) (ret func(ctx context.Context) graphql.Marshaler) {
5270 fc, err := ec.fieldContext_Subscription_directiveDouble(ctx, field)
5271 if err != nil {
5272 return nil
5273 }
5274 ctx = graphql.WithFieldContext(ctx, fc)
5275 defer func() {
5276 if r := recover(); r != nil {
5277 ec.Error(ctx, ec.Recover(ctx, r))
5278 ret = nil
5279 }
5280 }()
5281 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) {
5282 directive0 := func(rctx context.Context) (interface{}, error) {
5283 ctx = rctx
5284 return ec.resolvers.Subscription().DirectiveDouble(rctx)
5285 }
5286 directive1 := func(ctx context.Context) (interface{}, error) {
5287 if ec.directives.Directive1 == nil {
5288 return nil, errors.New("directive directive1 is not implemented")
5289 }
5290 return ec.directives.Directive1(ctx, nil, directive0)
5291 }
5292 directive2 := func(ctx context.Context) (interface{}, error) {
5293 if ec.directives.Directive2 == nil {
5294 return nil, errors.New("directive directive2 is not implemented")
5295 }
5296 return ec.directives.Directive2(ctx, nil, directive1)
5297 }
5298
5299 tmp, err := directive2(rctx)
5300 if err != nil {
5301 return nil, graphql.ErrorOnPath(ctx, err)
5302 }
5303 if tmp == nil {
5304 return nil, nil
5305 }
5306 if data, ok := tmp.(<-chan *string); ok {
5307 return data, nil
5308 }
5309 return nil, fmt.Errorf(`unexpected type %T from directive, should be <-chan *string`, tmp)
5310 })
5311
5312 if resTmp == nil {
5313 return nil
5314 }
5315 return func(ctx context.Context) graphql.Marshaler {
5316 select {
5317 case res, ok := <-resTmp.(<-chan *string):
5318 if !ok {
5319 return nil
5320 }
5321 return graphql.WriterFunc(func(w io.Writer) {
5322 w.Write([]byte{'{'})
5323 graphql.MarshalString(field.Alias).MarshalGQL(w)
5324 w.Write([]byte{':'})
5325 ec.marshalOString2ᚖstring(ctx, field.Selections, res).MarshalGQL(w)
5326 w.Write([]byte{'}'})
5327 })
5328 case <-ctx.Done():
5329 return nil
5330 }
5331 }
5332 }
5333
5334 func (ec *executionContext) fieldContext_Subscription_directiveDouble(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
5335 fc = &graphql.FieldContext{
5336 Object: "Subscription",
5337 Field: field,
5338 IsMethod: true,
5339 IsResolver: true,
5340 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
5341 return nil, errors.New("field of type String does not have child fields")
5342 },
5343 }
5344 return fc, nil
5345 }
5346
5347 func (ec *executionContext) _Subscription_directiveUnimplemented(ctx context.Context, field graphql.CollectedField) (ret func(ctx context.Context) graphql.Marshaler) {
5348 fc, err := ec.fieldContext_Subscription_directiveUnimplemented(ctx, field)
5349 if err != nil {
5350 return nil
5351 }
5352 ctx = graphql.WithFieldContext(ctx, fc)
5353 defer func() {
5354 if r := recover(); r != nil {
5355 ec.Error(ctx, ec.Recover(ctx, r))
5356 ret = nil
5357 }
5358 }()
5359 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) {
5360 directive0 := func(rctx context.Context) (interface{}, error) {
5361 ctx = rctx
5362 return ec.resolvers.Subscription().DirectiveUnimplemented(rctx)
5363 }
5364 directive1 := func(ctx context.Context) (interface{}, error) {
5365 if ec.directives.Unimplemented == nil {
5366 return nil, errors.New("directive unimplemented is not implemented")
5367 }
5368 return ec.directives.Unimplemented(ctx, nil, directive0)
5369 }
5370
5371 tmp, err := directive1(rctx)
5372 if err != nil {
5373 return nil, graphql.ErrorOnPath(ctx, err)
5374 }
5375 if tmp == nil {
5376 return nil, nil
5377 }
5378 if data, ok := tmp.(<-chan *string); ok {
5379 return data, nil
5380 }
5381 return nil, fmt.Errorf(`unexpected type %T from directive, should be <-chan *string`, tmp)
5382 })
5383
5384 if resTmp == nil {
5385 return nil
5386 }
5387 return func(ctx context.Context) graphql.Marshaler {
5388 select {
5389 case res, ok := <-resTmp.(<-chan *string):
5390 if !ok {
5391 return nil
5392 }
5393 return graphql.WriterFunc(func(w io.Writer) {
5394 w.Write([]byte{'{'})
5395 graphql.MarshalString(field.Alias).MarshalGQL(w)
5396 w.Write([]byte{':'})
5397 ec.marshalOString2ᚖstring(ctx, field.Selections, res).MarshalGQL(w)
5398 w.Write([]byte{'}'})
5399 })
5400 case <-ctx.Done():
5401 return nil
5402 }
5403 }
5404 }
5405
5406 func (ec *executionContext) fieldContext_Subscription_directiveUnimplemented(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
5407 fc = &graphql.FieldContext{
5408 Object: "Subscription",
5409 Field: field,
5410 IsMethod: true,
5411 IsResolver: true,
5412 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
5413 return nil, errors.New("field of type String does not have child fields")
5414 },
5415 }
5416 return fc, nil
5417 }
5418
5419 func (ec *executionContext) _Subscription_issue896b(ctx context.Context, field graphql.CollectedField) (ret func(ctx context.Context) graphql.Marshaler) {
5420 fc, err := ec.fieldContext_Subscription_issue896b(ctx, field)
5421 if err != nil {
5422 return nil
5423 }
5424 ctx = graphql.WithFieldContext(ctx, fc)
5425 defer func() {
5426 if r := recover(); r != nil {
5427 ec.Error(ctx, ec.Recover(ctx, r))
5428 ret = nil
5429 }
5430 }()
5431 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) {
5432 ctx = rctx
5433 return ec.resolvers.Subscription().Issue896b(rctx)
5434 })
5435
5436 if resTmp == nil {
5437 return nil
5438 }
5439 return func(ctx context.Context) graphql.Marshaler {
5440 select {
5441 case res, ok := <-resTmp.(<-chan []*CheckIssue896):
5442 if !ok {
5443 return nil
5444 }
5445 return graphql.WriterFunc(func(w io.Writer) {
5446 w.Write([]byte{'{'})
5447 graphql.MarshalString(field.Alias).MarshalGQL(w)
5448 w.Write([]byte{':'})
5449 ec.marshalOCheckIssue8962ᚕᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐCheckIssue896(ctx, field.Selections, res).MarshalGQL(w)
5450 w.Write([]byte{'}'})
5451 })
5452 case <-ctx.Done():
5453 return nil
5454 }
5455 }
5456 }
5457
5458 func (ec *executionContext) fieldContext_Subscription_issue896b(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
5459 fc = &graphql.FieldContext{
5460 Object: "Subscription",
5461 Field: field,
5462 IsMethod: true,
5463 IsResolver: true,
5464 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
5465 switch field.Name {
5466 case "id":
5467 return ec.fieldContext_CheckIssue896_id(ctx, field)
5468 }
5469 return nil, fmt.Errorf("no field named %q was found under type CheckIssue896", field.Name)
5470 },
5471 }
5472 return fc, nil
5473 }
5474
5475 func (ec *executionContext) _Subscription_errorRequired(ctx context.Context, field graphql.CollectedField) (ret func(ctx context.Context) graphql.Marshaler) {
5476 fc, err := ec.fieldContext_Subscription_errorRequired(ctx, field)
5477 if err != nil {
5478 return nil
5479 }
5480 ctx = graphql.WithFieldContext(ctx, fc)
5481 defer func() {
5482 if r := recover(); r != nil {
5483 ec.Error(ctx, ec.Recover(ctx, r))
5484 ret = nil
5485 }
5486 }()
5487 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) {
5488 ctx = rctx
5489 return ec.resolvers.Subscription().ErrorRequired(rctx)
5490 })
5491
5492 if resTmp == nil {
5493 if !graphql.HasFieldError(ctx, fc) {
5494 ec.Errorf(ctx, "must not be null")
5495 }
5496 return nil
5497 }
5498 return func(ctx context.Context) graphql.Marshaler {
5499 select {
5500 case res, ok := <-resTmp.(<-chan *Error):
5501 if !ok {
5502 return nil
5503 }
5504 return graphql.WriterFunc(func(w io.Writer) {
5505 w.Write([]byte{'{'})
5506 graphql.MarshalString(field.Alias).MarshalGQL(w)
5507 w.Write([]byte{':'})
5508 ec.marshalNError2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐError(ctx, field.Selections, res).MarshalGQL(w)
5509 w.Write([]byte{'}'})
5510 })
5511 case <-ctx.Done():
5512 return nil
5513 }
5514 }
5515 }
5516
5517 func (ec *executionContext) fieldContext_Subscription_errorRequired(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
5518 fc = &graphql.FieldContext{
5519 Object: "Subscription",
5520 Field: field,
5521 IsMethod: true,
5522 IsResolver: true,
5523 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
5524 switch field.Name {
5525 case "id":
5526 return ec.fieldContext_Error_id(ctx, field)
5527 case "errorOnNonRequiredField":
5528 return ec.fieldContext_Error_errorOnNonRequiredField(ctx, field)
5529 case "errorOnRequiredField":
5530 return ec.fieldContext_Error_errorOnRequiredField(ctx, field)
5531 case "nilOnRequiredField":
5532 return ec.fieldContext_Error_nilOnRequiredField(ctx, field)
5533 }
5534 return nil, fmt.Errorf("no field named %q was found under type Error", field.Name)
5535 },
5536 }
5537 return fc, nil
5538 }
5539
5540 func (ec *executionContext) _User_id(ctx context.Context, field graphql.CollectedField, obj *User) (ret graphql.Marshaler) {
5541 fc, err := ec.fieldContext_User_id(ctx, field)
5542 if err != nil {
5543 return graphql.Null
5544 }
5545 ctx = graphql.WithFieldContext(ctx, fc)
5546 defer func() {
5547 if r := recover(); r != nil {
5548 ec.Error(ctx, ec.Recover(ctx, r))
5549 ret = graphql.Null
5550 }
5551 }()
5552 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
5553 ctx = rctx
5554 return obj.ID, nil
5555 })
5556
5557 if resTmp == nil {
5558 if !graphql.HasFieldError(ctx, fc) {
5559 ec.Errorf(ctx, "must not be null")
5560 }
5561 return graphql.Null
5562 }
5563 res := resTmp.(int)
5564 fc.Result = res
5565 return ec.marshalNInt2int(ctx, field.Selections, res)
5566 }
5567
5568 func (ec *executionContext) fieldContext_User_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
5569 fc = &graphql.FieldContext{
5570 Object: "User",
5571 Field: field,
5572 IsMethod: false,
5573 IsResolver: false,
5574 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
5575 return nil, errors.New("field of type Int does not have child fields")
5576 },
5577 }
5578 return fc, nil
5579 }
5580
5581 func (ec *executionContext) _User_friends(ctx context.Context, field graphql.CollectedField, obj *User) (ret graphql.Marshaler) {
5582 fc, err := ec.fieldContext_User_friends(ctx, field)
5583 if err != nil {
5584 return graphql.Null
5585 }
5586 ctx = graphql.WithFieldContext(ctx, fc)
5587 defer func() {
5588 if r := recover(); r != nil {
5589 ec.Error(ctx, ec.Recover(ctx, r))
5590 ret = graphql.Null
5591 }
5592 }()
5593 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
5594 ctx = rctx
5595 return ec.resolvers.User().Friends(rctx, obj)
5596 })
5597
5598 if resTmp == nil {
5599 if !graphql.HasFieldError(ctx, fc) {
5600 ec.Errorf(ctx, "must not be null")
5601 }
5602 return graphql.Null
5603 }
5604 res := resTmp.([]*User)
5605 fc.Result = res
5606 return ec.marshalNUser2ᚕᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐUserᚄ(ctx, field.Selections, res)
5607 }
5608
5609 func (ec *executionContext) fieldContext_User_friends(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
5610 fc = &graphql.FieldContext{
5611 Object: "User",
5612 Field: field,
5613 IsMethod: true,
5614 IsResolver: true,
5615 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
5616 switch field.Name {
5617 case "id":
5618 return ec.fieldContext_User_id(ctx, field)
5619 case "friends":
5620 return ec.fieldContext_User_friends(ctx, field)
5621 case "created":
5622 return ec.fieldContext_User_created(ctx, field)
5623 case "updated":
5624 return ec.fieldContext_User_updated(ctx, field)
5625 case "pets":
5626 return ec.fieldContext_User_pets(ctx, field)
5627 }
5628 return nil, fmt.Errorf("no field named %q was found under type User", field.Name)
5629 },
5630 }
5631 return fc, nil
5632 }
5633
5634 func (ec *executionContext) _User_created(ctx context.Context, field graphql.CollectedField, obj *User) (ret graphql.Marshaler) {
5635 fc, err := ec.fieldContext_User_created(ctx, field)
5636 if err != nil {
5637 return graphql.Null
5638 }
5639 ctx = graphql.WithFieldContext(ctx, fc)
5640 defer func() {
5641 if r := recover(); r != nil {
5642 ec.Error(ctx, ec.Recover(ctx, r))
5643 ret = graphql.Null
5644 }
5645 }()
5646 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
5647 ctx = rctx
5648 return obj.Created, nil
5649 })
5650
5651 if resTmp == nil {
5652 if !graphql.HasFieldError(ctx, fc) {
5653 ec.Errorf(ctx, "must not be null")
5654 }
5655 return graphql.Null
5656 }
5657 res := resTmp.(time.Time)
5658 fc.Result = res
5659 return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res)
5660 }
5661
5662 func (ec *executionContext) fieldContext_User_created(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
5663 fc = &graphql.FieldContext{
5664 Object: "User",
5665 Field: field,
5666 IsMethod: false,
5667 IsResolver: false,
5668 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
5669 return nil, errors.New("field of type Time does not have child fields")
5670 },
5671 }
5672 return fc, nil
5673 }
5674
5675 func (ec *executionContext) _User_updated(ctx context.Context, field graphql.CollectedField, obj *User) (ret graphql.Marshaler) {
5676 fc, err := ec.fieldContext_User_updated(ctx, field)
5677 if err != nil {
5678 return graphql.Null
5679 }
5680 ctx = graphql.WithFieldContext(ctx, fc)
5681 defer func() {
5682 if r := recover(); r != nil {
5683 ec.Error(ctx, ec.Recover(ctx, r))
5684 ret = graphql.Null
5685 }
5686 }()
5687 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
5688 ctx = rctx
5689 return obj.Updated, nil
5690 })
5691
5692 if resTmp == nil {
5693 return graphql.Null
5694 }
5695 res := resTmp.(*time.Time)
5696 fc.Result = res
5697 return ec.marshalOTime2ᚖtimeᚐTime(ctx, field.Selections, res)
5698 }
5699
5700 func (ec *executionContext) fieldContext_User_updated(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
5701 fc = &graphql.FieldContext{
5702 Object: "User",
5703 Field: field,
5704 IsMethod: false,
5705 IsResolver: false,
5706 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
5707 return nil, errors.New("field of type Time does not have child fields")
5708 },
5709 }
5710 return fc, nil
5711 }
5712
5713 func (ec *executionContext) _User_pets(ctx context.Context, field graphql.CollectedField, obj *User) (ret graphql.Marshaler) {
5714 fc, err := ec.fieldContext_User_pets(ctx, field)
5715 if err != nil {
5716 return graphql.Null
5717 }
5718 ctx = graphql.WithFieldContext(ctx, fc)
5719 defer func() {
5720 if r := recover(); r != nil {
5721 ec.Error(ctx, ec.Recover(ctx, r))
5722 ret = graphql.Null
5723 }
5724 }()
5725 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
5726 ctx = rctx
5727 return ec.resolvers.User().Pets(rctx, obj, fc.Args["limit"].(*int))
5728 })
5729
5730 if resTmp == nil {
5731 return graphql.Null
5732 }
5733 res := resTmp.([]*Pet)
5734 fc.Result = res
5735 return ec.marshalOPet2ᚕᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐPetᚄ(ctx, field.Selections, res)
5736 }
5737
5738 func (ec *executionContext) fieldContext_User_pets(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
5739 fc = &graphql.FieldContext{
5740 Object: "User",
5741 Field: field,
5742 IsMethod: true,
5743 IsResolver: true,
5744 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
5745 switch field.Name {
5746 case "id":
5747 return ec.fieldContext_Pet_id(ctx, field)
5748 case "friends":
5749 return ec.fieldContext_Pet_friends(ctx, field)
5750 }
5751 return nil, fmt.Errorf("no field named %q was found under type Pet", field.Name)
5752 },
5753 }
5754 defer func() {
5755 if r := recover(); r != nil {
5756 err = ec.Recover(ctx, r)
5757 ec.Error(ctx, err)
5758 }
5759 }()
5760 ctx = graphql.WithFieldContext(ctx, fc)
5761 if fc.Args, err = ec.field_User_pets_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
5762 ec.Error(ctx, err)
5763 return fc, err
5764 }
5765 return fc, nil
5766 }
5767
5768
5769
5770
5771
5772 func (ec *executionContext) unmarshalInputChanges(ctx context.Context, obj interface{}) (map[string]interface{}, error) {
5773 it := make(map[string]interface{}, len(obj.(map[string]interface{})))
5774 asMap := map[string]interface{}{}
5775 for k, v := range obj.(map[string]interface{}) {
5776 asMap[k] = v
5777 }
5778
5779 fieldsInOrder := [...]string{"a", "b"}
5780 for _, k := range fieldsInOrder {
5781 v, ok := asMap[k]
5782 if !ok {
5783 continue
5784 }
5785 switch k {
5786 case "a":
5787 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("a"))
5788 data, err := ec.unmarshalOInt2ᚖint(ctx, v)
5789 if err != nil {
5790 return it, err
5791 }
5792 it["a"] = data
5793 case "b":
5794 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("b"))
5795 data, err := ec.unmarshalOInt2ᚖint(ctx, v)
5796 if err != nil {
5797 return it, err
5798 }
5799 it["b"] = data
5800 }
5801 }
5802
5803 return it, nil
5804 }
5805
5806 func (ec *executionContext) unmarshalInputInnerInput(ctx context.Context, obj interface{}) (InnerInput, error) {
5807 var it InnerInput
5808 asMap := map[string]interface{}{}
5809 for k, v := range obj.(map[string]interface{}) {
5810 asMap[k] = v
5811 }
5812
5813 fieldsInOrder := [...]string{"id"}
5814 for _, k := range fieldsInOrder {
5815 v, ok := asMap[k]
5816 if !ok {
5817 continue
5818 }
5819 switch k {
5820 case "id":
5821 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("id"))
5822 data, err := ec.unmarshalNInt2int(ctx, v)
5823 if err != nil {
5824 return it, err
5825 }
5826 it.ID = data
5827 }
5828 }
5829
5830 return it, nil
5831 }
5832
5833 func (ec *executionContext) unmarshalInputOmittableInput(ctx context.Context, obj interface{}) (OmittableInput, error) {
5834 var it OmittableInput
5835 asMap := map[string]interface{}{}
5836 for k, v := range obj.(map[string]interface{}) {
5837 asMap[k] = v
5838 }
5839
5840 fieldsInOrder := [...]string{"id", "bool", "str", "int", "time", "enum", "scalar", "object"}
5841 for _, k := range fieldsInOrder {
5842 v, ok := asMap[k]
5843 if !ok {
5844 continue
5845 }
5846 switch k {
5847 case "id":
5848 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("id"))
5849 data, err := ec.unmarshalOID2ᚖstring(ctx, v)
5850 if err != nil {
5851 return it, err
5852 }
5853 it.ID = graphql.OmittableOf(data)
5854 case "bool":
5855 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("bool"))
5856 data, err := ec.unmarshalOBoolean2ᚖbool(ctx, v)
5857 if err != nil {
5858 return it, err
5859 }
5860 it.Bool = graphql.OmittableOf(data)
5861 case "str":
5862 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("str"))
5863 data, err := ec.unmarshalOString2ᚖstring(ctx, v)
5864 if err != nil {
5865 return it, err
5866 }
5867 it.Str = graphql.OmittableOf(data)
5868 case "int":
5869 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("int"))
5870 data, err := ec.unmarshalOInt2ᚖint(ctx, v)
5871 if err != nil {
5872 return it, err
5873 }
5874 it.Int = graphql.OmittableOf(data)
5875 case "time":
5876 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("time"))
5877 data, err := ec.unmarshalOTime2ᚖtimeᚐTime(ctx, v)
5878 if err != nil {
5879 return it, err
5880 }
5881 it.Time = graphql.OmittableOf(data)
5882 case "enum":
5883 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("enum"))
5884 data, err := ec.unmarshalOStatus2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐStatus(ctx, v)
5885 if err != nil {
5886 return it, err
5887 }
5888 it.Enum = graphql.OmittableOf(data)
5889 case "scalar":
5890 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("scalar"))
5891 data, err := ec.unmarshalOThirdParty2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐThirdParty(ctx, v)
5892 if err != nil {
5893 return it, err
5894 }
5895 it.Scalar = graphql.OmittableOf(data)
5896 case "object":
5897 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("object"))
5898 data, err := ec.unmarshalOOuterInput2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐOuterInput(ctx, v)
5899 if err != nil {
5900 return it, err
5901 }
5902 it.Object = graphql.OmittableOf(data)
5903 }
5904 }
5905
5906 return it, nil
5907 }
5908
5909 func (ec *executionContext) unmarshalInputOuterInput(ctx context.Context, obj interface{}) (OuterInput, error) {
5910 var it OuterInput
5911 asMap := map[string]interface{}{}
5912 for k, v := range obj.(map[string]interface{}) {
5913 asMap[k] = v
5914 }
5915
5916 fieldsInOrder := [...]string{"inner"}
5917 for _, k := range fieldsInOrder {
5918 v, ok := asMap[k]
5919 if !ok {
5920 continue
5921 }
5922 switch k {
5923 case "inner":
5924 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("inner"))
5925 data, err := ec.unmarshalNInnerInput2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐInnerInput(ctx, v)
5926 if err != nil {
5927 return it, err
5928 }
5929 it.Inner = data
5930 }
5931 }
5932
5933 return it, nil
5934 }
5935
5936 func (ec *executionContext) unmarshalInputRecursiveInputSlice(ctx context.Context, obj interface{}) (RecursiveInputSlice, error) {
5937 var it RecursiveInputSlice
5938 asMap := map[string]interface{}{}
5939 for k, v := range obj.(map[string]interface{}) {
5940 asMap[k] = v
5941 }
5942
5943 fieldsInOrder := [...]string{"self"}
5944 for _, k := range fieldsInOrder {
5945 v, ok := asMap[k]
5946 if !ok {
5947 continue
5948 }
5949 switch k {
5950 case "self":
5951 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("self"))
5952 data, err := ec.unmarshalORecursiveInputSlice2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐRecursiveInputSliceᚄ(ctx, v)
5953 if err != nil {
5954 return it, err
5955 }
5956 it.Self = data
5957 }
5958 }
5959
5960 return it, nil
5961 }
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971 var autobindImplementors = []string{"Autobind"}
5972
5973 func (ec *executionContext) _Autobind(ctx context.Context, sel ast.SelectionSet, obj *Autobind) graphql.Marshaler {
5974 fields := graphql.CollectFields(ec.OperationContext, sel, autobindImplementors)
5975
5976 out := graphql.NewFieldSet(fields)
5977 deferred := make(map[string]*graphql.FieldSet)
5978 for i, field := range fields {
5979 switch field.Name {
5980 case "__typename":
5981 out.Values[i] = graphql.MarshalString("Autobind")
5982 case "int":
5983 out.Values[i] = ec._Autobind_int(ctx, field, obj)
5984 if out.Values[i] == graphql.Null {
5985 out.Invalids++
5986 }
5987 case "int32":
5988 out.Values[i] = ec._Autobind_int32(ctx, field, obj)
5989 if out.Values[i] == graphql.Null {
5990 out.Invalids++
5991 }
5992 case "int64":
5993 out.Values[i] = ec._Autobind_int64(ctx, field, obj)
5994 if out.Values[i] == graphql.Null {
5995 out.Invalids++
5996 }
5997 case "idStr":
5998 out.Values[i] = ec._Autobind_idStr(ctx, field, obj)
5999 if out.Values[i] == graphql.Null {
6000 out.Invalids++
6001 }
6002 case "idInt":
6003 out.Values[i] = ec._Autobind_idInt(ctx, field, obj)
6004 if out.Values[i] == graphql.Null {
6005 out.Invalids++
6006 }
6007 default:
6008 panic("unknown field " + strconv.Quote(field.Name))
6009 }
6010 }
6011 out.Dispatch(ctx)
6012 if out.Invalids > 0 {
6013 return graphql.Null
6014 }
6015
6016 atomic.AddInt32(&ec.deferred, int32(len(deferred)))
6017
6018 for label, dfs := range deferred {
6019 ec.processDeferredGroup(graphql.DeferredGroup{
6020 Label: label,
6021 Path: graphql.GetPath(ctx),
6022 FieldSet: dfs,
6023 Context: ctx,
6024 })
6025 }
6026
6027 return out
6028 }
6029
6030 var embeddedPointerImplementors = []string{"EmbeddedPointer"}
6031
6032 func (ec *executionContext) _EmbeddedPointer(ctx context.Context, sel ast.SelectionSet, obj *EmbeddedPointerModel) graphql.Marshaler {
6033 fields := graphql.CollectFields(ec.OperationContext, sel, embeddedPointerImplementors)
6034
6035 out := graphql.NewFieldSet(fields)
6036 deferred := make(map[string]*graphql.FieldSet)
6037 for i, field := range fields {
6038 switch field.Name {
6039 case "__typename":
6040 out.Values[i] = graphql.MarshalString("EmbeddedPointer")
6041 case "ID":
6042 out.Values[i] = ec._EmbeddedPointer_ID(ctx, field, obj)
6043 case "Title":
6044 out.Values[i] = ec._EmbeddedPointer_Title(ctx, field, obj)
6045 default:
6046 panic("unknown field " + strconv.Quote(field.Name))
6047 }
6048 }
6049 out.Dispatch(ctx)
6050 if out.Invalids > 0 {
6051 return graphql.Null
6052 }
6053
6054 atomic.AddInt32(&ec.deferred, int32(len(deferred)))
6055
6056 for label, dfs := range deferred {
6057 ec.processDeferredGroup(graphql.DeferredGroup{
6058 Label: label,
6059 Path: graphql.GetPath(ctx),
6060 FieldSet: dfs,
6061 Context: ctx,
6062 })
6063 }
6064
6065 return out
6066 }
6067
6068 var forcedResolverImplementors = []string{"ForcedResolver"}
6069
6070 func (ec *executionContext) _ForcedResolver(ctx context.Context, sel ast.SelectionSet, obj *ForcedResolver) graphql.Marshaler {
6071 fields := graphql.CollectFields(ec.OperationContext, sel, forcedResolverImplementors)
6072
6073 out := graphql.NewFieldSet(fields)
6074 deferred := make(map[string]*graphql.FieldSet)
6075 for i, field := range fields {
6076 switch field.Name {
6077 case "__typename":
6078 out.Values[i] = graphql.MarshalString("ForcedResolver")
6079 case "field":
6080 field := field
6081
6082 innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
6083 defer func() {
6084 if r := recover(); r != nil {
6085 ec.Error(ctx, ec.Recover(ctx, r))
6086 }
6087 }()
6088 res = ec._ForcedResolver_field(ctx, field, obj)
6089 return res
6090 }
6091
6092 if field.Deferrable != nil {
6093 dfs, ok := deferred[field.Deferrable.Label]
6094 di := 0
6095 if ok {
6096 dfs.AddField(field)
6097 di = len(dfs.Values) - 1
6098 } else {
6099 dfs = graphql.NewFieldSet([]graphql.CollectedField{field})
6100 deferred[field.Deferrable.Label] = dfs
6101 }
6102 dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler {
6103 return innerFunc(ctx, dfs)
6104 })
6105
6106
6107 out.Values[i] = graphql.Null
6108 continue
6109 }
6110
6111 out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
6112 default:
6113 panic("unknown field " + strconv.Quote(field.Name))
6114 }
6115 }
6116 out.Dispatch(ctx)
6117 if out.Invalids > 0 {
6118 return graphql.Null
6119 }
6120
6121 atomic.AddInt32(&ec.deferred, int32(len(deferred)))
6122
6123 for label, dfs := range deferred {
6124 ec.processDeferredGroup(graphql.DeferredGroup{
6125 Label: label,
6126 Path: graphql.GetPath(ctx),
6127 FieldSet: dfs,
6128 Context: ctx,
6129 })
6130 }
6131
6132 return out
6133 }
6134
6135 var innerObjectImplementors = []string{"InnerObject"}
6136
6137 func (ec *executionContext) _InnerObject(ctx context.Context, sel ast.SelectionSet, obj *InnerObject) graphql.Marshaler {
6138 fields := graphql.CollectFields(ec.OperationContext, sel, innerObjectImplementors)
6139
6140 out := graphql.NewFieldSet(fields)
6141 deferred := make(map[string]*graphql.FieldSet)
6142 for i, field := range fields {
6143 switch field.Name {
6144 case "__typename":
6145 out.Values[i] = graphql.MarshalString("InnerObject")
6146 case "id":
6147 out.Values[i] = ec._InnerObject_id(ctx, field, obj)
6148 if out.Values[i] == graphql.Null {
6149 out.Invalids++
6150 }
6151 default:
6152 panic("unknown field " + strconv.Quote(field.Name))
6153 }
6154 }
6155 out.Dispatch(ctx)
6156 if out.Invalids > 0 {
6157 return graphql.Null
6158 }
6159
6160 atomic.AddInt32(&ec.deferred, int32(len(deferred)))
6161
6162 for label, dfs := range deferred {
6163 ec.processDeferredGroup(graphql.DeferredGroup{
6164 Label: label,
6165 Path: graphql.GetPath(ctx),
6166 FieldSet: dfs,
6167 Context: ctx,
6168 })
6169 }
6170
6171 return out
6172 }
6173
6174 var invalidIdentifierImplementors = []string{"InvalidIdentifier"}
6175
6176 func (ec *executionContext) _InvalidIdentifier(ctx context.Context, sel ast.SelectionSet, obj *invalid_packagename.InvalidIdentifier) graphql.Marshaler {
6177 fields := graphql.CollectFields(ec.OperationContext, sel, invalidIdentifierImplementors)
6178
6179 out := graphql.NewFieldSet(fields)
6180 deferred := make(map[string]*graphql.FieldSet)
6181 for i, field := range fields {
6182 switch field.Name {
6183 case "__typename":
6184 out.Values[i] = graphql.MarshalString("InvalidIdentifier")
6185 case "id":
6186 out.Values[i] = ec._InvalidIdentifier_id(ctx, field, obj)
6187 if out.Values[i] == graphql.Null {
6188 out.Invalids++
6189 }
6190 default:
6191 panic("unknown field " + strconv.Quote(field.Name))
6192 }
6193 }
6194 out.Dispatch(ctx)
6195 if out.Invalids > 0 {
6196 return graphql.Null
6197 }
6198
6199 atomic.AddInt32(&ec.deferred, int32(len(deferred)))
6200
6201 for label, dfs := range deferred {
6202 ec.processDeferredGroup(graphql.DeferredGroup{
6203 Label: label,
6204 Path: graphql.GetPath(ctx),
6205 FieldSet: dfs,
6206 Context: ctx,
6207 })
6208 }
6209
6210 return out
6211 }
6212
6213 var itImplementors = []string{"It"}
6214
6215 func (ec *executionContext) _It(ctx context.Context, sel ast.SelectionSet, obj *introspection1.It) graphql.Marshaler {
6216 fields := graphql.CollectFields(ec.OperationContext, sel, itImplementors)
6217
6218 out := graphql.NewFieldSet(fields)
6219 deferred := make(map[string]*graphql.FieldSet)
6220 for i, field := range fields {
6221 switch field.Name {
6222 case "__typename":
6223 out.Values[i] = graphql.MarshalString("It")
6224 case "id":
6225 out.Values[i] = ec._It_id(ctx, field, obj)
6226 if out.Values[i] == graphql.Null {
6227 out.Invalids++
6228 }
6229 default:
6230 panic("unknown field " + strconv.Quote(field.Name))
6231 }
6232 }
6233 out.Dispatch(ctx)
6234 if out.Invalids > 0 {
6235 return graphql.Null
6236 }
6237
6238 atomic.AddInt32(&ec.deferred, int32(len(deferred)))
6239
6240 for label, dfs := range deferred {
6241 ec.processDeferredGroup(graphql.DeferredGroup{
6242 Label: label,
6243 Path: graphql.GetPath(ctx),
6244 FieldSet: dfs,
6245 Context: ctx,
6246 })
6247 }
6248
6249 return out
6250 }
6251
6252 var modelMethodsImplementors = []string{"ModelMethods"}
6253
6254 func (ec *executionContext) _ModelMethods(ctx context.Context, sel ast.SelectionSet, obj *ModelMethods) graphql.Marshaler {
6255 fields := graphql.CollectFields(ec.OperationContext, sel, modelMethodsImplementors)
6256
6257 out := graphql.NewFieldSet(fields)
6258 deferred := make(map[string]*graphql.FieldSet)
6259 for i, field := range fields {
6260 switch field.Name {
6261 case "__typename":
6262 out.Values[i] = graphql.MarshalString("ModelMethods")
6263 case "resolverField":
6264 field := field
6265
6266 innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
6267 defer func() {
6268 if r := recover(); r != nil {
6269 ec.Error(ctx, ec.Recover(ctx, r))
6270 }
6271 }()
6272 res = ec._ModelMethods_resolverField(ctx, field, obj)
6273 if res == graphql.Null {
6274 atomic.AddUint32(&fs.Invalids, 1)
6275 }
6276 return res
6277 }
6278
6279 if field.Deferrable != nil {
6280 dfs, ok := deferred[field.Deferrable.Label]
6281 di := 0
6282 if ok {
6283 dfs.AddField(field)
6284 di = len(dfs.Values) - 1
6285 } else {
6286 dfs = graphql.NewFieldSet([]graphql.CollectedField{field})
6287 deferred[field.Deferrable.Label] = dfs
6288 }
6289 dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler {
6290 return innerFunc(ctx, dfs)
6291 })
6292
6293
6294 out.Values[i] = graphql.Null
6295 continue
6296 }
6297
6298 out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
6299 case "noContext":
6300 out.Values[i] = ec._ModelMethods_noContext(ctx, field, obj)
6301 if out.Values[i] == graphql.Null {
6302 atomic.AddUint32(&out.Invalids, 1)
6303 }
6304 case "withContext":
6305 field := field
6306
6307 innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
6308 defer func() {
6309 if r := recover(); r != nil {
6310 ec.Error(ctx, ec.Recover(ctx, r))
6311 }
6312 }()
6313 res = ec._ModelMethods_withContext(ctx, field, obj)
6314 if res == graphql.Null {
6315 atomic.AddUint32(&fs.Invalids, 1)
6316 }
6317 return res
6318 }
6319
6320 if field.Deferrable != nil {
6321 dfs, ok := deferred[field.Deferrable.Label]
6322 di := 0
6323 if ok {
6324 dfs.AddField(field)
6325 di = len(dfs.Values) - 1
6326 } else {
6327 dfs = graphql.NewFieldSet([]graphql.CollectedField{field})
6328 deferred[field.Deferrable.Label] = dfs
6329 }
6330 dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler {
6331 return innerFunc(ctx, dfs)
6332 })
6333
6334
6335 out.Values[i] = graphql.Null
6336 continue
6337 }
6338
6339 out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
6340 default:
6341 panic("unknown field " + strconv.Quote(field.Name))
6342 }
6343 }
6344 out.Dispatch(ctx)
6345 if out.Invalids > 0 {
6346 return graphql.Null
6347 }
6348
6349 atomic.AddInt32(&ec.deferred, int32(len(deferred)))
6350
6351 for label, dfs := range deferred {
6352 ec.processDeferredGroup(graphql.DeferredGroup{
6353 Label: label,
6354 Path: graphql.GetPath(ctx),
6355 FieldSet: dfs,
6356 Context: ctx,
6357 })
6358 }
6359
6360 return out
6361 }
6362
6363 var outerObjectImplementors = []string{"OuterObject"}
6364
6365 func (ec *executionContext) _OuterObject(ctx context.Context, sel ast.SelectionSet, obj *OuterObject) graphql.Marshaler {
6366 fields := graphql.CollectFields(ec.OperationContext, sel, outerObjectImplementors)
6367
6368 out := graphql.NewFieldSet(fields)
6369 deferred := make(map[string]*graphql.FieldSet)
6370 for i, field := range fields {
6371 switch field.Name {
6372 case "__typename":
6373 out.Values[i] = graphql.MarshalString("OuterObject")
6374 case "inner":
6375 out.Values[i] = ec._OuterObject_inner(ctx, field, obj)
6376 if out.Values[i] == graphql.Null {
6377 out.Invalids++
6378 }
6379 default:
6380 panic("unknown field " + strconv.Quote(field.Name))
6381 }
6382 }
6383 out.Dispatch(ctx)
6384 if out.Invalids > 0 {
6385 return graphql.Null
6386 }
6387
6388 atomic.AddInt32(&ec.deferred, int32(len(deferred)))
6389
6390 for label, dfs := range deferred {
6391 ec.processDeferredGroup(graphql.DeferredGroup{
6392 Label: label,
6393 Path: graphql.GetPath(ctx),
6394 FieldSet: dfs,
6395 Context: ctx,
6396 })
6397 }
6398
6399 return out
6400 }
6401
6402 var petImplementors = []string{"Pet"}
6403
6404 func (ec *executionContext) _Pet(ctx context.Context, sel ast.SelectionSet, obj *Pet) graphql.Marshaler {
6405 fields := graphql.CollectFields(ec.OperationContext, sel, petImplementors)
6406
6407 out := graphql.NewFieldSet(fields)
6408 deferred := make(map[string]*graphql.FieldSet)
6409 for i, field := range fields {
6410 switch field.Name {
6411 case "__typename":
6412 out.Values[i] = graphql.MarshalString("Pet")
6413 case "id":
6414 out.Values[i] = ec._Pet_id(ctx, field, obj)
6415 if out.Values[i] == graphql.Null {
6416 atomic.AddUint32(&out.Invalids, 1)
6417 }
6418 case "friends":
6419 field := field
6420
6421 innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
6422 defer func() {
6423 if r := recover(); r != nil {
6424 ec.Error(ctx, ec.Recover(ctx, r))
6425 }
6426 }()
6427 res = ec._Pet_friends(ctx, field, obj)
6428 return res
6429 }
6430
6431 if field.Deferrable != nil {
6432 dfs, ok := deferred[field.Deferrable.Label]
6433 di := 0
6434 if ok {
6435 dfs.AddField(field)
6436 di = len(dfs.Values) - 1
6437 } else {
6438 dfs = graphql.NewFieldSet([]graphql.CollectedField{field})
6439 deferred[field.Deferrable.Label] = dfs
6440 }
6441 dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler {
6442 return innerFunc(ctx, dfs)
6443 })
6444
6445
6446 out.Values[i] = graphql.Null
6447 continue
6448 }
6449
6450 out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
6451 default:
6452 panic("unknown field " + strconv.Quote(field.Name))
6453 }
6454 }
6455 out.Dispatch(ctx)
6456 if out.Invalids > 0 {
6457 return graphql.Null
6458 }
6459
6460 atomic.AddInt32(&ec.deferred, int32(len(deferred)))
6461
6462 for label, dfs := range deferred {
6463 ec.processDeferredGroup(graphql.DeferredGroup{
6464 Label: label,
6465 Path: graphql.GetPath(ctx),
6466 FieldSet: dfs,
6467 Context: ctx,
6468 })
6469 }
6470
6471 return out
6472 }
6473
6474 var queryImplementors = []string{"Query"}
6475
6476 func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) graphql.Marshaler {
6477 fields := graphql.CollectFields(ec.OperationContext, sel, queryImplementors)
6478 ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{
6479 Object: "Query",
6480 })
6481
6482 out := graphql.NewFieldSet(fields)
6483 deferred := make(map[string]*graphql.FieldSet)
6484 for i, field := range fields {
6485 innerCtx := graphql.WithRootFieldContext(ctx, &graphql.RootFieldContext{
6486 Object: field.Name,
6487 Field: field,
6488 })
6489
6490 switch field.Name {
6491 case "__typename":
6492 out.Values[i] = graphql.MarshalString("Query")
6493 case "invalidIdentifier":
6494 field := field
6495
6496 innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
6497 defer func() {
6498 if r := recover(); r != nil {
6499 ec.Error(ctx, ec.Recover(ctx, r))
6500 }
6501 }()
6502 res = ec._Query_invalidIdentifier(ctx, field)
6503 return res
6504 }
6505
6506 rrm := func(ctx context.Context) graphql.Marshaler {
6507 return ec.OperationContext.RootResolverMiddleware(ctx,
6508 func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
6509 }
6510
6511 out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
6512 case "collision":
6513 field := field
6514
6515 innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
6516 defer func() {
6517 if r := recover(); r != nil {
6518 ec.Error(ctx, ec.Recover(ctx, r))
6519 }
6520 }()
6521 res = ec._Query_collision(ctx, field)
6522 return res
6523 }
6524
6525 rrm := func(ctx context.Context) graphql.Marshaler {
6526 return ec.OperationContext.RootResolverMiddleware(ctx,
6527 func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
6528 }
6529
6530 out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
6531 case "mapInput":
6532 field := field
6533
6534 innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
6535 defer func() {
6536 if r := recover(); r != nil {
6537 ec.Error(ctx, ec.Recover(ctx, r))
6538 }
6539 }()
6540 res = ec._Query_mapInput(ctx, field)
6541 return res
6542 }
6543
6544 rrm := func(ctx context.Context) graphql.Marshaler {
6545 return ec.OperationContext.RootResolverMiddleware(ctx,
6546 func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
6547 }
6548
6549 out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
6550 case "recursive":
6551 field := field
6552
6553 innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
6554 defer func() {
6555 if r := recover(); r != nil {
6556 ec.Error(ctx, ec.Recover(ctx, r))
6557 }
6558 }()
6559 res = ec._Query_recursive(ctx, field)
6560 return res
6561 }
6562
6563 rrm := func(ctx context.Context) graphql.Marshaler {
6564 return ec.OperationContext.RootResolverMiddleware(ctx,
6565 func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
6566 }
6567
6568 out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
6569 case "nestedInputs":
6570 field := field
6571
6572 innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
6573 defer func() {
6574 if r := recover(); r != nil {
6575 ec.Error(ctx, ec.Recover(ctx, r))
6576 }
6577 }()
6578 res = ec._Query_nestedInputs(ctx, field)
6579 return res
6580 }
6581
6582 rrm := func(ctx context.Context) graphql.Marshaler {
6583 return ec.OperationContext.RootResolverMiddleware(ctx,
6584 func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
6585 }
6586
6587 out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
6588 case "nestedOutputs":
6589 field := field
6590
6591 innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
6592 defer func() {
6593 if r := recover(); r != nil {
6594 ec.Error(ctx, ec.Recover(ctx, r))
6595 }
6596 }()
6597 res = ec._Query_nestedOutputs(ctx, field)
6598 return res
6599 }
6600
6601 rrm := func(ctx context.Context) graphql.Marshaler {
6602 return ec.OperationContext.RootResolverMiddleware(ctx,
6603 func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
6604 }
6605
6606 out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
6607 case "modelMethods":
6608 field := field
6609
6610 innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
6611 defer func() {
6612 if r := recover(); r != nil {
6613 ec.Error(ctx, ec.Recover(ctx, r))
6614 }
6615 }()
6616 res = ec._Query_modelMethods(ctx, field)
6617 return res
6618 }
6619
6620 rrm := func(ctx context.Context) graphql.Marshaler {
6621 return ec.OperationContext.RootResolverMiddleware(ctx,
6622 func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
6623 }
6624
6625 out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
6626 case "user":
6627 field := field
6628
6629 innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
6630 defer func() {
6631 if r := recover(); r != nil {
6632 ec.Error(ctx, ec.Recover(ctx, r))
6633 }
6634 }()
6635 res = ec._Query_user(ctx, field)
6636 if res == graphql.Null {
6637 atomic.AddUint32(&fs.Invalids, 1)
6638 }
6639 return res
6640 }
6641
6642 rrm := func(ctx context.Context) graphql.Marshaler {
6643 return ec.OperationContext.RootResolverMiddleware(ctx,
6644 func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
6645 }
6646
6647 out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
6648 case "nullableArg":
6649 field := field
6650
6651 innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
6652 defer func() {
6653 if r := recover(); r != nil {
6654 ec.Error(ctx, ec.Recover(ctx, r))
6655 }
6656 }()
6657 res = ec._Query_nullableArg(ctx, field)
6658 return res
6659 }
6660
6661 rrm := func(ctx context.Context) graphql.Marshaler {
6662 return ec.OperationContext.RootResolverMiddleware(ctx,
6663 func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
6664 }
6665
6666 out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
6667 case "inputSlice":
6668 field := field
6669
6670 innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
6671 defer func() {
6672 if r := recover(); r != nil {
6673 ec.Error(ctx, ec.Recover(ctx, r))
6674 }
6675 }()
6676 res = ec._Query_inputSlice(ctx, field)
6677 if res == graphql.Null {
6678 atomic.AddUint32(&fs.Invalids, 1)
6679 }
6680 return res
6681 }
6682
6683 rrm := func(ctx context.Context) graphql.Marshaler {
6684 return ec.OperationContext.RootResolverMiddleware(ctx,
6685 func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
6686 }
6687
6688 out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
6689 case "inputNullableSlice":
6690 field := field
6691
6692 innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
6693 defer func() {
6694 if r := recover(); r != nil {
6695 ec.Error(ctx, ec.Recover(ctx, r))
6696 }
6697 }()
6698 res = ec._Query_inputNullableSlice(ctx, field)
6699 if res == graphql.Null {
6700 atomic.AddUint32(&fs.Invalids, 1)
6701 }
6702 return res
6703 }
6704
6705 rrm := func(ctx context.Context) graphql.Marshaler {
6706 return ec.OperationContext.RootResolverMiddleware(ctx,
6707 func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
6708 }
6709
6710 out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
6711 case "inputOmittable":
6712 field := field
6713
6714 innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
6715 defer func() {
6716 if r := recover(); r != nil {
6717 ec.Error(ctx, ec.Recover(ctx, r))
6718 }
6719 }()
6720 res = ec._Query_inputOmittable(ctx, field)
6721 if res == graphql.Null {
6722 atomic.AddUint32(&fs.Invalids, 1)
6723 }
6724 return res
6725 }
6726
6727 rrm := func(ctx context.Context) graphql.Marshaler {
6728 return ec.OperationContext.RootResolverMiddleware(ctx,
6729 func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
6730 }
6731
6732 out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
6733 case "shapeUnion":
6734 field := field
6735
6736 innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
6737 defer func() {
6738 if r := recover(); r != nil {
6739 ec.Error(ctx, ec.Recover(ctx, r))
6740 }
6741 }()
6742 res = ec._Query_shapeUnion(ctx, field)
6743 if res == graphql.Null {
6744 atomic.AddUint32(&fs.Invalids, 1)
6745 }
6746 return res
6747 }
6748
6749 rrm := func(ctx context.Context) graphql.Marshaler {
6750 return ec.OperationContext.RootResolverMiddleware(ctx,
6751 func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
6752 }
6753
6754 out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
6755 case "autobind":
6756 field := field
6757
6758 innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
6759 defer func() {
6760 if r := recover(); r != nil {
6761 ec.Error(ctx, ec.Recover(ctx, r))
6762 }
6763 }()
6764 res = ec._Query_autobind(ctx, field)
6765 return res
6766 }
6767
6768 rrm := func(ctx context.Context) graphql.Marshaler {
6769 return ec.OperationContext.RootResolverMiddleware(ctx,
6770 func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
6771 }
6772
6773 out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
6774 case "deprecatedField":
6775 field := field
6776
6777 innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
6778 defer func() {
6779 if r := recover(); r != nil {
6780 ec.Error(ctx, ec.Recover(ctx, r))
6781 }
6782 }()
6783 res = ec._Query_deprecatedField(ctx, field)
6784 if res == graphql.Null {
6785 atomic.AddUint32(&fs.Invalids, 1)
6786 }
6787 return res
6788 }
6789
6790 rrm := func(ctx context.Context) graphql.Marshaler {
6791 return ec.OperationContext.RootResolverMiddleware(ctx,
6792 func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
6793 }
6794
6795 out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
6796 case "overlapping":
6797 field := field
6798
6799 innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
6800 defer func() {
6801 if r := recover(); r != nil {
6802 ec.Error(ctx, ec.Recover(ctx, r))
6803 }
6804 }()
6805 res = ec._Query_overlapping(ctx, field)
6806 return res
6807 }
6808
6809 rrm := func(ctx context.Context) graphql.Marshaler {
6810 return ec.OperationContext.RootResolverMiddleware(ctx,
6811 func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
6812 }
6813
6814 out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
6815 case "defaultParameters":
6816 field := field
6817
6818 innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
6819 defer func() {
6820 if r := recover(); r != nil {
6821 ec.Error(ctx, ec.Recover(ctx, r))
6822 }
6823 }()
6824 res = ec._Query_defaultParameters(ctx, field)
6825 if res == graphql.Null {
6826 atomic.AddUint32(&fs.Invalids, 1)
6827 }
6828 return res
6829 }
6830
6831 rrm := func(ctx context.Context) graphql.Marshaler {
6832 return ec.OperationContext.RootResolverMiddleware(ctx,
6833 func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
6834 }
6835
6836 out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
6837 case "deferCase1":
6838 field := field
6839
6840 innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
6841 defer func() {
6842 if r := recover(); r != nil {
6843 ec.Error(ctx, ec.Recover(ctx, r))
6844 }
6845 }()
6846 res = ec._Query_deferCase1(ctx, field)
6847 return res
6848 }
6849
6850 rrm := func(ctx context.Context) graphql.Marshaler {
6851 return ec.OperationContext.RootResolverMiddleware(ctx,
6852 func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
6853 }
6854
6855 out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
6856 case "deferCase2":
6857 field := field
6858
6859 innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
6860 defer func() {
6861 if r := recover(); r != nil {
6862 ec.Error(ctx, ec.Recover(ctx, r))
6863 }
6864 }()
6865 res = ec._Query_deferCase2(ctx, field)
6866 return res
6867 }
6868
6869 rrm := func(ctx context.Context) graphql.Marshaler {
6870 return ec.OperationContext.RootResolverMiddleware(ctx,
6871 func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
6872 }
6873
6874 out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
6875 case "directiveArg":
6876 field := field
6877
6878 innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
6879 defer func() {
6880 if r := recover(); r != nil {
6881 ec.Error(ctx, ec.Recover(ctx, r))
6882 }
6883 }()
6884 res = ec._Query_directiveArg(ctx, field)
6885 return res
6886 }
6887
6888 rrm := func(ctx context.Context) graphql.Marshaler {
6889 return ec.OperationContext.RootResolverMiddleware(ctx,
6890 func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
6891 }
6892
6893 out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
6894 case "directiveNullableArg":
6895 field := field
6896
6897 innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
6898 defer func() {
6899 if r := recover(); r != nil {
6900 ec.Error(ctx, ec.Recover(ctx, r))
6901 }
6902 }()
6903 res = ec._Query_directiveNullableArg(ctx, field)
6904 return res
6905 }
6906
6907 rrm := func(ctx context.Context) graphql.Marshaler {
6908 return ec.OperationContext.RootResolverMiddleware(ctx,
6909 func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
6910 }
6911
6912 out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
6913 case "directiveInputNullable":
6914 field := field
6915
6916 innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
6917 defer func() {
6918 if r := recover(); r != nil {
6919 ec.Error(ctx, ec.Recover(ctx, r))
6920 }
6921 }()
6922 res = ec._Query_directiveInputNullable(ctx, field)
6923 return res
6924 }
6925
6926 rrm := func(ctx context.Context) graphql.Marshaler {
6927 return ec.OperationContext.RootResolverMiddleware(ctx,
6928 func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
6929 }
6930
6931 out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
6932 case "directiveInput":
6933 field := field
6934
6935 innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
6936 defer func() {
6937 if r := recover(); r != nil {
6938 ec.Error(ctx, ec.Recover(ctx, r))
6939 }
6940 }()
6941 res = ec._Query_directiveInput(ctx, field)
6942 return res
6943 }
6944
6945 rrm := func(ctx context.Context) graphql.Marshaler {
6946 return ec.OperationContext.RootResolverMiddleware(ctx,
6947 func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
6948 }
6949
6950 out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
6951 case "directiveInputType":
6952 field := field
6953
6954 innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
6955 defer func() {
6956 if r := recover(); r != nil {
6957 ec.Error(ctx, ec.Recover(ctx, r))
6958 }
6959 }()
6960 res = ec._Query_directiveInputType(ctx, field)
6961 return res
6962 }
6963
6964 rrm := func(ctx context.Context) graphql.Marshaler {
6965 return ec.OperationContext.RootResolverMiddleware(ctx,
6966 func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
6967 }
6968
6969 out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
6970 case "directiveObject":
6971 field := field
6972
6973 innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
6974 defer func() {
6975 if r := recover(); r != nil {
6976 ec.Error(ctx, ec.Recover(ctx, r))
6977 }
6978 }()
6979 res = ec._Query_directiveObject(ctx, field)
6980 return res
6981 }
6982
6983 rrm := func(ctx context.Context) graphql.Marshaler {
6984 return ec.OperationContext.RootResolverMiddleware(ctx,
6985 func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
6986 }
6987
6988 out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
6989 case "directiveObjectWithCustomGoModel":
6990 field := field
6991
6992 innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
6993 defer func() {
6994 if r := recover(); r != nil {
6995 ec.Error(ctx, ec.Recover(ctx, r))
6996 }
6997 }()
6998 res = ec._Query_directiveObjectWithCustomGoModel(ctx, field)
6999 return res
7000 }
7001
7002 rrm := func(ctx context.Context) graphql.Marshaler {
7003 return ec.OperationContext.RootResolverMiddleware(ctx,
7004 func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
7005 }
7006
7007 out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
7008 case "directiveFieldDef":
7009 field := field
7010
7011 innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
7012 defer func() {
7013 if r := recover(); r != nil {
7014 ec.Error(ctx, ec.Recover(ctx, r))
7015 }
7016 }()
7017 res = ec._Query_directiveFieldDef(ctx, field)
7018 if res == graphql.Null {
7019 atomic.AddUint32(&fs.Invalids, 1)
7020 }
7021 return res
7022 }
7023
7024 rrm := func(ctx context.Context) graphql.Marshaler {
7025 return ec.OperationContext.RootResolverMiddleware(ctx,
7026 func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
7027 }
7028
7029 out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
7030 case "directiveField":
7031 field := field
7032
7033 innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
7034 defer func() {
7035 if r := recover(); r != nil {
7036 ec.Error(ctx, ec.Recover(ctx, r))
7037 }
7038 }()
7039 res = ec._Query_directiveField(ctx, field)
7040 return res
7041 }
7042
7043 rrm := func(ctx context.Context) graphql.Marshaler {
7044 return ec.OperationContext.RootResolverMiddleware(ctx,
7045 func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
7046 }
7047
7048 out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
7049 case "directiveDouble":
7050 field := field
7051
7052 innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
7053 defer func() {
7054 if r := recover(); r != nil {
7055 ec.Error(ctx, ec.Recover(ctx, r))
7056 }
7057 }()
7058 res = ec._Query_directiveDouble(ctx, field)
7059 return res
7060 }
7061
7062 rrm := func(ctx context.Context) graphql.Marshaler {
7063 return ec.OperationContext.RootResolverMiddleware(ctx,
7064 func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
7065 }
7066
7067 out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
7068 case "directiveUnimplemented":
7069 field := field
7070
7071 innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
7072 defer func() {
7073 if r := recover(); r != nil {
7074 ec.Error(ctx, ec.Recover(ctx, r))
7075 }
7076 }()
7077 res = ec._Query_directiveUnimplemented(ctx, field)
7078 return res
7079 }
7080
7081 rrm := func(ctx context.Context) graphql.Marshaler {
7082 return ec.OperationContext.RootResolverMiddleware(ctx,
7083 func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
7084 }
7085
7086 out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
7087 case "embeddedCase1":
7088 field := field
7089
7090 innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
7091 defer func() {
7092 if r := recover(); r != nil {
7093 ec.Error(ctx, ec.Recover(ctx, r))
7094 }
7095 }()
7096 res = ec._Query_embeddedCase1(ctx, field)
7097 return res
7098 }
7099
7100 rrm := func(ctx context.Context) graphql.Marshaler {
7101 return ec.OperationContext.RootResolverMiddleware(ctx,
7102 func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
7103 }
7104
7105 out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
7106 case "embeddedCase2":
7107 field := field
7108
7109 innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
7110 defer func() {
7111 if r := recover(); r != nil {
7112 ec.Error(ctx, ec.Recover(ctx, r))
7113 }
7114 }()
7115 res = ec._Query_embeddedCase2(ctx, field)
7116 return res
7117 }
7118
7119 rrm := func(ctx context.Context) graphql.Marshaler {
7120 return ec.OperationContext.RootResolverMiddleware(ctx,
7121 func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
7122 }
7123
7124 out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
7125 case "embeddedCase3":
7126 field := field
7127
7128 innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
7129 defer func() {
7130 if r := recover(); r != nil {
7131 ec.Error(ctx, ec.Recover(ctx, r))
7132 }
7133 }()
7134 res = ec._Query_embeddedCase3(ctx, field)
7135 return res
7136 }
7137
7138 rrm := func(ctx context.Context) graphql.Marshaler {
7139 return ec.OperationContext.RootResolverMiddleware(ctx,
7140 func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
7141 }
7142
7143 out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
7144 case "enumInInput":
7145 field := field
7146
7147 innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
7148 defer func() {
7149 if r := recover(); r != nil {
7150 ec.Error(ctx, ec.Recover(ctx, r))
7151 }
7152 }()
7153 res = ec._Query_enumInInput(ctx, field)
7154 if res == graphql.Null {
7155 atomic.AddUint32(&fs.Invalids, 1)
7156 }
7157 return res
7158 }
7159
7160 rrm := func(ctx context.Context) graphql.Marshaler {
7161 return ec.OperationContext.RootResolverMiddleware(ctx,
7162 func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
7163 }
7164
7165 out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
7166 case "shapes":
7167 field := field
7168
7169 innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
7170 defer func() {
7171 if r := recover(); r != nil {
7172 ec.Error(ctx, ec.Recover(ctx, r))
7173 }
7174 }()
7175 res = ec._Query_shapes(ctx, field)
7176 return res
7177 }
7178
7179 rrm := func(ctx context.Context) graphql.Marshaler {
7180 return ec.OperationContext.RootResolverMiddleware(ctx,
7181 func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
7182 }
7183
7184 out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
7185 case "noShape":
7186 field := field
7187
7188 innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
7189 defer func() {
7190 if r := recover(); r != nil {
7191 ec.Error(ctx, ec.Recover(ctx, r))
7192 }
7193 }()
7194 res = ec._Query_noShape(ctx, field)
7195 return res
7196 }
7197
7198 rrm := func(ctx context.Context) graphql.Marshaler {
7199 return ec.OperationContext.RootResolverMiddleware(ctx,
7200 func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
7201 }
7202
7203 out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
7204 case "node":
7205 field := field
7206
7207 innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
7208 defer func() {
7209 if r := recover(); r != nil {
7210 ec.Error(ctx, ec.Recover(ctx, r))
7211 }
7212 }()
7213 res = ec._Query_node(ctx, field)
7214 if res == graphql.Null {
7215 atomic.AddUint32(&fs.Invalids, 1)
7216 }
7217 return res
7218 }
7219
7220 rrm := func(ctx context.Context) graphql.Marshaler {
7221 return ec.OperationContext.RootResolverMiddleware(ctx,
7222 func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
7223 }
7224
7225 out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
7226 case "noShapeTypedNil":
7227 field := field
7228
7229 innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
7230 defer func() {
7231 if r := recover(); r != nil {
7232 ec.Error(ctx, ec.Recover(ctx, r))
7233 }
7234 }()
7235 res = ec._Query_noShapeTypedNil(ctx, field)
7236 return res
7237 }
7238
7239 rrm := func(ctx context.Context) graphql.Marshaler {
7240 return ec.OperationContext.RootResolverMiddleware(ctx,
7241 func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
7242 }
7243
7244 out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
7245 case "animal":
7246 field := field
7247
7248 innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
7249 defer func() {
7250 if r := recover(); r != nil {
7251 ec.Error(ctx, ec.Recover(ctx, r))
7252 }
7253 }()
7254 res = ec._Query_animal(ctx, field)
7255 return res
7256 }
7257
7258 rrm := func(ctx context.Context) graphql.Marshaler {
7259 return ec.OperationContext.RootResolverMiddleware(ctx,
7260 func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
7261 }
7262
7263 out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
7264 case "notAnInterface":
7265 field := field
7266
7267 innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
7268 defer func() {
7269 if r := recover(); r != nil {
7270 ec.Error(ctx, ec.Recover(ctx, r))
7271 }
7272 }()
7273 res = ec._Query_notAnInterface(ctx, field)
7274 return res
7275 }
7276
7277 rrm := func(ctx context.Context) graphql.Marshaler {
7278 return ec.OperationContext.RootResolverMiddleware(ctx,
7279 func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
7280 }
7281
7282 out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
7283 case "dog":
7284 field := field
7285
7286 innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
7287 defer func() {
7288 if r := recover(); r != nil {
7289 ec.Error(ctx, ec.Recover(ctx, r))
7290 }
7291 }()
7292 res = ec._Query_dog(ctx, field)
7293 return res
7294 }
7295
7296 rrm := func(ctx context.Context) graphql.Marshaler {
7297 return ec.OperationContext.RootResolverMiddleware(ctx,
7298 func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
7299 }
7300
7301 out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
7302 case "issue896a":
7303 field := field
7304
7305 innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
7306 defer func() {
7307 if r := recover(); r != nil {
7308 ec.Error(ctx, ec.Recover(ctx, r))
7309 }
7310 }()
7311 res = ec._Query_issue896a(ctx, field)
7312 return res
7313 }
7314
7315 rrm := func(ctx context.Context) graphql.Marshaler {
7316 return ec.OperationContext.RootResolverMiddleware(ctx,
7317 func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
7318 }
7319
7320 out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
7321 case "mapStringInterface":
7322 field := field
7323
7324 innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
7325 defer func() {
7326 if r := recover(); r != nil {
7327 ec.Error(ctx, ec.Recover(ctx, r))
7328 }
7329 }()
7330 res = ec._Query_mapStringInterface(ctx, field)
7331 return res
7332 }
7333
7334 rrm := func(ctx context.Context) graphql.Marshaler {
7335 return ec.OperationContext.RootResolverMiddleware(ctx,
7336 func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
7337 }
7338
7339 out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
7340 case "mapNestedStringInterface":
7341 field := field
7342
7343 innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
7344 defer func() {
7345 if r := recover(); r != nil {
7346 ec.Error(ctx, ec.Recover(ctx, r))
7347 }
7348 }()
7349 res = ec._Query_mapNestedStringInterface(ctx, field)
7350 return res
7351 }
7352
7353 rrm := func(ctx context.Context) graphql.Marshaler {
7354 return ec.OperationContext.RootResolverMiddleware(ctx,
7355 func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
7356 }
7357
7358 out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
7359 case "errorBubble":
7360 field := field
7361
7362 innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
7363 defer func() {
7364 if r := recover(); r != nil {
7365 ec.Error(ctx, ec.Recover(ctx, r))
7366 }
7367 }()
7368 res = ec._Query_errorBubble(ctx, field)
7369 return res
7370 }
7371
7372 rrm := func(ctx context.Context) graphql.Marshaler {
7373 return ec.OperationContext.RootResolverMiddleware(ctx,
7374 func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
7375 }
7376
7377 out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
7378 case "errorBubbleList":
7379 field := field
7380
7381 innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
7382 defer func() {
7383 if r := recover(); r != nil {
7384 ec.Error(ctx, ec.Recover(ctx, r))
7385 }
7386 }()
7387 res = ec._Query_errorBubbleList(ctx, field)
7388 return res
7389 }
7390
7391 rrm := func(ctx context.Context) graphql.Marshaler {
7392 return ec.OperationContext.RootResolverMiddleware(ctx,
7393 func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
7394 }
7395
7396 out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
7397 case "errorList":
7398 field := field
7399
7400 innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
7401 defer func() {
7402 if r := recover(); r != nil {
7403 ec.Error(ctx, ec.Recover(ctx, r))
7404 }
7405 }()
7406 res = ec._Query_errorList(ctx, field)
7407 return res
7408 }
7409
7410 rrm := func(ctx context.Context) graphql.Marshaler {
7411 return ec.OperationContext.RootResolverMiddleware(ctx,
7412 func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
7413 }
7414
7415 out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
7416 case "errors":
7417 field := field
7418
7419 innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
7420 defer func() {
7421 if r := recover(); r != nil {
7422 ec.Error(ctx, ec.Recover(ctx, r))
7423 }
7424 }()
7425 res = ec._Query_errors(ctx, field)
7426 return res
7427 }
7428
7429 rrm := func(ctx context.Context) graphql.Marshaler {
7430 return ec.OperationContext.RootResolverMiddleware(ctx,
7431 func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
7432 }
7433
7434 out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
7435 case "valid":
7436 field := field
7437
7438 innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
7439 defer func() {
7440 if r := recover(); r != nil {
7441 ec.Error(ctx, ec.Recover(ctx, r))
7442 }
7443 }()
7444 res = ec._Query_valid(ctx, field)
7445 if res == graphql.Null {
7446 atomic.AddUint32(&fs.Invalids, 1)
7447 }
7448 return res
7449 }
7450
7451 rrm := func(ctx context.Context) graphql.Marshaler {
7452 return ec.OperationContext.RootResolverMiddleware(ctx,
7453 func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
7454 }
7455
7456 out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
7457 case "invalid":
7458 field := field
7459
7460 innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
7461 defer func() {
7462 if r := recover(); r != nil {
7463 ec.Error(ctx, ec.Recover(ctx, r))
7464 }
7465 }()
7466 res = ec._Query_invalid(ctx, field)
7467 if res == graphql.Null {
7468 atomic.AddUint32(&fs.Invalids, 1)
7469 }
7470 return res
7471 }
7472
7473 rrm := func(ctx context.Context) graphql.Marshaler {
7474 return ec.OperationContext.RootResolverMiddleware(ctx,
7475 func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
7476 }
7477
7478 out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
7479 case "panics":
7480 field := field
7481
7482 innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
7483 defer func() {
7484 if r := recover(); r != nil {
7485 ec.Error(ctx, ec.Recover(ctx, r))
7486 }
7487 }()
7488 res = ec._Query_panics(ctx, field)
7489 return res
7490 }
7491
7492 rrm := func(ctx context.Context) graphql.Marshaler {
7493 return ec.OperationContext.RootResolverMiddleware(ctx,
7494 func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
7495 }
7496
7497 out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
7498 case "primitiveObject":
7499 field := field
7500
7501 innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
7502 defer func() {
7503 if r := recover(); r != nil {
7504 ec.Error(ctx, ec.Recover(ctx, r))
7505 }
7506 }()
7507 res = ec._Query_primitiveObject(ctx, field)
7508 if res == graphql.Null {
7509 atomic.AddUint32(&fs.Invalids, 1)
7510 }
7511 return res
7512 }
7513
7514 rrm := func(ctx context.Context) graphql.Marshaler {
7515 return ec.OperationContext.RootResolverMiddleware(ctx,
7516 func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
7517 }
7518
7519 out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
7520 case "primitiveStringObject":
7521 field := field
7522
7523 innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
7524 defer func() {
7525 if r := recover(); r != nil {
7526 ec.Error(ctx, ec.Recover(ctx, r))
7527 }
7528 }()
7529 res = ec._Query_primitiveStringObject(ctx, field)
7530 if res == graphql.Null {
7531 atomic.AddUint32(&fs.Invalids, 1)
7532 }
7533 return res
7534 }
7535
7536 rrm := func(ctx context.Context) graphql.Marshaler {
7537 return ec.OperationContext.RootResolverMiddleware(ctx,
7538 func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
7539 }
7540
7541 out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
7542 case "ptrToAnyContainer":
7543 field := field
7544
7545 innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
7546 defer func() {
7547 if r := recover(); r != nil {
7548 ec.Error(ctx, ec.Recover(ctx, r))
7549 }
7550 }()
7551 res = ec._Query_ptrToAnyContainer(ctx, field)
7552 if res == graphql.Null {
7553 atomic.AddUint32(&fs.Invalids, 1)
7554 }
7555 return res
7556 }
7557
7558 rrm := func(ctx context.Context) graphql.Marshaler {
7559 return ec.OperationContext.RootResolverMiddleware(ctx,
7560 func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
7561 }
7562
7563 out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
7564 case "ptrToSliceContainer":
7565 field := field
7566
7567 innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
7568 defer func() {
7569 if r := recover(); r != nil {
7570 ec.Error(ctx, ec.Recover(ctx, r))
7571 }
7572 }()
7573 res = ec._Query_ptrToSliceContainer(ctx, field)
7574 if res == graphql.Null {
7575 atomic.AddUint32(&fs.Invalids, 1)
7576 }
7577 return res
7578 }
7579
7580 rrm := func(ctx context.Context) graphql.Marshaler {
7581 return ec.OperationContext.RootResolverMiddleware(ctx,
7582 func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
7583 }
7584
7585 out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
7586 case "infinity":
7587 field := field
7588
7589 innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
7590 defer func() {
7591 if r := recover(); r != nil {
7592 ec.Error(ctx, ec.Recover(ctx, r))
7593 }
7594 }()
7595 res = ec._Query_infinity(ctx, field)
7596 if res == graphql.Null {
7597 atomic.AddUint32(&fs.Invalids, 1)
7598 }
7599 return res
7600 }
7601
7602 rrm := func(ctx context.Context) graphql.Marshaler {
7603 return ec.OperationContext.RootResolverMiddleware(ctx,
7604 func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
7605 }
7606
7607 out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
7608 case "stringFromContextInterface":
7609 field := field
7610
7611 innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
7612 defer func() {
7613 if r := recover(); r != nil {
7614 ec.Error(ctx, ec.Recover(ctx, r))
7615 }
7616 }()
7617 res = ec._Query_stringFromContextInterface(ctx, field)
7618 if res == graphql.Null {
7619 atomic.AddUint32(&fs.Invalids, 1)
7620 }
7621 return res
7622 }
7623
7624 rrm := func(ctx context.Context) graphql.Marshaler {
7625 return ec.OperationContext.RootResolverMiddleware(ctx,
7626 func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
7627 }
7628
7629 out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
7630 case "stringFromContextFunction":
7631 field := field
7632
7633 innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
7634 defer func() {
7635 if r := recover(); r != nil {
7636 ec.Error(ctx, ec.Recover(ctx, r))
7637 }
7638 }()
7639 res = ec._Query_stringFromContextFunction(ctx, field)
7640 if res == graphql.Null {
7641 atomic.AddUint32(&fs.Invalids, 1)
7642 }
7643 return res
7644 }
7645
7646 rrm := func(ctx context.Context) graphql.Marshaler {
7647 return ec.OperationContext.RootResolverMiddleware(ctx,
7648 func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
7649 }
7650
7651 out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
7652 case "defaultScalar":
7653 field := field
7654
7655 innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
7656 defer func() {
7657 if r := recover(); r != nil {
7658 ec.Error(ctx, ec.Recover(ctx, r))
7659 }
7660 }()
7661 res = ec._Query_defaultScalar(ctx, field)
7662 if res == graphql.Null {
7663 atomic.AddUint32(&fs.Invalids, 1)
7664 }
7665 return res
7666 }
7667
7668 rrm := func(ctx context.Context) graphql.Marshaler {
7669 return ec.OperationContext.RootResolverMiddleware(ctx,
7670 func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
7671 }
7672
7673 out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
7674 case "slices":
7675 field := field
7676
7677 innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
7678 defer func() {
7679 if r := recover(); r != nil {
7680 ec.Error(ctx, ec.Recover(ctx, r))
7681 }
7682 }()
7683 res = ec._Query_slices(ctx, field)
7684 return res
7685 }
7686
7687 rrm := func(ctx context.Context) graphql.Marshaler {
7688 return ec.OperationContext.RootResolverMiddleware(ctx,
7689 func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
7690 }
7691
7692 out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
7693 case "scalarSlice":
7694 field := field
7695
7696 innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
7697 defer func() {
7698 if r := recover(); r != nil {
7699 ec.Error(ctx, ec.Recover(ctx, r))
7700 }
7701 }()
7702 res = ec._Query_scalarSlice(ctx, field)
7703 if res == graphql.Null {
7704 atomic.AddUint32(&fs.Invalids, 1)
7705 }
7706 return res
7707 }
7708
7709 rrm := func(ctx context.Context) graphql.Marshaler {
7710 return ec.OperationContext.RootResolverMiddleware(ctx,
7711 func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
7712 }
7713
7714 out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
7715 case "fallback":
7716 field := field
7717
7718 innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
7719 defer func() {
7720 if r := recover(); r != nil {
7721 ec.Error(ctx, ec.Recover(ctx, r))
7722 }
7723 }()
7724 res = ec._Query_fallback(ctx, field)
7725 if res == graphql.Null {
7726 atomic.AddUint32(&fs.Invalids, 1)
7727 }
7728 return res
7729 }
7730
7731 rrm := func(ctx context.Context) graphql.Marshaler {
7732 return ec.OperationContext.RootResolverMiddleware(ctx,
7733 func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
7734 }
7735
7736 out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
7737 case "optionalUnion":
7738 field := field
7739
7740 innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
7741 defer func() {
7742 if r := recover(); r != nil {
7743 ec.Error(ctx, ec.Recover(ctx, r))
7744 }
7745 }()
7746 res = ec._Query_optionalUnion(ctx, field)
7747 return res
7748 }
7749
7750 rrm := func(ctx context.Context) graphql.Marshaler {
7751 return ec.OperationContext.RootResolverMiddleware(ctx,
7752 func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
7753 }
7754
7755 out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
7756 case "vOkCaseValue":
7757 field := field
7758
7759 innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
7760 defer func() {
7761 if r := recover(); r != nil {
7762 ec.Error(ctx, ec.Recover(ctx, r))
7763 }
7764 }()
7765 res = ec._Query_vOkCaseValue(ctx, field)
7766 return res
7767 }
7768
7769 rrm := func(ctx context.Context) graphql.Marshaler {
7770 return ec.OperationContext.RootResolverMiddleware(ctx,
7771 func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
7772 }
7773
7774 out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
7775 case "vOkCaseNil":
7776 field := field
7777
7778 innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
7779 defer func() {
7780 if r := recover(); r != nil {
7781 ec.Error(ctx, ec.Recover(ctx, r))
7782 }
7783 }()
7784 res = ec._Query_vOkCaseNil(ctx, field)
7785 return res
7786 }
7787
7788 rrm := func(ctx context.Context) graphql.Marshaler {
7789 return ec.OperationContext.RootResolverMiddleware(ctx,
7790 func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
7791 }
7792
7793 out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
7794 case "validType":
7795 field := field
7796
7797 innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
7798 defer func() {
7799 if r := recover(); r != nil {
7800 ec.Error(ctx, ec.Recover(ctx, r))
7801 }
7802 }()
7803 res = ec._Query_validType(ctx, field)
7804 return res
7805 }
7806
7807 rrm := func(ctx context.Context) graphql.Marshaler {
7808 return ec.OperationContext.RootResolverMiddleware(ctx,
7809 func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
7810 }
7811
7812 out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
7813 case "variadicModel":
7814 field := field
7815
7816 innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
7817 defer func() {
7818 if r := recover(); r != nil {
7819 ec.Error(ctx, ec.Recover(ctx, r))
7820 }
7821 }()
7822 res = ec._Query_variadicModel(ctx, field)
7823 return res
7824 }
7825
7826 rrm := func(ctx context.Context) graphql.Marshaler {
7827 return ec.OperationContext.RootResolverMiddleware(ctx,
7828 func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
7829 }
7830
7831 out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
7832 case "wrappedStruct":
7833 field := field
7834
7835 innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
7836 defer func() {
7837 if r := recover(); r != nil {
7838 ec.Error(ctx, ec.Recover(ctx, r))
7839 }
7840 }()
7841 res = ec._Query_wrappedStruct(ctx, field)
7842 if res == graphql.Null {
7843 atomic.AddUint32(&fs.Invalids, 1)
7844 }
7845 return res
7846 }
7847
7848 rrm := func(ctx context.Context) graphql.Marshaler {
7849 return ec.OperationContext.RootResolverMiddleware(ctx,
7850 func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
7851 }
7852
7853 out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
7854 case "wrappedScalar":
7855 field := field
7856
7857 innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
7858 defer func() {
7859 if r := recover(); r != nil {
7860 ec.Error(ctx, ec.Recover(ctx, r))
7861 }
7862 }()
7863 res = ec._Query_wrappedScalar(ctx, field)
7864 if res == graphql.Null {
7865 atomic.AddUint32(&fs.Invalids, 1)
7866 }
7867 return res
7868 }
7869
7870 rrm := func(ctx context.Context) graphql.Marshaler {
7871 return ec.OperationContext.RootResolverMiddleware(ctx,
7872 func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
7873 }
7874
7875 out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
7876 case "wrappedMap":
7877 field := field
7878
7879 innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
7880 defer func() {
7881 if r := recover(); r != nil {
7882 ec.Error(ctx, ec.Recover(ctx, r))
7883 }
7884 }()
7885 res = ec._Query_wrappedMap(ctx, field)
7886 if res == graphql.Null {
7887 atomic.AddUint32(&fs.Invalids, 1)
7888 }
7889 return res
7890 }
7891
7892 rrm := func(ctx context.Context) graphql.Marshaler {
7893 return ec.OperationContext.RootResolverMiddleware(ctx,
7894 func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
7895 }
7896
7897 out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
7898 case "wrappedSlice":
7899 field := field
7900
7901 innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
7902 defer func() {
7903 if r := recover(); r != nil {
7904 ec.Error(ctx, ec.Recover(ctx, r))
7905 }
7906 }()
7907 res = ec._Query_wrappedSlice(ctx, field)
7908 if res == graphql.Null {
7909 atomic.AddUint32(&fs.Invalids, 1)
7910 }
7911 return res
7912 }
7913
7914 rrm := func(ctx context.Context) graphql.Marshaler {
7915 return ec.OperationContext.RootResolverMiddleware(ctx,
7916 func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
7917 }
7918
7919 out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
7920 case "__type":
7921 out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
7922 return ec._Query___type(ctx, field)
7923 })
7924 case "__schema":
7925 out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
7926 return ec._Query___schema(ctx, field)
7927 })
7928 default:
7929 panic("unknown field " + strconv.Quote(field.Name))
7930 }
7931 }
7932 out.Dispatch(ctx)
7933 if out.Invalids > 0 {
7934 return graphql.Null
7935 }
7936
7937 atomic.AddInt32(&ec.deferred, int32(len(deferred)))
7938
7939 for label, dfs := range deferred {
7940 ec.processDeferredGroup(graphql.DeferredGroup{
7941 Label: label,
7942 Path: graphql.GetPath(ctx),
7943 FieldSet: dfs,
7944 Context: ctx,
7945 })
7946 }
7947
7948 return out
7949 }
7950
7951 var subscriptionImplementors = []string{"Subscription"}
7952
7953 func (ec *executionContext) _Subscription(ctx context.Context, sel ast.SelectionSet) func(ctx context.Context) graphql.Marshaler {
7954 fields := graphql.CollectFields(ec.OperationContext, sel, subscriptionImplementors)
7955 ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{
7956 Object: "Subscription",
7957 })
7958 if len(fields) != 1 {
7959 ec.Errorf(ctx, "must subscribe to exactly one stream")
7960 return nil
7961 }
7962
7963 switch fields[0].Name {
7964 case "updated":
7965 return ec._Subscription_updated(ctx, fields[0])
7966 case "initPayload":
7967 return ec._Subscription_initPayload(ctx, fields[0])
7968 case "directiveArg":
7969 return ec._Subscription_directiveArg(ctx, fields[0])
7970 case "directiveNullableArg":
7971 return ec._Subscription_directiveNullableArg(ctx, fields[0])
7972 case "directiveDouble":
7973 return ec._Subscription_directiveDouble(ctx, fields[0])
7974 case "directiveUnimplemented":
7975 return ec._Subscription_directiveUnimplemented(ctx, fields[0])
7976 case "issue896b":
7977 return ec._Subscription_issue896b(ctx, fields[0])
7978 case "errorRequired":
7979 return ec._Subscription_errorRequired(ctx, fields[0])
7980 default:
7981 panic("unknown field " + strconv.Quote(fields[0].Name))
7982 }
7983 }
7984
7985 var userImplementors = []string{"User"}
7986
7987 func (ec *executionContext) _User(ctx context.Context, sel ast.SelectionSet, obj *User) graphql.Marshaler {
7988 fields := graphql.CollectFields(ec.OperationContext, sel, userImplementors)
7989
7990 out := graphql.NewFieldSet(fields)
7991 deferred := make(map[string]*graphql.FieldSet)
7992 for i, field := range fields {
7993 switch field.Name {
7994 case "__typename":
7995 out.Values[i] = graphql.MarshalString("User")
7996 case "id":
7997 out.Values[i] = ec._User_id(ctx, field, obj)
7998 if out.Values[i] == graphql.Null {
7999 atomic.AddUint32(&out.Invalids, 1)
8000 }
8001 case "friends":
8002 field := field
8003
8004 innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
8005 defer func() {
8006 if r := recover(); r != nil {
8007 ec.Error(ctx, ec.Recover(ctx, r))
8008 }
8009 }()
8010 res = ec._User_friends(ctx, field, obj)
8011 if res == graphql.Null {
8012 atomic.AddUint32(&fs.Invalids, 1)
8013 }
8014 return res
8015 }
8016
8017 if field.Deferrable != nil {
8018 dfs, ok := deferred[field.Deferrable.Label]
8019 di := 0
8020 if ok {
8021 dfs.AddField(field)
8022 di = len(dfs.Values) - 1
8023 } else {
8024 dfs = graphql.NewFieldSet([]graphql.CollectedField{field})
8025 deferred[field.Deferrable.Label] = dfs
8026 }
8027 dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler {
8028 return innerFunc(ctx, dfs)
8029 })
8030
8031
8032 out.Values[i] = graphql.Null
8033 continue
8034 }
8035
8036 out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
8037 case "created":
8038 out.Values[i] = ec._User_created(ctx, field, obj)
8039 if out.Values[i] == graphql.Null {
8040 atomic.AddUint32(&out.Invalids, 1)
8041 }
8042 case "updated":
8043 out.Values[i] = ec._User_updated(ctx, field, obj)
8044 case "pets":
8045 field := field
8046
8047 innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
8048 defer func() {
8049 if r := recover(); r != nil {
8050 ec.Error(ctx, ec.Recover(ctx, r))
8051 }
8052 }()
8053 res = ec._User_pets(ctx, field, obj)
8054 return res
8055 }
8056
8057 if field.Deferrable != nil {
8058 dfs, ok := deferred[field.Deferrable.Label]
8059 di := 0
8060 if ok {
8061 dfs.AddField(field)
8062 di = len(dfs.Values) - 1
8063 } else {
8064 dfs = graphql.NewFieldSet([]graphql.CollectedField{field})
8065 deferred[field.Deferrable.Label] = dfs
8066 }
8067 dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler {
8068 return innerFunc(ctx, dfs)
8069 })
8070
8071
8072 out.Values[i] = graphql.Null
8073 continue
8074 }
8075
8076 out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
8077 default:
8078 panic("unknown field " + strconv.Quote(field.Name))
8079 }
8080 }
8081 out.Dispatch(ctx)
8082 if out.Invalids > 0 {
8083 return graphql.Null
8084 }
8085
8086 atomic.AddInt32(&ec.deferred, int32(len(deferred)))
8087
8088 for label, dfs := range deferred {
8089 ec.processDeferredGroup(graphql.DeferredGroup{
8090 Label: label,
8091 Path: graphql.GetPath(ctx),
8092 FieldSet: dfs,
8093 Context: ctx,
8094 })
8095 }
8096
8097 return out
8098 }
8099
8100
8101
8102
8103
8104 func (ec *executionContext) unmarshalNInnerInput2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐInnerInput(ctx context.Context, v interface{}) (InnerInput, error) {
8105 res, err := ec.unmarshalInputInnerInput(ctx, v)
8106 return res, graphql.ErrorOnPath(ctx, err)
8107 }
8108
8109 func (ec *executionContext) unmarshalNInnerInput2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐInnerInput(ctx context.Context, v interface{}) (*InnerInput, error) {
8110 res, err := ec.unmarshalInputInnerInput(ctx, v)
8111 return &res, graphql.ErrorOnPath(ctx, err)
8112 }
8113
8114 func (ec *executionContext) marshalNInnerObject2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐInnerObject(ctx context.Context, sel ast.SelectionSet, v *InnerObject) graphql.Marshaler {
8115 if v == nil {
8116 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
8117 ec.Errorf(ctx, "the requested element is null which the schema does not allow")
8118 }
8119 return graphql.Null
8120 }
8121 return ec._InnerObject(ctx, sel, v)
8122 }
8123
8124 func (ec *executionContext) unmarshalNOmittableInput2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐOmittableInput(ctx context.Context, v interface{}) (OmittableInput, error) {
8125 res, err := ec.unmarshalInputOmittableInput(ctx, v)
8126 return res, graphql.ErrorOnPath(ctx, err)
8127 }
8128
8129 func (ec *executionContext) marshalNPet2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐPet(ctx context.Context, sel ast.SelectionSet, v *Pet) graphql.Marshaler {
8130 if v == nil {
8131 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
8132 ec.Errorf(ctx, "the requested element is null which the schema does not allow")
8133 }
8134 return graphql.Null
8135 }
8136 return ec._Pet(ctx, sel, v)
8137 }
8138
8139 func (ec *executionContext) unmarshalNRecursiveInputSlice2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐRecursiveInputSlice(ctx context.Context, v interface{}) (RecursiveInputSlice, error) {
8140 res, err := ec.unmarshalInputRecursiveInputSlice(ctx, v)
8141 return res, graphql.ErrorOnPath(ctx, err)
8142 }
8143
8144 func (ec *executionContext) unmarshalNTime2timeᚐTime(ctx context.Context, v interface{}) (time.Time, error) {
8145 res, err := graphql.UnmarshalTime(v)
8146 return res, graphql.ErrorOnPath(ctx, err)
8147 }
8148
8149 func (ec *executionContext) marshalNTime2timeᚐTime(ctx context.Context, sel ast.SelectionSet, v time.Time) graphql.Marshaler {
8150 res := graphql.MarshalTime(v)
8151 if res == graphql.Null {
8152 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
8153 ec.Errorf(ctx, "the requested element is null which the schema does not allow")
8154 }
8155 }
8156 return res
8157 }
8158
8159 func (ec *executionContext) unmarshalNUUID2string(ctx context.Context, v interface{}) (string, error) {
8160 res, err := graphql.UnmarshalString(v)
8161 return res, graphql.ErrorOnPath(ctx, err)
8162 }
8163
8164 func (ec *executionContext) marshalNUUID2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler {
8165 res := graphql.MarshalString(v)
8166 if res == graphql.Null {
8167 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
8168 ec.Errorf(ctx, "the requested element is null which the schema does not allow")
8169 }
8170 }
8171 return res
8172 }
8173
8174 func (ec *executionContext) marshalNUser2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐUser(ctx context.Context, sel ast.SelectionSet, v User) graphql.Marshaler {
8175 return ec._User(ctx, sel, &v)
8176 }
8177
8178 func (ec *executionContext) marshalNUser2ᚕᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐUserᚄ(ctx context.Context, sel ast.SelectionSet, v []*User) graphql.Marshaler {
8179 ret := make(graphql.Array, len(v))
8180 var wg sync.WaitGroup
8181 isLen1 := len(v) == 1
8182 if !isLen1 {
8183 wg.Add(len(v))
8184 }
8185 for i := range v {
8186 i := i
8187 fc := &graphql.FieldContext{
8188 Index: &i,
8189 Result: &v[i],
8190 }
8191 ctx := graphql.WithFieldContext(ctx, fc)
8192 f := func(i int) {
8193 defer func() {
8194 if r := recover(); r != nil {
8195 ec.Error(ctx, ec.Recover(ctx, r))
8196 ret = nil
8197 }
8198 }()
8199 if !isLen1 {
8200 defer wg.Done()
8201 }
8202 ret[i] = ec.marshalNUser2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐUser(ctx, sel, v[i])
8203 }
8204 if isLen1 {
8205 f(i)
8206 } else {
8207 go f(i)
8208 }
8209
8210 }
8211 wg.Wait()
8212
8213 for _, e := range ret {
8214 if e == graphql.Null {
8215 return graphql.Null
8216 }
8217 }
8218
8219 return ret
8220 }
8221
8222 func (ec *executionContext) marshalNUser2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐUser(ctx context.Context, sel ast.SelectionSet, v *User) graphql.Marshaler {
8223 if v == nil {
8224 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
8225 ec.Errorf(ctx, "the requested element is null which the schema does not allow")
8226 }
8227 return graphql.Null
8228 }
8229 return ec._User(ctx, sel, v)
8230 }
8231
8232 func (ec *executionContext) marshalOAutobind2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐAutobind(ctx context.Context, sel ast.SelectionSet, v *Autobind) graphql.Marshaler {
8233 if v == nil {
8234 return graphql.Null
8235 }
8236 return ec._Autobind(ctx, sel, v)
8237 }
8238
8239 func (ec *executionContext) unmarshalOChanges2map(ctx context.Context, v interface{}) (map[string]interface{}, error) {
8240 if v == nil {
8241 return nil, nil
8242 }
8243 res, err := ec.unmarshalInputChanges(ctx, v)
8244 return res, graphql.ErrorOnPath(ctx, err)
8245 }
8246
8247 func (ec *executionContext) marshalOInvalidIdentifier2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚋinvalidᚑpackagenameᚐInvalidIdentifier(ctx context.Context, sel ast.SelectionSet, v *invalid_packagename.InvalidIdentifier) graphql.Marshaler {
8248 if v == nil {
8249 return graphql.Null
8250 }
8251 return ec._InvalidIdentifier(ctx, sel, v)
8252 }
8253
8254 func (ec *executionContext) marshalOIt2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚋintrospectionᚐIt(ctx context.Context, sel ast.SelectionSet, v *introspection1.It) graphql.Marshaler {
8255 if v == nil {
8256 return graphql.Null
8257 }
8258 return ec._It(ctx, sel, v)
8259 }
8260
8261 func (ec *executionContext) marshalOModelMethods2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐModelMethods(ctx context.Context, sel ast.SelectionSet, v *ModelMethods) graphql.Marshaler {
8262 if v == nil {
8263 return graphql.Null
8264 }
8265 return ec._ModelMethods(ctx, sel, v)
8266 }
8267
8268 func (ec *executionContext) unmarshalOOuterInput2ᚕᚕᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐOuterInput(ctx context.Context, v interface{}) ([][]*OuterInput, error) {
8269 if v == nil {
8270 return nil, nil
8271 }
8272 var vSlice []interface{}
8273 if v != nil {
8274 vSlice = graphql.CoerceList(v)
8275 }
8276 var err error
8277 res := make([][]*OuterInput, len(vSlice))
8278 for i := range vSlice {
8279 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i))
8280 res[i], err = ec.unmarshalOOuterInput2ᚕᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐOuterInput(ctx, vSlice[i])
8281 if err != nil {
8282 return nil, err
8283 }
8284 }
8285 return res, nil
8286 }
8287
8288 func (ec *executionContext) unmarshalOOuterInput2ᚕᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐOuterInput(ctx context.Context, v interface{}) ([]*OuterInput, error) {
8289 if v == nil {
8290 return nil, nil
8291 }
8292 var vSlice []interface{}
8293 if v != nil {
8294 vSlice = graphql.CoerceList(v)
8295 }
8296 var err error
8297 res := make([]*OuterInput, len(vSlice))
8298 for i := range vSlice {
8299 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i))
8300 res[i], err = ec.unmarshalOOuterInput2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐOuterInput(ctx, vSlice[i])
8301 if err != nil {
8302 return nil, err
8303 }
8304 }
8305 return res, nil
8306 }
8307
8308 func (ec *executionContext) unmarshalOOuterInput2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐOuterInput(ctx context.Context, v interface{}) (*OuterInput, error) {
8309 if v == nil {
8310 return nil, nil
8311 }
8312 res, err := ec.unmarshalInputOuterInput(ctx, v)
8313 return &res, graphql.ErrorOnPath(ctx, err)
8314 }
8315
8316 func (ec *executionContext) marshalOOuterObject2ᚕᚕᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐOuterObject(ctx context.Context, sel ast.SelectionSet, v [][]*OuterObject) graphql.Marshaler {
8317 if v == nil {
8318 return graphql.Null
8319 }
8320 ret := make(graphql.Array, len(v))
8321 var wg sync.WaitGroup
8322 isLen1 := len(v) == 1
8323 if !isLen1 {
8324 wg.Add(len(v))
8325 }
8326 for i := range v {
8327 i := i
8328 fc := &graphql.FieldContext{
8329 Index: &i,
8330 Result: &v[i],
8331 }
8332 ctx := graphql.WithFieldContext(ctx, fc)
8333 f := func(i int) {
8334 defer func() {
8335 if r := recover(); r != nil {
8336 ec.Error(ctx, ec.Recover(ctx, r))
8337 ret = nil
8338 }
8339 }()
8340 if !isLen1 {
8341 defer wg.Done()
8342 }
8343 ret[i] = ec.marshalOOuterObject2ᚕᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐOuterObject(ctx, sel, v[i])
8344 }
8345 if isLen1 {
8346 f(i)
8347 } else {
8348 go f(i)
8349 }
8350
8351 }
8352 wg.Wait()
8353
8354 return ret
8355 }
8356
8357 func (ec *executionContext) marshalOOuterObject2ᚕᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐOuterObject(ctx context.Context, sel ast.SelectionSet, v []*OuterObject) graphql.Marshaler {
8358 if v == nil {
8359 return graphql.Null
8360 }
8361 ret := make(graphql.Array, len(v))
8362 var wg sync.WaitGroup
8363 isLen1 := len(v) == 1
8364 if !isLen1 {
8365 wg.Add(len(v))
8366 }
8367 for i := range v {
8368 i := i
8369 fc := &graphql.FieldContext{
8370 Index: &i,
8371 Result: &v[i],
8372 }
8373 ctx := graphql.WithFieldContext(ctx, fc)
8374 f := func(i int) {
8375 defer func() {
8376 if r := recover(); r != nil {
8377 ec.Error(ctx, ec.Recover(ctx, r))
8378 ret = nil
8379 }
8380 }()
8381 if !isLen1 {
8382 defer wg.Done()
8383 }
8384 ret[i] = ec.marshalOOuterObject2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐOuterObject(ctx, sel, v[i])
8385 }
8386 if isLen1 {
8387 f(i)
8388 } else {
8389 go f(i)
8390 }
8391
8392 }
8393 wg.Wait()
8394
8395 return ret
8396 }
8397
8398 func (ec *executionContext) marshalOOuterObject2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐOuterObject(ctx context.Context, sel ast.SelectionSet, v *OuterObject) graphql.Marshaler {
8399 if v == nil {
8400 return graphql.Null
8401 }
8402 return ec._OuterObject(ctx, sel, v)
8403 }
8404
8405 func (ec *executionContext) marshalOPet2ᚕᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐPetᚄ(ctx context.Context, sel ast.SelectionSet, v []*Pet) graphql.Marshaler {
8406 if v == nil {
8407 return graphql.Null
8408 }
8409 ret := make(graphql.Array, len(v))
8410 var wg sync.WaitGroup
8411 isLen1 := len(v) == 1
8412 if !isLen1 {
8413 wg.Add(len(v))
8414 }
8415 for i := range v {
8416 i := i
8417 fc := &graphql.FieldContext{
8418 Index: &i,
8419 Result: &v[i],
8420 }
8421 ctx := graphql.WithFieldContext(ctx, fc)
8422 f := func(i int) {
8423 defer func() {
8424 if r := recover(); r != nil {
8425 ec.Error(ctx, ec.Recover(ctx, r))
8426 ret = nil
8427 }
8428 }()
8429 if !isLen1 {
8430 defer wg.Done()
8431 }
8432 ret[i] = ec.marshalNPet2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐPet(ctx, sel, v[i])
8433 }
8434 if isLen1 {
8435 f(i)
8436 } else {
8437 go f(i)
8438 }
8439
8440 }
8441 wg.Wait()
8442
8443 for _, e := range ret {
8444 if e == graphql.Null {
8445 return graphql.Null
8446 }
8447 }
8448
8449 return ret
8450 }
8451
8452 func (ec *executionContext) unmarshalORecursiveInputSlice2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐRecursiveInputSliceᚄ(ctx context.Context, v interface{}) ([]RecursiveInputSlice, error) {
8453 if v == nil {
8454 return nil, nil
8455 }
8456 var vSlice []interface{}
8457 if v != nil {
8458 vSlice = graphql.CoerceList(v)
8459 }
8460 var err error
8461 res := make([]RecursiveInputSlice, len(vSlice))
8462 for i := range vSlice {
8463 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i))
8464 res[i], err = ec.unmarshalNRecursiveInputSlice2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐRecursiveInputSlice(ctx, vSlice[i])
8465 if err != nil {
8466 return nil, err
8467 }
8468 }
8469 return res, nil
8470 }
8471
8472 func (ec *executionContext) unmarshalORecursiveInputSlice2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐRecursiveInputSlice(ctx context.Context, v interface{}) (*RecursiveInputSlice, error) {
8473 if v == nil {
8474 return nil, nil
8475 }
8476 res, err := ec.unmarshalInputRecursiveInputSlice(ctx, v)
8477 return &res, graphql.ErrorOnPath(ctx, err)
8478 }
8479
8480 func (ec *executionContext) unmarshalOStatus2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐStatus(ctx context.Context, v interface{}) (*Status, error) {
8481 if v == nil {
8482 return nil, nil
8483 }
8484 var res = new(Status)
8485 err := res.UnmarshalGQL(v)
8486 return res, graphql.ErrorOnPath(ctx, err)
8487 }
8488
8489 func (ec *executionContext) marshalOStatus2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐStatus(ctx context.Context, sel ast.SelectionSet, v *Status) graphql.Marshaler {
8490 if v == nil {
8491 return graphql.Null
8492 }
8493 return v
8494 }
8495
8496 func (ec *executionContext) unmarshalOThirdParty2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐThirdParty(ctx context.Context, v interface{}) (*ThirdParty, error) {
8497 if v == nil {
8498 return nil, nil
8499 }
8500 res, err := UnmarshalThirdParty(v)
8501 return &res, graphql.ErrorOnPath(ctx, err)
8502 }
8503
8504 func (ec *executionContext) marshalOThirdParty2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐThirdParty(ctx context.Context, sel ast.SelectionSet, v *ThirdParty) graphql.Marshaler {
8505 if v == nil {
8506 return graphql.Null
8507 }
8508 res := MarshalThirdParty(*v)
8509 return res
8510 }
8511
8512 func (ec *executionContext) unmarshalOTime2ᚖtimeᚐTime(ctx context.Context, v interface{}) (*time.Time, error) {
8513 if v == nil {
8514 return nil, nil
8515 }
8516 res, err := graphql.UnmarshalTime(v)
8517 return &res, graphql.ErrorOnPath(ctx, err)
8518 }
8519
8520 func (ec *executionContext) marshalOTime2ᚖtimeᚐTime(ctx context.Context, sel ast.SelectionSet, v *time.Time) graphql.Marshaler {
8521 if v == nil {
8522 return graphql.Null
8523 }
8524 res := graphql.MarshalTime(*v)
8525 return res
8526 }
8527
8528
8529
View as plain text