...
1
2
3 package followschema
4
5 import (
6 "context"
7
8 "github.com/99designs/gqlgen/graphql"
9 "github.com/vektah/gqlparser/v2/ast"
10 )
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30 func (ec *executionContext) unmarshalInputNestedInput(ctx context.Context, obj interface{}) (NestedInput, error) {
31 var it NestedInput
32 asMap := map[string]interface{}{}
33 for k, v := range obj.(map[string]interface{}) {
34 asMap[k] = v
35 }
36
37 fieldsInOrder := [...]string{"field"}
38 for _, k := range fieldsInOrder {
39 v, ok := asMap[k]
40 if !ok {
41 continue
42 }
43 switch k {
44 case "field":
45 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("field"))
46 data, err := ec.unmarshalNEmail2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐEmail(ctx, v)
47 if err != nil {
48 return it, err
49 }
50 it.Field = data
51 }
52 }
53
54 return it, nil
55 }
56
57 func (ec *executionContext) unmarshalInputSpecialInput(ctx context.Context, obj interface{}) (SpecialInput, error) {
58 var it SpecialInput
59 asMap := map[string]interface{}{}
60 for k, v := range obj.(map[string]interface{}) {
61 asMap[k] = v
62 }
63
64 fieldsInOrder := [...]string{"nesting"}
65 for _, k := range fieldsInOrder {
66 v, ok := asMap[k]
67 if !ok {
68 continue
69 }
70 switch k {
71 case "nesting":
72 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("nesting"))
73 data, err := ec.unmarshalNNestedInput2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐNestedInput(ctx, v)
74 if err != nil {
75 return it, err
76 }
77 it.Nesting = data
78 }
79 }
80
81 return it, nil
82 }
83
84
85
86
87
88
89
90
91
92
93
94
95
96 func (ec *executionContext) unmarshalNEmail2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐEmail(ctx context.Context, v interface{}) (Email, error) {
97 var res Email
98 err := res.UnmarshalGQL(v)
99 return res, graphql.ErrorOnPath(ctx, err)
100 }
101
102 func (ec *executionContext) marshalNEmail2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐEmail(ctx context.Context, sel ast.SelectionSet, v Email) graphql.Marshaler {
103 return v
104 }
105
106 func (ec *executionContext) unmarshalNNestedInput2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐNestedInput(ctx context.Context, v interface{}) (*NestedInput, error) {
107 res, err := ec.unmarshalInputNestedInput(ctx, v)
108 return &res, graphql.ErrorOnPath(ctx, err)
109 }
110
111 func (ec *executionContext) unmarshalNSpecialInput2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐSpecialInput(ctx context.Context, v interface{}) (SpecialInput, error) {
112 res, err := ec.unmarshalInputSpecialInput(ctx, v)
113 return res, graphql.ErrorOnPath(ctx, err)
114 }
115
116
117
View as plain text