github.com/luciferinlove/gqlgen@v0.17.16-bzc.1/codegen/testserver/followschema/mutation_with_custom_scalar.generated.go (about) 1 // Code generated by github.com/luciferinlove/gqlgen, DO NOT EDIT. 2 3 package followschema 4 5 import ( 6 "context" 7 8 "github.com/luciferinlove/gqlgen/graphql" 9 "github.com/vektah/gqlparser/v2/ast" 10 ) 11 12 // region ************************** generated!.gotpl ************************** 13 14 // endregion ************************** generated!.gotpl ************************** 15 16 // region ***************************** args.gotpl ***************************** 17 18 // endregion ***************************** args.gotpl ***************************** 19 20 // region ************************** directives.gotpl ************************** 21 22 // endregion ************************** directives.gotpl ************************** 23 24 // region **************************** field.gotpl ***************************** 25 26 // endregion **************************** field.gotpl ***************************** 27 28 // region **************************** input.gotpl ***************************** 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 var err error 46 47 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("field")) 48 it.Field, err = ec.unmarshalNEmail2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐEmail(ctx, v) 49 if err != nil { 50 return it, err 51 } 52 } 53 } 54 55 return it, nil 56 } 57 58 func (ec *executionContext) unmarshalInputSpecialInput(ctx context.Context, obj interface{}) (SpecialInput, error) { 59 var it SpecialInput 60 asMap := map[string]interface{}{} 61 for k, v := range obj.(map[string]interface{}) { 62 asMap[k] = v 63 } 64 65 fieldsInOrder := [...]string{"nesting"} 66 for _, k := range fieldsInOrder { 67 v, ok := asMap[k] 68 if !ok { 69 continue 70 } 71 switch k { 72 case "nesting": 73 var err error 74 75 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("nesting")) 76 it.Nesting, err = ec.unmarshalNNestedInput2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐNestedInput(ctx, v) 77 if err != nil { 78 return it, err 79 } 80 } 81 } 82 83 return it, nil 84 } 85 86 // endregion **************************** input.gotpl ***************************** 87 88 // region ************************** interface.gotpl *************************** 89 90 // endregion ************************** interface.gotpl *************************** 91 92 // region **************************** object.gotpl **************************** 93 94 // endregion **************************** object.gotpl **************************** 95 96 // region ***************************** type.gotpl ***************************** 97 98 func (ec *executionContext) unmarshalNEmail2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐEmail(ctx context.Context, v interface{}) (Email, error) { 99 var res Email 100 err := res.UnmarshalGQL(v) 101 return res, graphql.ErrorOnPath(ctx, err) 102 } 103 104 func (ec *executionContext) marshalNEmail2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐEmail(ctx context.Context, sel ast.SelectionSet, v Email) graphql.Marshaler { 105 return v 106 } 107 108 func (ec *executionContext) unmarshalNNestedInput2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐNestedInput(ctx context.Context, v interface{}) (*NestedInput, error) { 109 res, err := ec.unmarshalInputNestedInput(ctx, v) 110 return &res, graphql.ErrorOnPath(ctx, err) 111 } 112 113 func (ec *executionContext) unmarshalNSpecialInput2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐSpecialInput(ctx context.Context, v interface{}) (SpecialInput, error) { 114 res, err := ec.unmarshalInputSpecialInput(ctx, v) 115 return res, graphql.ErrorOnPath(ctx, err) 116 } 117 118 // endregion ***************************** type.gotpl *****************************