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

     1  // Code generated by github.com/operandinc/gqlgen, DO NOT EDIT.
     2  
     3  package followschema
     4  
     5  import (
     6  	"context"
     7  	"errors"
     8  	"fmt"
     9  	"strconv"
    10  
    11  	"github.com/operandinc/gqlgen/graphql"
    12  	"github.com/vektah/gqlparser/v2/ast"
    13  )
    14  
    15  // region    ************************** generated!.gotpl **************************
    16  
    17  // endregion ************************** generated!.gotpl **************************
    18  
    19  // region    ***************************** args.gotpl *****************************
    20  
    21  func (ec *executionContext) dir_length_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
    22  	var err error
    23  	args := map[string]interface{}{}
    24  	var arg0 int
    25  	if tmp, ok := rawArgs["min"]; ok {
    26  		ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("min"))
    27  		arg0, err = ec.unmarshalNInt2int(ctx, tmp)
    28  		if err != nil {
    29  			return nil, err
    30  		}
    31  	}
    32  	args["min"] = arg0
    33  	var arg1 *int
    34  	if tmp, ok := rawArgs["max"]; ok {
    35  		ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("max"))
    36  		arg1, err = ec.unmarshalOInt2ᚖint(ctx, tmp)
    37  		if err != nil {
    38  			return nil, err
    39  		}
    40  	}
    41  	args["max"] = arg1
    42  	var arg2 *string
    43  	if tmp, ok := rawArgs["message"]; ok {
    44  		ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("message"))
    45  		arg2, err = ec.unmarshalOString2ᚖstring(ctx, tmp)
    46  		if err != nil {
    47  			return nil, err
    48  		}
    49  	}
    50  	args["message"] = arg2
    51  	return args, nil
    52  }
    53  
    54  func (ec *executionContext) dir_logged_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
    55  	var err error
    56  	args := map[string]interface{}{}
    57  	var arg0 string
    58  	if tmp, ok := rawArgs["id"]; ok {
    59  		ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("id"))
    60  		arg0, err = ec.unmarshalNUUID2string(ctx, tmp)
    61  		if err != nil {
    62  			return nil, err
    63  		}
    64  	}
    65  	args["id"] = arg0
    66  	return args, nil
    67  }
    68  
    69  func (ec *executionContext) dir_order1_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
    70  	var err error
    71  	args := map[string]interface{}{}
    72  	var arg0 string
    73  	if tmp, ok := rawArgs["location"]; ok {
    74  		ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("location"))
    75  		arg0, err = ec.unmarshalNString2string(ctx, tmp)
    76  		if err != nil {
    77  			return nil, err
    78  		}
    79  	}
    80  	args["location"] = arg0
    81  	return args, nil
    82  }
    83  
    84  func (ec *executionContext) dir_order2_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
    85  	var err error
    86  	args := map[string]interface{}{}
    87  	var arg0 string
    88  	if tmp, ok := rawArgs["location"]; ok {
    89  		ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("location"))
    90  		arg0, err = ec.unmarshalNString2string(ctx, tmp)
    91  		if err != nil {
    92  			return nil, err
    93  		}
    94  	}
    95  	args["location"] = arg0
    96  	return args, nil
    97  }
    98  
    99  func (ec *executionContext) dir_range_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
   100  	var err error
   101  	args := map[string]interface{}{}
   102  	var arg0 *int
   103  	if tmp, ok := rawArgs["min"]; ok {
   104  		ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("min"))
   105  		arg0, err = ec.unmarshalOInt2ᚖint(ctx, tmp)
   106  		if err != nil {
   107  			return nil, err
   108  		}
   109  	}
   110  	args["min"] = arg0
   111  	var arg1 *int
   112  	if tmp, ok := rawArgs["max"]; ok {
   113  		ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("max"))
   114  		arg1, err = ec.unmarshalOInt2ᚖint(ctx, tmp)
   115  		if err != nil {
   116  			return nil, err
   117  		}
   118  	}
   119  	args["max"] = arg1
   120  	return args, nil
   121  }
   122  
   123  // endregion ***************************** args.gotpl *****************************
   124  
   125  // region    ************************** directives.gotpl **************************
   126  
   127  func (ec *executionContext) _fieldMiddleware(ctx context.Context, obj interface{}, next graphql.Resolver) interface{} {
   128  	fc := graphql.GetFieldContext(ctx)
   129  	for _, d := range fc.Field.Directives {
   130  		switch d.Name {
   131  		case "logged":
   132  			rawArgs := d.ArgumentMap(ec.Variables)
   133  			args, err := ec.dir_logged_args(ctx, rawArgs)
   134  			if err != nil {
   135  				ec.Error(ctx, err)
   136  				return nil
   137  			}
   138  			n := next
   139  			next = func(ctx context.Context) (interface{}, error) {
   140  				if ec.directives.Logged == nil {
   141  					return nil, errors.New("directive logged is not implemented")
   142  				}
   143  				return ec.directives.Logged(ctx, obj, n, args["id"].(string))
   144  			}
   145  		}
   146  	}
   147  	res, err := ec.ResolverMiddleware(ctx, next)
   148  	if err != nil {
   149  		ec.Error(ctx, err)
   150  		return nil
   151  	}
   152  	return res
   153  }
   154  
   155  // endregion ************************** directives.gotpl **************************
   156  
   157  // region    **************************** field.gotpl *****************************
   158  
   159  func (ec *executionContext) _ObjectDirectives_text(ctx context.Context, field graphql.CollectedField, obj *ObjectDirectives) (ret graphql.Marshaler) {
   160  	defer func() {
   161  		if r := recover(); r != nil {
   162  			ec.Error(ctx, ec.Recover(ctx, r))
   163  			ret = graphql.Null
   164  		}
   165  	}()
   166  	fc := &graphql.FieldContext{
   167  		Object:     "ObjectDirectives",
   168  		Field:      field,
   169  		Args:       nil,
   170  		IsMethod:   false,
   171  		IsResolver: false,
   172  	}
   173  
   174  	ctx = graphql.WithFieldContext(ctx, fc)
   175  	resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
   176  		directive0 := func(rctx context.Context) (interface{}, error) {
   177  			ctx = rctx // use context from middleware stack in children
   178  			return obj.Text, nil
   179  		}
   180  		directive1 := func(ctx context.Context) (interface{}, error) {
   181  			min, err := ec.unmarshalNInt2int(ctx, 0)
   182  			if err != nil {
   183  				return nil, err
   184  			}
   185  			max, err := ec.unmarshalOInt2ᚖint(ctx, 7)
   186  			if err != nil {
   187  				return nil, err
   188  			}
   189  			message, err := ec.unmarshalOString2ᚖstring(ctx, "not valid")
   190  			if err != nil {
   191  				return nil, err
   192  			}
   193  			if ec.directives.Length == nil {
   194  				return nil, errors.New("directive length is not implemented")
   195  			}
   196  			return ec.directives.Length(ctx, obj, directive0, min, max, message)
   197  		}
   198  
   199  		tmp, err := directive1(rctx)
   200  		if err != nil {
   201  			return nil, graphql.ErrorOnPath(ctx, err)
   202  		}
   203  		if tmp == nil {
   204  			return nil, nil
   205  		}
   206  		if data, ok := tmp.(string); ok {
   207  			return data, nil
   208  		}
   209  		return nil, fmt.Errorf(`unexpected type %T from directive, should be string`, tmp)
   210  	})
   211  
   212  	if resTmp == nil {
   213  		if !graphql.HasFieldError(ctx, fc) {
   214  			ec.Errorf(ctx, "must not be null")
   215  		}
   216  		return graphql.Null
   217  	}
   218  	res := resTmp.(string)
   219  	fc.Result = res
   220  	return ec.marshalNString2string(ctx, field.Selections, res)
   221  }
   222  
   223  func (ec *executionContext) _ObjectDirectives_nullableText(ctx context.Context, field graphql.CollectedField, obj *ObjectDirectives) (ret graphql.Marshaler) {
   224  	defer func() {
   225  		if r := recover(); r != nil {
   226  			ec.Error(ctx, ec.Recover(ctx, r))
   227  			ret = graphql.Null
   228  		}
   229  	}()
   230  	fc := &graphql.FieldContext{
   231  		Object:     "ObjectDirectives",
   232  		Field:      field,
   233  		Args:       nil,
   234  		IsMethod:   false,
   235  		IsResolver: false,
   236  	}
   237  
   238  	ctx = graphql.WithFieldContext(ctx, fc)
   239  	resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
   240  		directive0 := func(rctx context.Context) (interface{}, error) {
   241  			ctx = rctx // use context from middleware stack in children
   242  			return obj.NullableText, nil
   243  		}
   244  		directive1 := func(ctx context.Context) (interface{}, error) {
   245  			if ec.directives.ToNull == nil {
   246  				return nil, errors.New("directive toNull is not implemented")
   247  			}
   248  			return ec.directives.ToNull(ctx, obj, directive0)
   249  		}
   250  
   251  		tmp, err := directive1(rctx)
   252  		if err != nil {
   253  			return nil, graphql.ErrorOnPath(ctx, err)
   254  		}
   255  		if tmp == nil {
   256  			return nil, nil
   257  		}
   258  		if data, ok := tmp.(*string); ok {
   259  			return data, nil
   260  		}
   261  		return nil, fmt.Errorf(`unexpected type %T from directive, should be *string`, tmp)
   262  	})
   263  
   264  	if resTmp == nil {
   265  		return graphql.Null
   266  	}
   267  	res := resTmp.(*string)
   268  	fc.Result = res
   269  	return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
   270  }
   271  
   272  func (ec *executionContext) _ObjectDirectives_order(ctx context.Context, field graphql.CollectedField, obj *ObjectDirectives) (ret graphql.Marshaler) {
   273  	defer func() {
   274  		if r := recover(); r != nil {
   275  			ec.Error(ctx, ec.Recover(ctx, r))
   276  			ret = graphql.Null
   277  		}
   278  	}()
   279  	fc := &graphql.FieldContext{
   280  		Object:     "ObjectDirectives",
   281  		Field:      field,
   282  		Args:       nil,
   283  		IsMethod:   false,
   284  		IsResolver: false,
   285  	}
   286  
   287  	ctx = graphql.WithFieldContext(ctx, fc)
   288  	resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
   289  		ctx = rctx // use context from middleware stack in children
   290  		return obj.Order, nil
   291  	})
   292  
   293  	if resTmp == nil {
   294  		if !graphql.HasFieldError(ctx, fc) {
   295  			ec.Errorf(ctx, "must not be null")
   296  		}
   297  		return graphql.Null
   298  	}
   299  	res := resTmp.([]string)
   300  	fc.Result = res
   301  	return ec.marshalNString2ᚕstringᚄ(ctx, field.Selections, res)
   302  }
   303  
   304  func (ec *executionContext) _ObjectDirectivesWithCustomGoModel_nullableText(ctx context.Context, field graphql.CollectedField, obj *ObjectDirectivesWithCustomGoModel) (ret graphql.Marshaler) {
   305  	defer func() {
   306  		if r := recover(); r != nil {
   307  			ec.Error(ctx, ec.Recover(ctx, r))
   308  			ret = graphql.Null
   309  		}
   310  	}()
   311  	fc := &graphql.FieldContext{
   312  		Object:     "ObjectDirectivesWithCustomGoModel",
   313  		Field:      field,
   314  		Args:       nil,
   315  		IsMethod:   false,
   316  		IsResolver: false,
   317  	}
   318  
   319  	ctx = graphql.WithFieldContext(ctx, fc)
   320  	resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
   321  		directive0 := func(rctx context.Context) (interface{}, error) {
   322  			ctx = rctx // use context from middleware stack in children
   323  			return obj.NullableText, nil
   324  		}
   325  		directive1 := func(ctx context.Context) (interface{}, error) {
   326  			if ec.directives.ToNull == nil {
   327  				return nil, errors.New("directive toNull is not implemented")
   328  			}
   329  			return ec.directives.ToNull(ctx, obj, directive0)
   330  		}
   331  
   332  		tmp, err := directive1(rctx)
   333  		if err != nil {
   334  			return nil, graphql.ErrorOnPath(ctx, err)
   335  		}
   336  		if tmp == nil {
   337  			return nil, nil
   338  		}
   339  		if data, ok := tmp.(string); ok {
   340  			return data, nil
   341  		}
   342  		return nil, fmt.Errorf(`unexpected type %T from directive, should be string`, tmp)
   343  	})
   344  
   345  	if resTmp == nil {
   346  		return graphql.Null
   347  	}
   348  	res := resTmp.(string)
   349  	fc.Result = res
   350  	return ec.marshalOString2string(ctx, field.Selections, res)
   351  }
   352  
   353  // endregion **************************** field.gotpl *****************************
   354  
   355  // region    **************************** input.gotpl *****************************
   356  
   357  func (ec *executionContext) unmarshalInputInnerDirectives(ctx context.Context, obj interface{}) (InnerDirectives, error) {
   358  	var it InnerDirectives
   359  	asMap := map[string]interface{}{}
   360  	for k, v := range obj.(map[string]interface{}) {
   361  		asMap[k] = v
   362  	}
   363  
   364  	for k, v := range asMap {
   365  		switch k {
   366  		case "message":
   367  			var err error
   368  
   369  			ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("message"))
   370  			directive0 := func(ctx context.Context) (interface{}, error) { return ec.unmarshalNString2string(ctx, v) }
   371  			directive1 := func(ctx context.Context) (interface{}, error) {
   372  				min, err := ec.unmarshalNInt2int(ctx, 1)
   373  				if err != nil {
   374  					return nil, err
   375  				}
   376  				message, err := ec.unmarshalOString2ᚖstring(ctx, "not valid")
   377  				if err != nil {
   378  					return nil, err
   379  				}
   380  				if ec.directives.Length == nil {
   381  					return nil, errors.New("directive length is not implemented")
   382  				}
   383  				return ec.directives.Length(ctx, obj, directive0, min, nil, message)
   384  			}
   385  
   386  			tmp, err := directive1(ctx)
   387  			if err != nil {
   388  				return it, graphql.ErrorOnPath(ctx, err)
   389  			}
   390  			if data, ok := tmp.(string); ok {
   391  				it.Message = data
   392  			} else {
   393  				err := fmt.Errorf(`unexpected type %T from directive, should be string`, tmp)
   394  				return it, graphql.ErrorOnPath(ctx, err)
   395  			}
   396  		}
   397  	}
   398  
   399  	return it, nil
   400  }
   401  
   402  func (ec *executionContext) unmarshalInputInputDirectives(ctx context.Context, obj interface{}) (InputDirectives, error) {
   403  	var it InputDirectives
   404  	asMap := map[string]interface{}{}
   405  	for k, v := range obj.(map[string]interface{}) {
   406  		asMap[k] = v
   407  	}
   408  
   409  	for k, v := range asMap {
   410  		switch k {
   411  		case "text":
   412  			var err error
   413  
   414  			ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("text"))
   415  			directive0 := func(ctx context.Context) (interface{}, error) { return ec.unmarshalNString2string(ctx, v) }
   416  			directive1 := func(ctx context.Context) (interface{}, error) {
   417  				if ec.directives.Directive3 == nil {
   418  					return nil, errors.New("directive directive3 is not implemented")
   419  				}
   420  				return ec.directives.Directive3(ctx, obj, directive0)
   421  			}
   422  			directive2 := func(ctx context.Context) (interface{}, error) {
   423  				min, err := ec.unmarshalNInt2int(ctx, 0)
   424  				if err != nil {
   425  					return nil, err
   426  				}
   427  				max, err := ec.unmarshalOInt2ᚖint(ctx, 7)
   428  				if err != nil {
   429  					return nil, err
   430  				}
   431  				message, err := ec.unmarshalOString2ᚖstring(ctx, "not valid")
   432  				if err != nil {
   433  					return nil, err
   434  				}
   435  				if ec.directives.Length == nil {
   436  					return nil, errors.New("directive length is not implemented")
   437  				}
   438  				return ec.directives.Length(ctx, obj, directive1, min, max, message)
   439  			}
   440  
   441  			tmp, err := directive2(ctx)
   442  			if err != nil {
   443  				return it, graphql.ErrorOnPath(ctx, err)
   444  			}
   445  			if data, ok := tmp.(string); ok {
   446  				it.Text = data
   447  			} else {
   448  				err := fmt.Errorf(`unexpected type %T from directive, should be string`, tmp)
   449  				return it, graphql.ErrorOnPath(ctx, err)
   450  			}
   451  		case "nullableText":
   452  			var err error
   453  
   454  			ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("nullableText"))
   455  			directive0 := func(ctx context.Context) (interface{}, error) { return ec.unmarshalOString2ᚖstring(ctx, v) }
   456  			directive1 := func(ctx context.Context) (interface{}, error) {
   457  				if ec.directives.Directive3 == nil {
   458  					return nil, errors.New("directive directive3 is not implemented")
   459  				}
   460  				return ec.directives.Directive3(ctx, obj, directive0)
   461  			}
   462  			directive2 := func(ctx context.Context) (interface{}, error) {
   463  				if ec.directives.ToNull == nil {
   464  					return nil, errors.New("directive toNull is not implemented")
   465  				}
   466  				return ec.directives.ToNull(ctx, obj, directive1)
   467  			}
   468  
   469  			tmp, err := directive2(ctx)
   470  			if err != nil {
   471  				return it, graphql.ErrorOnPath(ctx, err)
   472  			}
   473  			if data, ok := tmp.(*string); ok {
   474  				it.NullableText = data
   475  			} else if tmp == nil {
   476  				it.NullableText = nil
   477  			} else {
   478  				err := fmt.Errorf(`unexpected type %T from directive, should be *string`, tmp)
   479  				return it, graphql.ErrorOnPath(ctx, err)
   480  			}
   481  		case "inner":
   482  			var err error
   483  
   484  			ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("inner"))
   485  			directive0 := func(ctx context.Context) (interface{}, error) {
   486  				return ec.unmarshalNInnerDirectives2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐInnerDirectives(ctx, v)
   487  			}
   488  			directive1 := func(ctx context.Context) (interface{}, error) {
   489  				if ec.directives.Directive3 == nil {
   490  					return nil, errors.New("directive directive3 is not implemented")
   491  				}
   492  				return ec.directives.Directive3(ctx, obj, directive0)
   493  			}
   494  
   495  			tmp, err := directive1(ctx)
   496  			if err != nil {
   497  				return it, graphql.ErrorOnPath(ctx, err)
   498  			}
   499  			if data, ok := tmp.(*InnerDirectives); ok {
   500  				it.Inner = data
   501  			} else if tmp == nil {
   502  				it.Inner = nil
   503  			} else {
   504  				err := fmt.Errorf(`unexpected type %T from directive, should be *github.com/operandinc/gqlgen/codegen/testserver/followschema.InnerDirectives`, tmp)
   505  				return it, graphql.ErrorOnPath(ctx, err)
   506  			}
   507  		case "innerNullable":
   508  			var err error
   509  
   510  			ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("innerNullable"))
   511  			directive0 := func(ctx context.Context) (interface{}, error) {
   512  				return ec.unmarshalOInnerDirectives2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐInnerDirectives(ctx, v)
   513  			}
   514  			directive1 := func(ctx context.Context) (interface{}, error) {
   515  				if ec.directives.Directive3 == nil {
   516  					return nil, errors.New("directive directive3 is not implemented")
   517  				}
   518  				return ec.directives.Directive3(ctx, obj, directive0)
   519  			}
   520  
   521  			tmp, err := directive1(ctx)
   522  			if err != nil {
   523  				return it, graphql.ErrorOnPath(ctx, err)
   524  			}
   525  			if data, ok := tmp.(*InnerDirectives); ok {
   526  				it.InnerNullable = data
   527  			} else if tmp == nil {
   528  				it.InnerNullable = nil
   529  			} else {
   530  				err := fmt.Errorf(`unexpected type %T from directive, should be *github.com/operandinc/gqlgen/codegen/testserver/followschema.InnerDirectives`, tmp)
   531  				return it, graphql.ErrorOnPath(ctx, err)
   532  			}
   533  		case "thirdParty":
   534  			var err error
   535  
   536  			ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("thirdParty"))
   537  			directive0 := func(ctx context.Context) (interface{}, error) {
   538  				return ec.unmarshalOThirdParty2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐThirdParty(ctx, v)
   539  			}
   540  			directive1 := func(ctx context.Context) (interface{}, error) {
   541  				if ec.directives.Directive3 == nil {
   542  					return nil, errors.New("directive directive3 is not implemented")
   543  				}
   544  				return ec.directives.Directive3(ctx, obj, directive0)
   545  			}
   546  			directive2 := func(ctx context.Context) (interface{}, error) {
   547  				min, err := ec.unmarshalNInt2int(ctx, 0)
   548  				if err != nil {
   549  					return nil, err
   550  				}
   551  				max, err := ec.unmarshalOInt2ᚖint(ctx, 7)
   552  				if err != nil {
   553  					return nil, err
   554  				}
   555  				if ec.directives.Length == nil {
   556  					return nil, errors.New("directive length is not implemented")
   557  				}
   558  				return ec.directives.Length(ctx, obj, directive1, min, max, nil)
   559  			}
   560  
   561  			tmp, err := directive2(ctx)
   562  			if err != nil {
   563  				return it, graphql.ErrorOnPath(ctx, err)
   564  			}
   565  			if data, ok := tmp.(*ThirdParty); ok {
   566  				it.ThirdParty = data
   567  			} else if tmp == nil {
   568  				it.ThirdParty = nil
   569  			} else {
   570  				err := fmt.Errorf(`unexpected type %T from directive, should be *github.com/operandinc/gqlgen/codegen/testserver/followschema.ThirdParty`, tmp)
   571  				return it, graphql.ErrorOnPath(ctx, err)
   572  			}
   573  		}
   574  	}
   575  
   576  	return it, nil
   577  }
   578  
   579  // endregion **************************** input.gotpl *****************************
   580  
   581  // region    ************************** interface.gotpl ***************************
   582  
   583  // endregion ************************** interface.gotpl ***************************
   584  
   585  // region    **************************** object.gotpl ****************************
   586  
   587  var objectDirectivesImplementors = []string{"ObjectDirectives"}
   588  
   589  func (ec *executionContext) _ObjectDirectives(ctx context.Context, sel ast.SelectionSet, obj *ObjectDirectives) graphql.Marshaler {
   590  	fields := graphql.CollectFields(ec.OperationContext, sel, objectDirectivesImplementors)
   591  	out := graphql.NewFieldSet(fields)
   592  	var invalids uint32
   593  	for i, field := range fields {
   594  		switch field.Name {
   595  		case "__typename":
   596  			out.Values[i] = graphql.MarshalString("ObjectDirectives")
   597  		case "text":
   598  			innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
   599  				return ec._ObjectDirectives_text(ctx, field, obj)
   600  			}
   601  
   602  			out.Values[i] = innerFunc(ctx)
   603  
   604  			if out.Values[i] == graphql.Null {
   605  				invalids++
   606  			}
   607  		case "nullableText":
   608  			innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
   609  				return ec._ObjectDirectives_nullableText(ctx, field, obj)
   610  			}
   611  
   612  			out.Values[i] = innerFunc(ctx)
   613  
   614  		case "order":
   615  			innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
   616  				return ec._ObjectDirectives_order(ctx, field, obj)
   617  			}
   618  
   619  			out.Values[i] = innerFunc(ctx)
   620  
   621  			if out.Values[i] == graphql.Null {
   622  				invalids++
   623  			}
   624  		default:
   625  			panic("unknown field " + strconv.Quote(field.Name))
   626  		}
   627  	}
   628  	out.Dispatch()
   629  	if invalids > 0 {
   630  		return graphql.Null
   631  	}
   632  	return out
   633  }
   634  
   635  var objectDirectivesWithCustomGoModelImplementors = []string{"ObjectDirectivesWithCustomGoModel"}
   636  
   637  func (ec *executionContext) _ObjectDirectivesWithCustomGoModel(ctx context.Context, sel ast.SelectionSet, obj *ObjectDirectivesWithCustomGoModel) graphql.Marshaler {
   638  	fields := graphql.CollectFields(ec.OperationContext, sel, objectDirectivesWithCustomGoModelImplementors)
   639  	out := graphql.NewFieldSet(fields)
   640  	var invalids uint32
   641  	for i, field := range fields {
   642  		switch field.Name {
   643  		case "__typename":
   644  			out.Values[i] = graphql.MarshalString("ObjectDirectivesWithCustomGoModel")
   645  		case "nullableText":
   646  			innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
   647  				return ec._ObjectDirectivesWithCustomGoModel_nullableText(ctx, field, obj)
   648  			}
   649  
   650  			out.Values[i] = innerFunc(ctx)
   651  
   652  		default:
   653  			panic("unknown field " + strconv.Quote(field.Name))
   654  		}
   655  	}
   656  	out.Dispatch()
   657  	if invalids > 0 {
   658  		return graphql.Null
   659  	}
   660  	return out
   661  }
   662  
   663  // endregion **************************** object.gotpl ****************************
   664  
   665  // region    ***************************** type.gotpl *****************************
   666  
   667  func (ec *executionContext) unmarshalNInnerDirectives2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐInnerDirectives(ctx context.Context, v interface{}) (*InnerDirectives, error) {
   668  	res, err := ec.unmarshalInputInnerDirectives(ctx, v)
   669  	return &res, graphql.ErrorOnPath(ctx, err)
   670  }
   671  
   672  func (ec *executionContext) unmarshalNInputDirectives2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐInputDirectives(ctx context.Context, v interface{}) (InputDirectives, error) {
   673  	res, err := ec.unmarshalInputInputDirectives(ctx, v)
   674  	return res, graphql.ErrorOnPath(ctx, err)
   675  }
   676  
   677  func (ec *executionContext) unmarshalOInnerDirectives2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐInnerDirectives(ctx context.Context, v interface{}) (*InnerDirectives, error) {
   678  	if v == nil {
   679  		return nil, nil
   680  	}
   681  	res, err := ec.unmarshalInputInnerDirectives(ctx, v)
   682  	return &res, graphql.ErrorOnPath(ctx, err)
   683  }
   684  
   685  func (ec *executionContext) unmarshalOInputDirectives2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐInputDirectives(ctx context.Context, v interface{}) (*InputDirectives, error) {
   686  	if v == nil {
   687  		return nil, nil
   688  	}
   689  	res, err := ec.unmarshalInputInputDirectives(ctx, v)
   690  	return &res, graphql.ErrorOnPath(ctx, err)
   691  }
   692  
   693  func (ec *executionContext) marshalOObjectDirectives2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐObjectDirectives(ctx context.Context, sel ast.SelectionSet, v *ObjectDirectives) graphql.Marshaler {
   694  	if v == nil {
   695  		return graphql.Null
   696  	}
   697  	return ec._ObjectDirectives(ctx, sel, v)
   698  }
   699  
   700  func (ec *executionContext) marshalOObjectDirectivesWithCustomGoModel2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐObjectDirectivesWithCustomGoModel(ctx context.Context, sel ast.SelectionSet, v *ObjectDirectivesWithCustomGoModel) graphql.Marshaler {
   701  	if v == nil {
   702  		return graphql.Null
   703  	}
   704  	return ec._ObjectDirectivesWithCustomGoModel(ctx, sel, v)
   705  }
   706  
   707  // endregion ***************************** type.gotpl *****************************