github.com/geneva/gqlgen@v0.17.7-0.20230801155730-7b9317164836/codegen/testserver/followschema/defaults.generated.go (about)

     1  // Code generated by github.com/geneva/gqlgen, DO NOT EDIT.
     2  
     3  package followschema
     4  
     5  import (
     6  	"context"
     7  	"errors"
     8  	"fmt"
     9  	"strconv"
    10  	"sync/atomic"
    11  
    12  	"github.com/geneva/gqlgen/graphql"
    13  	"github.com/vektah/gqlparser/v2/ast"
    14  )
    15  
    16  // region    ************************** generated!.gotpl **************************
    17  
    18  type MutationResolver interface {
    19  	DefaultInput(ctx context.Context, input DefaultInput) (*DefaultParametersMirror, error)
    20  	OverrideValueViaInput(ctx context.Context, input FieldsOrderInput) (*FieldsOrderPayload, error)
    21  	UpdateSomething(ctx context.Context, input SpecialInput) (string, error)
    22  	UpdatePtrToPtr(ctx context.Context, input UpdatePtrToPtrOuter) (*PtrToPtrOuter, error)
    23  }
    24  
    25  // endregion ************************** generated!.gotpl **************************
    26  
    27  // region    ***************************** args.gotpl *****************************
    28  
    29  func (ec *executionContext) field_Mutation_defaultInput_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
    30  	var err error
    31  	args := map[string]interface{}{}
    32  	var arg0 DefaultInput
    33  	if tmp, ok := rawArgs["input"]; ok {
    34  		ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input"))
    35  		arg0, err = ec.unmarshalNDefaultInput2githubᚗcomᚋgenevaᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐDefaultInput(ctx, tmp)
    36  		if err != nil {
    37  			return nil, err
    38  		}
    39  	}
    40  	args["input"] = arg0
    41  	return args, nil
    42  }
    43  
    44  func (ec *executionContext) field_Mutation_overrideValueViaInput_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
    45  	var err error
    46  	args := map[string]interface{}{}
    47  	var arg0 FieldsOrderInput
    48  	if tmp, ok := rawArgs["input"]; ok {
    49  		ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input"))
    50  		arg0, err = ec.unmarshalNFieldsOrderInput2githubᚗcomᚋgenevaᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐFieldsOrderInput(ctx, tmp)
    51  		if err != nil {
    52  			return nil, err
    53  		}
    54  	}
    55  	args["input"] = arg0
    56  	return args, nil
    57  }
    58  
    59  func (ec *executionContext) field_Mutation_updatePtrToPtr_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
    60  	var err error
    61  	args := map[string]interface{}{}
    62  	var arg0 UpdatePtrToPtrOuter
    63  	if tmp, ok := rawArgs["input"]; ok {
    64  		ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input"))
    65  		arg0, err = ec.unmarshalNUpdatePtrToPtrOuter2githubᚗcomᚋgenevaᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐUpdatePtrToPtrOuter(ctx, tmp)
    66  		if err != nil {
    67  			return nil, err
    68  		}
    69  	}
    70  	args["input"] = arg0
    71  	return args, nil
    72  }
    73  
    74  func (ec *executionContext) field_Mutation_updateSomething_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
    75  	var err error
    76  	args := map[string]interface{}{}
    77  	var arg0 SpecialInput
    78  	if tmp, ok := rawArgs["input"]; ok {
    79  		ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input"))
    80  		arg0, err = ec.unmarshalNSpecialInput2githubᚗcomᚋgenevaᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐSpecialInput(ctx, tmp)
    81  		if err != nil {
    82  			return nil, err
    83  		}
    84  	}
    85  	args["input"] = arg0
    86  	return args, nil
    87  }
    88  
    89  // endregion ***************************** args.gotpl *****************************
    90  
    91  // region    ************************** directives.gotpl **************************
    92  
    93  // endregion ************************** directives.gotpl **************************
    94  
    95  // region    **************************** field.gotpl *****************************
    96  
    97  func (ec *executionContext) _DefaultParametersMirror_falsyBoolean(ctx context.Context, field graphql.CollectedField, obj *DefaultParametersMirror) (ret graphql.Marshaler) {
    98  	fc, err := ec.fieldContext_DefaultParametersMirror_falsyBoolean(ctx, field)
    99  	if err != nil {
   100  		return graphql.Null
   101  	}
   102  	ctx = graphql.WithFieldContext(ctx, fc)
   103  	defer func() {
   104  		if r := recover(); r != nil {
   105  			ec.Error(ctx, ec.Recover(ctx, r))
   106  			ret = graphql.Null
   107  		}
   108  	}()
   109  	resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
   110  		ctx = rctx // use context from middleware stack in children
   111  		return obj.FalsyBoolean, nil
   112  	})
   113  
   114  	if resTmp == nil {
   115  		return graphql.Null
   116  	}
   117  	res := resTmp.(*bool)
   118  	fc.Result = res
   119  	return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res)
   120  }
   121  
   122  func (ec *executionContext) fieldContext_DefaultParametersMirror_falsyBoolean(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
   123  	fc = &graphql.FieldContext{
   124  		Object:     "DefaultParametersMirror",
   125  		Field:      field,
   126  		IsMethod:   false,
   127  		IsResolver: false,
   128  		Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
   129  			return nil, errors.New("field of type Boolean does not have child fields")
   130  		},
   131  	}
   132  	return fc, nil
   133  }
   134  
   135  func (ec *executionContext) _DefaultParametersMirror_truthyBoolean(ctx context.Context, field graphql.CollectedField, obj *DefaultParametersMirror) (ret graphql.Marshaler) {
   136  	fc, err := ec.fieldContext_DefaultParametersMirror_truthyBoolean(ctx, field)
   137  	if err != nil {
   138  		return graphql.Null
   139  	}
   140  	ctx = graphql.WithFieldContext(ctx, fc)
   141  	defer func() {
   142  		if r := recover(); r != nil {
   143  			ec.Error(ctx, ec.Recover(ctx, r))
   144  			ret = graphql.Null
   145  		}
   146  	}()
   147  	resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
   148  		ctx = rctx // use context from middleware stack in children
   149  		return obj.TruthyBoolean, nil
   150  	})
   151  
   152  	if resTmp == nil {
   153  		return graphql.Null
   154  	}
   155  	res := resTmp.(*bool)
   156  	fc.Result = res
   157  	return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res)
   158  }
   159  
   160  func (ec *executionContext) fieldContext_DefaultParametersMirror_truthyBoolean(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
   161  	fc = &graphql.FieldContext{
   162  		Object:     "DefaultParametersMirror",
   163  		Field:      field,
   164  		IsMethod:   false,
   165  		IsResolver: false,
   166  		Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
   167  			return nil, errors.New("field of type Boolean does not have child fields")
   168  		},
   169  	}
   170  	return fc, nil
   171  }
   172  
   173  func (ec *executionContext) _Mutation_defaultInput(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
   174  	fc, err := ec.fieldContext_Mutation_defaultInput(ctx, field)
   175  	if err != nil {
   176  		return graphql.Null
   177  	}
   178  	ctx = graphql.WithFieldContext(ctx, fc)
   179  	defer func() {
   180  		if r := recover(); r != nil {
   181  			ec.Error(ctx, ec.Recover(ctx, r))
   182  			ret = graphql.Null
   183  		}
   184  	}()
   185  	resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) {
   186  		ctx = rctx // use context from middleware stack in children
   187  		return ec.resolvers.Mutation().DefaultInput(rctx, fc.Args["input"].(DefaultInput))
   188  	})
   189  
   190  	if resTmp == nil {
   191  		if !graphql.HasFieldError(ctx, fc) {
   192  			ec.Errorf(ctx, "must not be null")
   193  		}
   194  		return graphql.Null
   195  	}
   196  	res := resTmp.(*DefaultParametersMirror)
   197  	fc.Result = res
   198  	return ec.marshalNDefaultParametersMirror2ᚖgithubᚗcomᚋgenevaᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐDefaultParametersMirror(ctx, field.Selections, res)
   199  }
   200  
   201  func (ec *executionContext) fieldContext_Mutation_defaultInput(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
   202  	fc = &graphql.FieldContext{
   203  		Object:     "Mutation",
   204  		Field:      field,
   205  		IsMethod:   true,
   206  		IsResolver: true,
   207  		Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
   208  			switch field.Name {
   209  			case "falsyBoolean":
   210  				return ec.fieldContext_DefaultParametersMirror_falsyBoolean(ctx, field)
   211  			case "truthyBoolean":
   212  				return ec.fieldContext_DefaultParametersMirror_truthyBoolean(ctx, field)
   213  			}
   214  			return nil, fmt.Errorf("no field named %q was found under type DefaultParametersMirror", field.Name)
   215  		},
   216  	}
   217  	defer func() {
   218  		if r := recover(); r != nil {
   219  			err = ec.Recover(ctx, r)
   220  			ec.Error(ctx, err)
   221  		}
   222  	}()
   223  	ctx = graphql.WithFieldContext(ctx, fc)
   224  	if fc.Args, err = ec.field_Mutation_defaultInput_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
   225  		ec.Error(ctx, err)
   226  		return fc, err
   227  	}
   228  	return fc, nil
   229  }
   230  
   231  func (ec *executionContext) _Mutation_overrideValueViaInput(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
   232  	fc, err := ec.fieldContext_Mutation_overrideValueViaInput(ctx, field)
   233  	if err != nil {
   234  		return graphql.Null
   235  	}
   236  	ctx = graphql.WithFieldContext(ctx, fc)
   237  	defer func() {
   238  		if r := recover(); r != nil {
   239  			ec.Error(ctx, ec.Recover(ctx, r))
   240  			ret = graphql.Null
   241  		}
   242  	}()
   243  	resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) {
   244  		ctx = rctx // use context from middleware stack in children
   245  		return ec.resolvers.Mutation().OverrideValueViaInput(rctx, fc.Args["input"].(FieldsOrderInput))
   246  	})
   247  
   248  	if resTmp == nil {
   249  		if !graphql.HasFieldError(ctx, fc) {
   250  			ec.Errorf(ctx, "must not be null")
   251  		}
   252  		return graphql.Null
   253  	}
   254  	res := resTmp.(*FieldsOrderPayload)
   255  	fc.Result = res
   256  	return ec.marshalNFieldsOrderPayload2ᚖgithubᚗcomᚋgenevaᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐFieldsOrderPayload(ctx, field.Selections, res)
   257  }
   258  
   259  func (ec *executionContext) fieldContext_Mutation_overrideValueViaInput(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
   260  	fc = &graphql.FieldContext{
   261  		Object:     "Mutation",
   262  		Field:      field,
   263  		IsMethod:   true,
   264  		IsResolver: true,
   265  		Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
   266  			switch field.Name {
   267  			case "firstFieldValue":
   268  				return ec.fieldContext_FieldsOrderPayload_firstFieldValue(ctx, field)
   269  			}
   270  			return nil, fmt.Errorf("no field named %q was found under type FieldsOrderPayload", field.Name)
   271  		},
   272  	}
   273  	defer func() {
   274  		if r := recover(); r != nil {
   275  			err = ec.Recover(ctx, r)
   276  			ec.Error(ctx, err)
   277  		}
   278  	}()
   279  	ctx = graphql.WithFieldContext(ctx, fc)
   280  	if fc.Args, err = ec.field_Mutation_overrideValueViaInput_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
   281  		ec.Error(ctx, err)
   282  		return fc, err
   283  	}
   284  	return fc, nil
   285  }
   286  
   287  func (ec *executionContext) _Mutation_updateSomething(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
   288  	fc, err := ec.fieldContext_Mutation_updateSomething(ctx, field)
   289  	if err != nil {
   290  		return graphql.Null
   291  	}
   292  	ctx = graphql.WithFieldContext(ctx, fc)
   293  	defer func() {
   294  		if r := recover(); r != nil {
   295  			ec.Error(ctx, ec.Recover(ctx, r))
   296  			ret = graphql.Null
   297  		}
   298  	}()
   299  	resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) {
   300  		ctx = rctx // use context from middleware stack in children
   301  		return ec.resolvers.Mutation().UpdateSomething(rctx, fc.Args["input"].(SpecialInput))
   302  	})
   303  
   304  	if resTmp == nil {
   305  		if !graphql.HasFieldError(ctx, fc) {
   306  			ec.Errorf(ctx, "must not be null")
   307  		}
   308  		return graphql.Null
   309  	}
   310  	res := resTmp.(string)
   311  	fc.Result = res
   312  	return ec.marshalNString2string(ctx, field.Selections, res)
   313  }
   314  
   315  func (ec *executionContext) fieldContext_Mutation_updateSomething(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
   316  	fc = &graphql.FieldContext{
   317  		Object:     "Mutation",
   318  		Field:      field,
   319  		IsMethod:   true,
   320  		IsResolver: true,
   321  		Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
   322  			return nil, errors.New("field of type String does not have child fields")
   323  		},
   324  	}
   325  	defer func() {
   326  		if r := recover(); r != nil {
   327  			err = ec.Recover(ctx, r)
   328  			ec.Error(ctx, err)
   329  		}
   330  	}()
   331  	ctx = graphql.WithFieldContext(ctx, fc)
   332  	if fc.Args, err = ec.field_Mutation_updateSomething_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
   333  		ec.Error(ctx, err)
   334  		return fc, err
   335  	}
   336  	return fc, nil
   337  }
   338  
   339  func (ec *executionContext) _Mutation_updatePtrToPtr(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
   340  	fc, err := ec.fieldContext_Mutation_updatePtrToPtr(ctx, field)
   341  	if err != nil {
   342  		return graphql.Null
   343  	}
   344  	ctx = graphql.WithFieldContext(ctx, fc)
   345  	defer func() {
   346  		if r := recover(); r != nil {
   347  			ec.Error(ctx, ec.Recover(ctx, r))
   348  			ret = graphql.Null
   349  		}
   350  	}()
   351  	resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) {
   352  		ctx = rctx // use context from middleware stack in children
   353  		return ec.resolvers.Mutation().UpdatePtrToPtr(rctx, fc.Args["input"].(UpdatePtrToPtrOuter))
   354  	})
   355  
   356  	if resTmp == nil {
   357  		if !graphql.HasFieldError(ctx, fc) {
   358  			ec.Errorf(ctx, "must not be null")
   359  		}
   360  		return graphql.Null
   361  	}
   362  	res := resTmp.(*PtrToPtrOuter)
   363  	fc.Result = res
   364  	return ec.marshalNPtrToPtrOuter2ᚖgithubᚗcomᚋgenevaᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐPtrToPtrOuter(ctx, field.Selections, res)
   365  }
   366  
   367  func (ec *executionContext) fieldContext_Mutation_updatePtrToPtr(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
   368  	fc = &graphql.FieldContext{
   369  		Object:     "Mutation",
   370  		Field:      field,
   371  		IsMethod:   true,
   372  		IsResolver: true,
   373  		Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
   374  			switch field.Name {
   375  			case "name":
   376  				return ec.fieldContext_PtrToPtrOuter_name(ctx, field)
   377  			case "inner":
   378  				return ec.fieldContext_PtrToPtrOuter_inner(ctx, field)
   379  			case "stupidInner":
   380  				return ec.fieldContext_PtrToPtrOuter_stupidInner(ctx, field)
   381  			}
   382  			return nil, fmt.Errorf("no field named %q was found under type PtrToPtrOuter", field.Name)
   383  		},
   384  	}
   385  	defer func() {
   386  		if r := recover(); r != nil {
   387  			err = ec.Recover(ctx, r)
   388  			ec.Error(ctx, err)
   389  		}
   390  	}()
   391  	ctx = graphql.WithFieldContext(ctx, fc)
   392  	if fc.Args, err = ec.field_Mutation_updatePtrToPtr_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
   393  		ec.Error(ctx, err)
   394  		return fc, err
   395  	}
   396  	return fc, nil
   397  }
   398  
   399  // endregion **************************** field.gotpl *****************************
   400  
   401  // region    **************************** input.gotpl *****************************
   402  
   403  func (ec *executionContext) unmarshalInputDefaultInput(ctx context.Context, obj interface{}) (DefaultInput, error) {
   404  	var it DefaultInput
   405  	asMap := map[string]interface{}{}
   406  	for k, v := range obj.(map[string]interface{}) {
   407  		asMap[k] = v
   408  	}
   409  
   410  	if _, present := asMap["falsyBoolean"]; !present {
   411  		asMap["falsyBoolean"] = false
   412  	}
   413  	if _, present := asMap["truthyBoolean"]; !present {
   414  		asMap["truthyBoolean"] = true
   415  	}
   416  
   417  	fieldsInOrder := [...]string{"falsyBoolean", "truthyBoolean"}
   418  	for _, k := range fieldsInOrder {
   419  		v, ok := asMap[k]
   420  		if !ok {
   421  			continue
   422  		}
   423  		switch k {
   424  		case "falsyBoolean":
   425  			var err error
   426  
   427  			ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("falsyBoolean"))
   428  			data, err := ec.unmarshalOBoolean2ᚖbool(ctx, v)
   429  			if err != nil {
   430  				return it, err
   431  			}
   432  			it.FalsyBoolean = data
   433  		case "truthyBoolean":
   434  			var err error
   435  
   436  			ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("truthyBoolean"))
   437  			data, err := ec.unmarshalOBoolean2ᚖbool(ctx, v)
   438  			if err != nil {
   439  				return it, err
   440  			}
   441  			it.TruthyBoolean = data
   442  		}
   443  	}
   444  
   445  	return it, nil
   446  }
   447  
   448  // endregion **************************** input.gotpl *****************************
   449  
   450  // region    ************************** interface.gotpl ***************************
   451  
   452  // endregion ************************** interface.gotpl ***************************
   453  
   454  // region    **************************** object.gotpl ****************************
   455  
   456  var defaultParametersMirrorImplementors = []string{"DefaultParametersMirror"}
   457  
   458  func (ec *executionContext) _DefaultParametersMirror(ctx context.Context, sel ast.SelectionSet, obj *DefaultParametersMirror) graphql.Marshaler {
   459  	fields := graphql.CollectFields(ec.OperationContext, sel, defaultParametersMirrorImplementors)
   460  
   461  	out := graphql.NewFieldSet(fields)
   462  	deferred := make(map[string]*graphql.FieldSet)
   463  	for i, field := range fields {
   464  		switch field.Name {
   465  		case "__typename":
   466  			out.Values[i] = graphql.MarshalString("DefaultParametersMirror")
   467  		case "falsyBoolean":
   468  			out.Values[i] = ec._DefaultParametersMirror_falsyBoolean(ctx, field, obj)
   469  		case "truthyBoolean":
   470  			out.Values[i] = ec._DefaultParametersMirror_truthyBoolean(ctx, field, obj)
   471  		default:
   472  			panic("unknown field " + strconv.Quote(field.Name))
   473  		}
   474  	}
   475  	out.Dispatch(ctx)
   476  	if out.Invalids > 0 {
   477  		return graphql.Null
   478  	}
   479  
   480  	atomic.AddInt32(&ec.deferred, int32(len(deferred)))
   481  
   482  	for label, dfs := range deferred {
   483  		ec.processDeferredGroup(graphql.DeferredGroup{
   484  			Label:    label,
   485  			Path:     graphql.GetPath(ctx),
   486  			FieldSet: dfs,
   487  			Context:  ctx,
   488  		})
   489  	}
   490  
   491  	return out
   492  }
   493  
   494  var mutationImplementors = []string{"Mutation"}
   495  
   496  func (ec *executionContext) _Mutation(ctx context.Context, sel ast.SelectionSet) graphql.Marshaler {
   497  	fields := graphql.CollectFields(ec.OperationContext, sel, mutationImplementors)
   498  	ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{
   499  		Object: "Mutation",
   500  	})
   501  
   502  	out := graphql.NewFieldSet(fields)
   503  	deferred := make(map[string]*graphql.FieldSet)
   504  	for i, field := range fields {
   505  		innerCtx := graphql.WithRootFieldContext(ctx, &graphql.RootFieldContext{
   506  			Object: field.Name,
   507  			Field:  field,
   508  		})
   509  
   510  		switch field.Name {
   511  		case "__typename":
   512  			out.Values[i] = graphql.MarshalString("Mutation")
   513  		case "defaultInput":
   514  			out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
   515  				return ec._Mutation_defaultInput(ctx, field)
   516  			})
   517  			if out.Values[i] == graphql.Null {
   518  				out.Invalids++
   519  			}
   520  		case "overrideValueViaInput":
   521  			out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
   522  				return ec._Mutation_overrideValueViaInput(ctx, field)
   523  			})
   524  			if out.Values[i] == graphql.Null {
   525  				out.Invalids++
   526  			}
   527  		case "updateSomething":
   528  			out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
   529  				return ec._Mutation_updateSomething(ctx, field)
   530  			})
   531  			if out.Values[i] == graphql.Null {
   532  				out.Invalids++
   533  			}
   534  		case "updatePtrToPtr":
   535  			out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
   536  				return ec._Mutation_updatePtrToPtr(ctx, field)
   537  			})
   538  			if out.Values[i] == graphql.Null {
   539  				out.Invalids++
   540  			}
   541  		default:
   542  			panic("unknown field " + strconv.Quote(field.Name))
   543  		}
   544  	}
   545  	out.Dispatch(ctx)
   546  	if out.Invalids > 0 {
   547  		return graphql.Null
   548  	}
   549  
   550  	atomic.AddInt32(&ec.deferred, int32(len(deferred)))
   551  
   552  	for label, dfs := range deferred {
   553  		ec.processDeferredGroup(graphql.DeferredGroup{
   554  			Label:    label,
   555  			Path:     graphql.GetPath(ctx),
   556  			FieldSet: dfs,
   557  			Context:  ctx,
   558  		})
   559  	}
   560  
   561  	return out
   562  }
   563  
   564  // endregion **************************** object.gotpl ****************************
   565  
   566  // region    ***************************** type.gotpl *****************************
   567  
   568  func (ec *executionContext) unmarshalNDefaultInput2githubᚗcomᚋgenevaᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐDefaultInput(ctx context.Context, v interface{}) (DefaultInput, error) {
   569  	res, err := ec.unmarshalInputDefaultInput(ctx, v)
   570  	return res, graphql.ErrorOnPath(ctx, err)
   571  }
   572  
   573  func (ec *executionContext) marshalNDefaultParametersMirror2githubᚗcomᚋgenevaᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐDefaultParametersMirror(ctx context.Context, sel ast.SelectionSet, v DefaultParametersMirror) graphql.Marshaler {
   574  	return ec._DefaultParametersMirror(ctx, sel, &v)
   575  }
   576  
   577  func (ec *executionContext) marshalNDefaultParametersMirror2ᚖgithubᚗcomᚋgenevaᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐDefaultParametersMirror(ctx context.Context, sel ast.SelectionSet, v *DefaultParametersMirror) graphql.Marshaler {
   578  	if v == nil {
   579  		if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
   580  			ec.Errorf(ctx, "the requested element is null which the schema does not allow")
   581  		}
   582  		return graphql.Null
   583  	}
   584  	return ec._DefaultParametersMirror(ctx, sel, v)
   585  }
   586  
   587  // endregion ***************************** type.gotpl *****************************