github.com/operandinc/gqlgen@v0.16.1/codegen/testserver/followschema/mutation_with_custom_scalar.generated.go (about)

     1  // Code generated by github.com/operandinc/gqlgen, DO NOT EDIT.
     2  
     3  package followschema
     4  
     5  import (
     6  	"context"
     7  
     8  	"github.com/operandinc/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  	for k, v := range asMap {
    38  		switch k {
    39  		case "field":
    40  			var err error
    41  
    42  			ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("field"))
    43  			it.Field, err = ec.unmarshalNEmail2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐEmail(ctx, v)
    44  			if err != nil {
    45  				return it, err
    46  			}
    47  		}
    48  	}
    49  
    50  	return it, nil
    51  }
    52  
    53  func (ec *executionContext) unmarshalInputSpecialInput(ctx context.Context, obj interface{}) (SpecialInput, error) {
    54  	var it SpecialInput
    55  	asMap := map[string]interface{}{}
    56  	for k, v := range obj.(map[string]interface{}) {
    57  		asMap[k] = v
    58  	}
    59  
    60  	for k, v := range asMap {
    61  		switch k {
    62  		case "nesting":
    63  			var err error
    64  
    65  			ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("nesting"))
    66  			it.Nesting, err = ec.unmarshalNNestedInput2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐNestedInput(ctx, v)
    67  			if err != nil {
    68  				return it, err
    69  			}
    70  		}
    71  	}
    72  
    73  	return it, nil
    74  }
    75  
    76  // endregion **************************** input.gotpl *****************************
    77  
    78  // region    ************************** interface.gotpl ***************************
    79  
    80  // endregion ************************** interface.gotpl ***************************
    81  
    82  // region    **************************** object.gotpl ****************************
    83  
    84  // endregion **************************** object.gotpl ****************************
    85  
    86  // region    ***************************** type.gotpl *****************************
    87  
    88  func (ec *executionContext) unmarshalNEmail2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐEmail(ctx context.Context, v interface{}) (Email, error) {
    89  	var res Email
    90  	err := res.UnmarshalGQL(v)
    91  	return res, graphql.ErrorOnPath(ctx, err)
    92  }
    93  
    94  func (ec *executionContext) marshalNEmail2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐEmail(ctx context.Context, sel ast.SelectionSet, v Email) graphql.Marshaler {
    95  	return v
    96  }
    97  
    98  func (ec *executionContext) unmarshalNNestedInput2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐNestedInput(ctx context.Context, v interface{}) (*NestedInput, error) {
    99  	res, err := ec.unmarshalInputNestedInput(ctx, v)
   100  	return &res, graphql.ErrorOnPath(ctx, err)
   101  }
   102  
   103  func (ec *executionContext) unmarshalNSpecialInput2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐSpecialInput(ctx context.Context, v interface{}) (SpecialInput, error) {
   104  	res, err := ec.unmarshalInputSpecialInput(ctx, v)
   105  	return res, graphql.ErrorOnPath(ctx, err)
   106  }
   107  
   108  // endregion ***************************** type.gotpl *****************************