github.com/operandinc/gqlgen@v0.16.1/codegen/testserver/followschema/scalar_context.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  // endregion **************************** input.gotpl *****************************
    31  
    32  // region    ************************** interface.gotpl ***************************
    33  
    34  // endregion ************************** interface.gotpl ***************************
    35  
    36  // region    **************************** object.gotpl ****************************
    37  
    38  // endregion **************************** object.gotpl ****************************
    39  
    40  // region    ***************************** type.gotpl *****************************
    41  
    42  func (ec *executionContext) unmarshalNStringFromContextFunction2string(ctx context.Context, v interface{}) (string, error) {
    43  	res, err := UnmarshalStringFromContextFunction(ctx, v)
    44  	return res, graphql.ErrorOnPath(ctx, err)
    45  }
    46  
    47  func (ec *executionContext) marshalNStringFromContextFunction2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler {
    48  	res := MarshalStringFromContextFunction(v)
    49  	if res == graphql.Null {
    50  		if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
    51  			ec.Errorf(ctx, "must not be null")
    52  		}
    53  	}
    54  	return graphql.WrapContextMarshaler(ctx, res)
    55  }
    56  
    57  func (ec *executionContext) unmarshalNStringFromContextInterface2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐStringFromContextInterface(ctx context.Context, v interface{}) (StringFromContextInterface, error) {
    58  	var res StringFromContextInterface
    59  	err := res.UnmarshalGQLContext(ctx, v)
    60  	return res, graphql.ErrorOnPath(ctx, err)
    61  }
    62  
    63  func (ec *executionContext) marshalNStringFromContextInterface2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐStringFromContextInterface(ctx context.Context, sel ast.SelectionSet, v StringFromContextInterface) graphql.Marshaler {
    64  	return graphql.WrapContextMarshaler(ctx, v)
    65  }
    66  
    67  func (ec *executionContext) unmarshalNStringFromContextInterface2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐStringFromContextInterface(ctx context.Context, v interface{}) (*StringFromContextInterface, error) {
    68  	var res = new(StringFromContextInterface)
    69  	err := res.UnmarshalGQLContext(ctx, v)
    70  	return res, graphql.ErrorOnPath(ctx, err)
    71  }
    72  
    73  func (ec *executionContext) marshalNStringFromContextInterface2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐStringFromContextInterface(ctx context.Context, sel ast.SelectionSet, v *StringFromContextInterface) graphql.Marshaler {
    74  	if v == nil {
    75  		if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
    76  			ec.Errorf(ctx, "must not be null")
    77  		}
    78  		return graphql.Null
    79  	}
    80  	return graphql.WrapContextMarshaler(ctx, v)
    81  }
    82  
    83  // endregion ***************************** type.gotpl *****************************