github.com/ryicoh/apery-graphql@v0.0.0-20210919090814-a8c219904bee/pkg/generated.go (about)

     1  // Code generated by github.com/99designs/gqlgen, DO NOT EDIT.
     2  
     3  package pkg
     4  
     5  import (
     6  	"bytes"
     7  	"context"
     8  	"errors"
     9  	"strconv"
    10  	"sync"
    11  	"sync/atomic"
    12  
    13  	"github.com/99designs/gqlgen/graphql"
    14  	"github.com/99designs/gqlgen/graphql/introspection"
    15  	gqlparser "github.com/vektah/gqlparser/v2"
    16  	"github.com/vektah/gqlparser/v2/ast"
    17  )
    18  
    19  // region    ************************** generated!.gotpl **************************
    20  
    21  // NewExecutableSchema creates an ExecutableSchema from the ResolverRoot interface.
    22  func NewExecutableSchema(cfg Config) graphql.ExecutableSchema {
    23  	return &executableSchema{
    24  		resolvers:  cfg.Resolvers,
    25  		directives: cfg.Directives,
    26  		complexity: cfg.Complexity,
    27  	}
    28  }
    29  
    30  type Config struct {
    31  	Resolvers  ResolverRoot
    32  	Directives DirectiveRoot
    33  	Complexity ComplexityRoot
    34  }
    35  
    36  type ResolverRoot interface {
    37  	Mutation() MutationResolver
    38  	Query() QueryResolver
    39  }
    40  
    41  type DirectiveRoot struct {
    42  }
    43  
    44  type ComplexityRoot struct {
    45  	EvaluateOutput struct {
    46  		Bestmove func(childComplexity int) int
    47  		Depth    func(childComplexity int) int
    48  		Nodes    func(childComplexity int) int
    49  		Pv       func(childComplexity int) int
    50  		Value    func(childComplexity int) int
    51  	}
    52  
    53  	Mutation struct {
    54  		Foo func(childComplexity int) int
    55  	}
    56  
    57  	Query struct {
    58  		Evaluate func(childComplexity int, input EvaluateInput) int
    59  	}
    60  }
    61  
    62  type MutationResolver interface {
    63  	Foo(ctx context.Context) (bool, error)
    64  }
    65  type QueryResolver interface {
    66  	Evaluate(ctx context.Context, input EvaluateInput) (*EvaluateOutput, error)
    67  }
    68  
    69  type executableSchema struct {
    70  	resolvers  ResolverRoot
    71  	directives DirectiveRoot
    72  	complexity ComplexityRoot
    73  }
    74  
    75  func (e *executableSchema) Schema() *ast.Schema {
    76  	return parsedSchema
    77  }
    78  
    79  func (e *executableSchema) Complexity(typeName, field string, childComplexity int, rawArgs map[string]interface{}) (int, bool) {
    80  	ec := executionContext{nil, e}
    81  	_ = ec
    82  	switch typeName + "." + field {
    83  
    84  	case "EvaluateOutput.bestmove":
    85  		if e.complexity.EvaluateOutput.Bestmove == nil {
    86  			break
    87  		}
    88  
    89  		return e.complexity.EvaluateOutput.Bestmove(childComplexity), true
    90  
    91  	case "EvaluateOutput.depth":
    92  		if e.complexity.EvaluateOutput.Depth == nil {
    93  			break
    94  		}
    95  
    96  		return e.complexity.EvaluateOutput.Depth(childComplexity), true
    97  
    98  	case "EvaluateOutput.nodes":
    99  		if e.complexity.EvaluateOutput.Nodes == nil {
   100  			break
   101  		}
   102  
   103  		return e.complexity.EvaluateOutput.Nodes(childComplexity), true
   104  
   105  	case "EvaluateOutput.pv":
   106  		if e.complexity.EvaluateOutput.Pv == nil {
   107  			break
   108  		}
   109  
   110  		return e.complexity.EvaluateOutput.Pv(childComplexity), true
   111  
   112  	case "EvaluateOutput.value":
   113  		if e.complexity.EvaluateOutput.Value == nil {
   114  			break
   115  		}
   116  
   117  		return e.complexity.EvaluateOutput.Value(childComplexity), true
   118  
   119  	case "Mutation.foo":
   120  		if e.complexity.Mutation.Foo == nil {
   121  			break
   122  		}
   123  
   124  		return e.complexity.Mutation.Foo(childComplexity), true
   125  
   126  	case "Query.evaluate":
   127  		if e.complexity.Query.Evaluate == nil {
   128  			break
   129  		}
   130  
   131  		args, err := ec.field_Query_evaluate_args(context.TODO(), rawArgs)
   132  		if err != nil {
   133  			return 0, false
   134  		}
   135  
   136  		return e.complexity.Query.Evaluate(childComplexity, args["input"].(EvaluateInput)), true
   137  
   138  	}
   139  	return 0, false
   140  }
   141  
   142  func (e *executableSchema) Exec(ctx context.Context) graphql.ResponseHandler {
   143  	rc := graphql.GetOperationContext(ctx)
   144  	ec := executionContext{rc, e}
   145  	first := true
   146  
   147  	switch rc.Operation.Operation {
   148  	case ast.Query:
   149  		return func(ctx context.Context) *graphql.Response {
   150  			if !first {
   151  				return nil
   152  			}
   153  			first = false
   154  			data := ec._Query(ctx, rc.Operation.SelectionSet)
   155  			var buf bytes.Buffer
   156  			data.MarshalGQL(&buf)
   157  
   158  			return &graphql.Response{
   159  				Data: buf.Bytes(),
   160  			}
   161  		}
   162  	case ast.Mutation:
   163  		return func(ctx context.Context) *graphql.Response {
   164  			if !first {
   165  				return nil
   166  			}
   167  			first = false
   168  			data := ec._Mutation(ctx, rc.Operation.SelectionSet)
   169  			var buf bytes.Buffer
   170  			data.MarshalGQL(&buf)
   171  
   172  			return &graphql.Response{
   173  				Data: buf.Bytes(),
   174  			}
   175  		}
   176  
   177  	default:
   178  		return graphql.OneShot(graphql.ErrorResponse(ctx, "unsupported GraphQL operation"))
   179  	}
   180  }
   181  
   182  type executionContext struct {
   183  	*graphql.OperationContext
   184  	*executableSchema
   185  }
   186  
   187  func (ec *executionContext) introspectSchema() (*introspection.Schema, error) {
   188  	if ec.DisableIntrospection {
   189  		return nil, errors.New("introspection disabled")
   190  	}
   191  	return introspection.WrapSchema(parsedSchema), nil
   192  }
   193  
   194  func (ec *executionContext) introspectType(name string) (*introspection.Type, error) {
   195  	if ec.DisableIntrospection {
   196  		return nil, errors.New("introspection disabled")
   197  	}
   198  	return introspection.WrapTypeFromDef(parsedSchema, parsedSchema.Types[name]), nil
   199  }
   200  
   201  var sources = []*ast.Source{
   202  	{Name: "schema.graphqls", Input: `input EvaluateInput {
   203    sfen: String!
   204    moves: [String!]!
   205    timeoutSecond: Int!
   206  }
   207  
   208  type EvaluateOutput {
   209    value: Int!
   210    nodes: Int!
   211    depth: Int!
   212    bestmove: String!
   213    pv: [String!]!
   214  }
   215  
   216  type Query {
   217    evaluate(input: EvaluateInput!): EvaluateOutput!
   218  }
   219  
   220  type Mutation {
   221    foo: Boolean!
   222  }
   223  `, BuiltIn: false},
   224  }
   225  var parsedSchema = gqlparser.MustLoadSchema(sources...)
   226  
   227  // endregion ************************** generated!.gotpl **************************
   228  
   229  // region    ***************************** args.gotpl *****************************
   230  
   231  func (ec *executionContext) field_Query___type_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
   232  	var err error
   233  	args := map[string]interface{}{}
   234  	var arg0 string
   235  	if tmp, ok := rawArgs["name"]; ok {
   236  		ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name"))
   237  		arg0, err = ec.unmarshalNString2string(ctx, tmp)
   238  		if err != nil {
   239  			return nil, err
   240  		}
   241  	}
   242  	args["name"] = arg0
   243  	return args, nil
   244  }
   245  
   246  func (ec *executionContext) field_Query_evaluate_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
   247  	var err error
   248  	args := map[string]interface{}{}
   249  	var arg0 EvaluateInput
   250  	if tmp, ok := rawArgs["input"]; ok {
   251  		ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input"))
   252  		arg0, err = ec.unmarshalNEvaluateInput2githubᚗcomᚋryicohᚋaperyᚑgraphqlᚋpkgᚐEvaluateInput(ctx, tmp)
   253  		if err != nil {
   254  			return nil, err
   255  		}
   256  	}
   257  	args["input"] = arg0
   258  	return args, nil
   259  }
   260  
   261  func (ec *executionContext) field___Type_enumValues_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
   262  	var err error
   263  	args := map[string]interface{}{}
   264  	var arg0 bool
   265  	if tmp, ok := rawArgs["includeDeprecated"]; ok {
   266  		ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("includeDeprecated"))
   267  		arg0, err = ec.unmarshalOBoolean2bool(ctx, tmp)
   268  		if err != nil {
   269  			return nil, err
   270  		}
   271  	}
   272  	args["includeDeprecated"] = arg0
   273  	return args, nil
   274  }
   275  
   276  func (ec *executionContext) field___Type_fields_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
   277  	var err error
   278  	args := map[string]interface{}{}
   279  	var arg0 bool
   280  	if tmp, ok := rawArgs["includeDeprecated"]; ok {
   281  		ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("includeDeprecated"))
   282  		arg0, err = ec.unmarshalOBoolean2bool(ctx, tmp)
   283  		if err != nil {
   284  			return nil, err
   285  		}
   286  	}
   287  	args["includeDeprecated"] = arg0
   288  	return args, nil
   289  }
   290  
   291  // endregion ***************************** args.gotpl *****************************
   292  
   293  // region    ************************** directives.gotpl **************************
   294  
   295  // endregion ************************** directives.gotpl **************************
   296  
   297  // region    **************************** field.gotpl *****************************
   298  
   299  func (ec *executionContext) _EvaluateOutput_value(ctx context.Context, field graphql.CollectedField, obj *EvaluateOutput) (ret graphql.Marshaler) {
   300  	defer func() {
   301  		if r := recover(); r != nil {
   302  			ec.Error(ctx, ec.Recover(ctx, r))
   303  			ret = graphql.Null
   304  		}
   305  	}()
   306  	fc := &graphql.FieldContext{
   307  		Object:     "EvaluateOutput",
   308  		Field:      field,
   309  		Args:       nil,
   310  		IsMethod:   false,
   311  		IsResolver: false,
   312  	}
   313  
   314  	ctx = graphql.WithFieldContext(ctx, fc)
   315  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
   316  		ctx = rctx // use context from middleware stack in children
   317  		return obj.Value, nil
   318  	})
   319  	if err != nil {
   320  		ec.Error(ctx, err)
   321  		return graphql.Null
   322  	}
   323  	if resTmp == nil {
   324  		if !graphql.HasFieldError(ctx, fc) {
   325  			ec.Errorf(ctx, "must not be null")
   326  		}
   327  		return graphql.Null
   328  	}
   329  	res := resTmp.(int)
   330  	fc.Result = res
   331  	return ec.marshalNInt2int(ctx, field.Selections, res)
   332  }
   333  
   334  func (ec *executionContext) _EvaluateOutput_nodes(ctx context.Context, field graphql.CollectedField, obj *EvaluateOutput) (ret graphql.Marshaler) {
   335  	defer func() {
   336  		if r := recover(); r != nil {
   337  			ec.Error(ctx, ec.Recover(ctx, r))
   338  			ret = graphql.Null
   339  		}
   340  	}()
   341  	fc := &graphql.FieldContext{
   342  		Object:     "EvaluateOutput",
   343  		Field:      field,
   344  		Args:       nil,
   345  		IsMethod:   false,
   346  		IsResolver: false,
   347  	}
   348  
   349  	ctx = graphql.WithFieldContext(ctx, fc)
   350  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
   351  		ctx = rctx // use context from middleware stack in children
   352  		return obj.Nodes, nil
   353  	})
   354  	if err != nil {
   355  		ec.Error(ctx, err)
   356  		return graphql.Null
   357  	}
   358  	if resTmp == nil {
   359  		if !graphql.HasFieldError(ctx, fc) {
   360  			ec.Errorf(ctx, "must not be null")
   361  		}
   362  		return graphql.Null
   363  	}
   364  	res := resTmp.(int)
   365  	fc.Result = res
   366  	return ec.marshalNInt2int(ctx, field.Selections, res)
   367  }
   368  
   369  func (ec *executionContext) _EvaluateOutput_depth(ctx context.Context, field graphql.CollectedField, obj *EvaluateOutput) (ret graphql.Marshaler) {
   370  	defer func() {
   371  		if r := recover(); r != nil {
   372  			ec.Error(ctx, ec.Recover(ctx, r))
   373  			ret = graphql.Null
   374  		}
   375  	}()
   376  	fc := &graphql.FieldContext{
   377  		Object:     "EvaluateOutput",
   378  		Field:      field,
   379  		Args:       nil,
   380  		IsMethod:   false,
   381  		IsResolver: false,
   382  	}
   383  
   384  	ctx = graphql.WithFieldContext(ctx, fc)
   385  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
   386  		ctx = rctx // use context from middleware stack in children
   387  		return obj.Depth, nil
   388  	})
   389  	if err != nil {
   390  		ec.Error(ctx, err)
   391  		return graphql.Null
   392  	}
   393  	if resTmp == nil {
   394  		if !graphql.HasFieldError(ctx, fc) {
   395  			ec.Errorf(ctx, "must not be null")
   396  		}
   397  		return graphql.Null
   398  	}
   399  	res := resTmp.(int)
   400  	fc.Result = res
   401  	return ec.marshalNInt2int(ctx, field.Selections, res)
   402  }
   403  
   404  func (ec *executionContext) _EvaluateOutput_bestmove(ctx context.Context, field graphql.CollectedField, obj *EvaluateOutput) (ret graphql.Marshaler) {
   405  	defer func() {
   406  		if r := recover(); r != nil {
   407  			ec.Error(ctx, ec.Recover(ctx, r))
   408  			ret = graphql.Null
   409  		}
   410  	}()
   411  	fc := &graphql.FieldContext{
   412  		Object:     "EvaluateOutput",
   413  		Field:      field,
   414  		Args:       nil,
   415  		IsMethod:   false,
   416  		IsResolver: false,
   417  	}
   418  
   419  	ctx = graphql.WithFieldContext(ctx, fc)
   420  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
   421  		ctx = rctx // use context from middleware stack in children
   422  		return obj.Bestmove, nil
   423  	})
   424  	if err != nil {
   425  		ec.Error(ctx, err)
   426  		return graphql.Null
   427  	}
   428  	if resTmp == nil {
   429  		if !graphql.HasFieldError(ctx, fc) {
   430  			ec.Errorf(ctx, "must not be null")
   431  		}
   432  		return graphql.Null
   433  	}
   434  	res := resTmp.(string)
   435  	fc.Result = res
   436  	return ec.marshalNString2string(ctx, field.Selections, res)
   437  }
   438  
   439  func (ec *executionContext) _EvaluateOutput_pv(ctx context.Context, field graphql.CollectedField, obj *EvaluateOutput) (ret graphql.Marshaler) {
   440  	defer func() {
   441  		if r := recover(); r != nil {
   442  			ec.Error(ctx, ec.Recover(ctx, r))
   443  			ret = graphql.Null
   444  		}
   445  	}()
   446  	fc := &graphql.FieldContext{
   447  		Object:     "EvaluateOutput",
   448  		Field:      field,
   449  		Args:       nil,
   450  		IsMethod:   false,
   451  		IsResolver: false,
   452  	}
   453  
   454  	ctx = graphql.WithFieldContext(ctx, fc)
   455  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
   456  		ctx = rctx // use context from middleware stack in children
   457  		return obj.Pv, nil
   458  	})
   459  	if err != nil {
   460  		ec.Error(ctx, err)
   461  		return graphql.Null
   462  	}
   463  	if resTmp == nil {
   464  		if !graphql.HasFieldError(ctx, fc) {
   465  			ec.Errorf(ctx, "must not be null")
   466  		}
   467  		return graphql.Null
   468  	}
   469  	res := resTmp.([]string)
   470  	fc.Result = res
   471  	return ec.marshalNString2ᚕstringᚄ(ctx, field.Selections, res)
   472  }
   473  
   474  func (ec *executionContext) _Mutation_foo(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
   475  	defer func() {
   476  		if r := recover(); r != nil {
   477  			ec.Error(ctx, ec.Recover(ctx, r))
   478  			ret = graphql.Null
   479  		}
   480  	}()
   481  	fc := &graphql.FieldContext{
   482  		Object:     "Mutation",
   483  		Field:      field,
   484  		Args:       nil,
   485  		IsMethod:   true,
   486  		IsResolver: true,
   487  	}
   488  
   489  	ctx = graphql.WithFieldContext(ctx, fc)
   490  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
   491  		ctx = rctx // use context from middleware stack in children
   492  		return ec.resolvers.Mutation().Foo(rctx)
   493  	})
   494  	if err != nil {
   495  		ec.Error(ctx, err)
   496  		return graphql.Null
   497  	}
   498  	if resTmp == nil {
   499  		if !graphql.HasFieldError(ctx, fc) {
   500  			ec.Errorf(ctx, "must not be null")
   501  		}
   502  		return graphql.Null
   503  	}
   504  	res := resTmp.(bool)
   505  	fc.Result = res
   506  	return ec.marshalNBoolean2bool(ctx, field.Selections, res)
   507  }
   508  
   509  func (ec *executionContext) _Query_evaluate(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
   510  	defer func() {
   511  		if r := recover(); r != nil {
   512  			ec.Error(ctx, ec.Recover(ctx, r))
   513  			ret = graphql.Null
   514  		}
   515  	}()
   516  	fc := &graphql.FieldContext{
   517  		Object:     "Query",
   518  		Field:      field,
   519  		Args:       nil,
   520  		IsMethod:   true,
   521  		IsResolver: true,
   522  	}
   523  
   524  	ctx = graphql.WithFieldContext(ctx, fc)
   525  	rawArgs := field.ArgumentMap(ec.Variables)
   526  	args, err := ec.field_Query_evaluate_args(ctx, rawArgs)
   527  	if err != nil {
   528  		ec.Error(ctx, err)
   529  		return graphql.Null
   530  	}
   531  	fc.Args = args
   532  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
   533  		ctx = rctx // use context from middleware stack in children
   534  		return ec.resolvers.Query().Evaluate(rctx, args["input"].(EvaluateInput))
   535  	})
   536  	if err != nil {
   537  		ec.Error(ctx, err)
   538  		return graphql.Null
   539  	}
   540  	if resTmp == nil {
   541  		if !graphql.HasFieldError(ctx, fc) {
   542  			ec.Errorf(ctx, "must not be null")
   543  		}
   544  		return graphql.Null
   545  	}
   546  	res := resTmp.(*EvaluateOutput)
   547  	fc.Result = res
   548  	return ec.marshalNEvaluateOutput2ᚖgithubᚗcomᚋryicohᚋaperyᚑgraphqlᚋpkgᚐEvaluateOutput(ctx, field.Selections, res)
   549  }
   550  
   551  func (ec *executionContext) _Query___type(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
   552  	defer func() {
   553  		if r := recover(); r != nil {
   554  			ec.Error(ctx, ec.Recover(ctx, r))
   555  			ret = graphql.Null
   556  		}
   557  	}()
   558  	fc := &graphql.FieldContext{
   559  		Object:     "Query",
   560  		Field:      field,
   561  		Args:       nil,
   562  		IsMethod:   true,
   563  		IsResolver: false,
   564  	}
   565  
   566  	ctx = graphql.WithFieldContext(ctx, fc)
   567  	rawArgs := field.ArgumentMap(ec.Variables)
   568  	args, err := ec.field_Query___type_args(ctx, rawArgs)
   569  	if err != nil {
   570  		ec.Error(ctx, err)
   571  		return graphql.Null
   572  	}
   573  	fc.Args = args
   574  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
   575  		ctx = rctx // use context from middleware stack in children
   576  		return ec.introspectType(args["name"].(string))
   577  	})
   578  	if err != nil {
   579  		ec.Error(ctx, err)
   580  		return graphql.Null
   581  	}
   582  	if resTmp == nil {
   583  		return graphql.Null
   584  	}
   585  	res := resTmp.(*introspection.Type)
   586  	fc.Result = res
   587  	return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
   588  }
   589  
   590  func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
   591  	defer func() {
   592  		if r := recover(); r != nil {
   593  			ec.Error(ctx, ec.Recover(ctx, r))
   594  			ret = graphql.Null
   595  		}
   596  	}()
   597  	fc := &graphql.FieldContext{
   598  		Object:     "Query",
   599  		Field:      field,
   600  		Args:       nil,
   601  		IsMethod:   true,
   602  		IsResolver: false,
   603  	}
   604  
   605  	ctx = graphql.WithFieldContext(ctx, fc)
   606  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
   607  		ctx = rctx // use context from middleware stack in children
   608  		return ec.introspectSchema()
   609  	})
   610  	if err != nil {
   611  		ec.Error(ctx, err)
   612  		return graphql.Null
   613  	}
   614  	if resTmp == nil {
   615  		return graphql.Null
   616  	}
   617  	res := resTmp.(*introspection.Schema)
   618  	fc.Result = res
   619  	return ec.marshalO__Schema2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐSchema(ctx, field.Selections, res)
   620  }
   621  
   622  func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) {
   623  	defer func() {
   624  		if r := recover(); r != nil {
   625  			ec.Error(ctx, ec.Recover(ctx, r))
   626  			ret = graphql.Null
   627  		}
   628  	}()
   629  	fc := &graphql.FieldContext{
   630  		Object:     "__Directive",
   631  		Field:      field,
   632  		Args:       nil,
   633  		IsMethod:   false,
   634  		IsResolver: false,
   635  	}
   636  
   637  	ctx = graphql.WithFieldContext(ctx, fc)
   638  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
   639  		ctx = rctx // use context from middleware stack in children
   640  		return obj.Name, nil
   641  	})
   642  	if err != nil {
   643  		ec.Error(ctx, err)
   644  		return graphql.Null
   645  	}
   646  	if resTmp == nil {
   647  		if !graphql.HasFieldError(ctx, fc) {
   648  			ec.Errorf(ctx, "must not be null")
   649  		}
   650  		return graphql.Null
   651  	}
   652  	res := resTmp.(string)
   653  	fc.Result = res
   654  	return ec.marshalNString2string(ctx, field.Selections, res)
   655  }
   656  
   657  func (ec *executionContext) ___Directive_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) {
   658  	defer func() {
   659  		if r := recover(); r != nil {
   660  			ec.Error(ctx, ec.Recover(ctx, r))
   661  			ret = graphql.Null
   662  		}
   663  	}()
   664  	fc := &graphql.FieldContext{
   665  		Object:     "__Directive",
   666  		Field:      field,
   667  		Args:       nil,
   668  		IsMethod:   false,
   669  		IsResolver: false,
   670  	}
   671  
   672  	ctx = graphql.WithFieldContext(ctx, fc)
   673  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
   674  		ctx = rctx // use context from middleware stack in children
   675  		return obj.Description, nil
   676  	})
   677  	if err != nil {
   678  		ec.Error(ctx, err)
   679  		return graphql.Null
   680  	}
   681  	if resTmp == nil {
   682  		return graphql.Null
   683  	}
   684  	res := resTmp.(string)
   685  	fc.Result = res
   686  	return ec.marshalOString2string(ctx, field.Selections, res)
   687  }
   688  
   689  func (ec *executionContext) ___Directive_locations(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) {
   690  	defer func() {
   691  		if r := recover(); r != nil {
   692  			ec.Error(ctx, ec.Recover(ctx, r))
   693  			ret = graphql.Null
   694  		}
   695  	}()
   696  	fc := &graphql.FieldContext{
   697  		Object:     "__Directive",
   698  		Field:      field,
   699  		Args:       nil,
   700  		IsMethod:   false,
   701  		IsResolver: false,
   702  	}
   703  
   704  	ctx = graphql.WithFieldContext(ctx, fc)
   705  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
   706  		ctx = rctx // use context from middleware stack in children
   707  		return obj.Locations, nil
   708  	})
   709  	if err != nil {
   710  		ec.Error(ctx, err)
   711  		return graphql.Null
   712  	}
   713  	if resTmp == nil {
   714  		if !graphql.HasFieldError(ctx, fc) {
   715  			ec.Errorf(ctx, "must not be null")
   716  		}
   717  		return graphql.Null
   718  	}
   719  	res := resTmp.([]string)
   720  	fc.Result = res
   721  	return ec.marshalN__DirectiveLocation2ᚕstringᚄ(ctx, field.Selections, res)
   722  }
   723  
   724  func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) {
   725  	defer func() {
   726  		if r := recover(); r != nil {
   727  			ec.Error(ctx, ec.Recover(ctx, r))
   728  			ret = graphql.Null
   729  		}
   730  	}()
   731  	fc := &graphql.FieldContext{
   732  		Object:     "__Directive",
   733  		Field:      field,
   734  		Args:       nil,
   735  		IsMethod:   false,
   736  		IsResolver: false,
   737  	}
   738  
   739  	ctx = graphql.WithFieldContext(ctx, fc)
   740  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
   741  		ctx = rctx // use context from middleware stack in children
   742  		return obj.Args, nil
   743  	})
   744  	if err != nil {
   745  		ec.Error(ctx, err)
   746  		return graphql.Null
   747  	}
   748  	if resTmp == nil {
   749  		if !graphql.HasFieldError(ctx, fc) {
   750  			ec.Errorf(ctx, "must not be null")
   751  		}
   752  		return graphql.Null
   753  	}
   754  	res := resTmp.([]introspection.InputValue)
   755  	fc.Result = res
   756  	return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res)
   757  }
   758  
   759  func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) {
   760  	defer func() {
   761  		if r := recover(); r != nil {
   762  			ec.Error(ctx, ec.Recover(ctx, r))
   763  			ret = graphql.Null
   764  		}
   765  	}()
   766  	fc := &graphql.FieldContext{
   767  		Object:     "__EnumValue",
   768  		Field:      field,
   769  		Args:       nil,
   770  		IsMethod:   false,
   771  		IsResolver: false,
   772  	}
   773  
   774  	ctx = graphql.WithFieldContext(ctx, fc)
   775  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
   776  		ctx = rctx // use context from middleware stack in children
   777  		return obj.Name, nil
   778  	})
   779  	if err != nil {
   780  		ec.Error(ctx, err)
   781  		return graphql.Null
   782  	}
   783  	if resTmp == nil {
   784  		if !graphql.HasFieldError(ctx, fc) {
   785  			ec.Errorf(ctx, "must not be null")
   786  		}
   787  		return graphql.Null
   788  	}
   789  	res := resTmp.(string)
   790  	fc.Result = res
   791  	return ec.marshalNString2string(ctx, field.Selections, res)
   792  }
   793  
   794  func (ec *executionContext) ___EnumValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) {
   795  	defer func() {
   796  		if r := recover(); r != nil {
   797  			ec.Error(ctx, ec.Recover(ctx, r))
   798  			ret = graphql.Null
   799  		}
   800  	}()
   801  	fc := &graphql.FieldContext{
   802  		Object:     "__EnumValue",
   803  		Field:      field,
   804  		Args:       nil,
   805  		IsMethod:   false,
   806  		IsResolver: false,
   807  	}
   808  
   809  	ctx = graphql.WithFieldContext(ctx, fc)
   810  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
   811  		ctx = rctx // use context from middleware stack in children
   812  		return obj.Description, nil
   813  	})
   814  	if err != nil {
   815  		ec.Error(ctx, err)
   816  		return graphql.Null
   817  	}
   818  	if resTmp == nil {
   819  		return graphql.Null
   820  	}
   821  	res := resTmp.(string)
   822  	fc.Result = res
   823  	return ec.marshalOString2string(ctx, field.Selections, res)
   824  }
   825  
   826  func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) {
   827  	defer func() {
   828  		if r := recover(); r != nil {
   829  			ec.Error(ctx, ec.Recover(ctx, r))
   830  			ret = graphql.Null
   831  		}
   832  	}()
   833  	fc := &graphql.FieldContext{
   834  		Object:     "__EnumValue",
   835  		Field:      field,
   836  		Args:       nil,
   837  		IsMethod:   true,
   838  		IsResolver: false,
   839  	}
   840  
   841  	ctx = graphql.WithFieldContext(ctx, fc)
   842  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
   843  		ctx = rctx // use context from middleware stack in children
   844  		return obj.IsDeprecated(), nil
   845  	})
   846  	if err != nil {
   847  		ec.Error(ctx, err)
   848  		return graphql.Null
   849  	}
   850  	if resTmp == nil {
   851  		if !graphql.HasFieldError(ctx, fc) {
   852  			ec.Errorf(ctx, "must not be null")
   853  		}
   854  		return graphql.Null
   855  	}
   856  	res := resTmp.(bool)
   857  	fc.Result = res
   858  	return ec.marshalNBoolean2bool(ctx, field.Selections, res)
   859  }
   860  
   861  func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) {
   862  	defer func() {
   863  		if r := recover(); r != nil {
   864  			ec.Error(ctx, ec.Recover(ctx, r))
   865  			ret = graphql.Null
   866  		}
   867  	}()
   868  	fc := &graphql.FieldContext{
   869  		Object:     "__EnumValue",
   870  		Field:      field,
   871  		Args:       nil,
   872  		IsMethod:   true,
   873  		IsResolver: false,
   874  	}
   875  
   876  	ctx = graphql.WithFieldContext(ctx, fc)
   877  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
   878  		ctx = rctx // use context from middleware stack in children
   879  		return obj.DeprecationReason(), nil
   880  	})
   881  	if err != nil {
   882  		ec.Error(ctx, err)
   883  		return graphql.Null
   884  	}
   885  	if resTmp == nil {
   886  		return graphql.Null
   887  	}
   888  	res := resTmp.(*string)
   889  	fc.Result = res
   890  	return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
   891  }
   892  
   893  func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
   894  	defer func() {
   895  		if r := recover(); r != nil {
   896  			ec.Error(ctx, ec.Recover(ctx, r))
   897  			ret = graphql.Null
   898  		}
   899  	}()
   900  	fc := &graphql.FieldContext{
   901  		Object:     "__Field",
   902  		Field:      field,
   903  		Args:       nil,
   904  		IsMethod:   false,
   905  		IsResolver: false,
   906  	}
   907  
   908  	ctx = graphql.WithFieldContext(ctx, fc)
   909  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
   910  		ctx = rctx // use context from middleware stack in children
   911  		return obj.Name, nil
   912  	})
   913  	if err != nil {
   914  		ec.Error(ctx, err)
   915  		return graphql.Null
   916  	}
   917  	if resTmp == nil {
   918  		if !graphql.HasFieldError(ctx, fc) {
   919  			ec.Errorf(ctx, "must not be null")
   920  		}
   921  		return graphql.Null
   922  	}
   923  	res := resTmp.(string)
   924  	fc.Result = res
   925  	return ec.marshalNString2string(ctx, field.Selections, res)
   926  }
   927  
   928  func (ec *executionContext) ___Field_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
   929  	defer func() {
   930  		if r := recover(); r != nil {
   931  			ec.Error(ctx, ec.Recover(ctx, r))
   932  			ret = graphql.Null
   933  		}
   934  	}()
   935  	fc := &graphql.FieldContext{
   936  		Object:     "__Field",
   937  		Field:      field,
   938  		Args:       nil,
   939  		IsMethod:   false,
   940  		IsResolver: false,
   941  	}
   942  
   943  	ctx = graphql.WithFieldContext(ctx, fc)
   944  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
   945  		ctx = rctx // use context from middleware stack in children
   946  		return obj.Description, nil
   947  	})
   948  	if err != nil {
   949  		ec.Error(ctx, err)
   950  		return graphql.Null
   951  	}
   952  	if resTmp == nil {
   953  		return graphql.Null
   954  	}
   955  	res := resTmp.(string)
   956  	fc.Result = res
   957  	return ec.marshalOString2string(ctx, field.Selections, res)
   958  }
   959  
   960  func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
   961  	defer func() {
   962  		if r := recover(); r != nil {
   963  			ec.Error(ctx, ec.Recover(ctx, r))
   964  			ret = graphql.Null
   965  		}
   966  	}()
   967  	fc := &graphql.FieldContext{
   968  		Object:     "__Field",
   969  		Field:      field,
   970  		Args:       nil,
   971  		IsMethod:   false,
   972  		IsResolver: false,
   973  	}
   974  
   975  	ctx = graphql.WithFieldContext(ctx, fc)
   976  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
   977  		ctx = rctx // use context from middleware stack in children
   978  		return obj.Args, nil
   979  	})
   980  	if err != nil {
   981  		ec.Error(ctx, err)
   982  		return graphql.Null
   983  	}
   984  	if resTmp == nil {
   985  		if !graphql.HasFieldError(ctx, fc) {
   986  			ec.Errorf(ctx, "must not be null")
   987  		}
   988  		return graphql.Null
   989  	}
   990  	res := resTmp.([]introspection.InputValue)
   991  	fc.Result = res
   992  	return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res)
   993  }
   994  
   995  func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
   996  	defer func() {
   997  		if r := recover(); r != nil {
   998  			ec.Error(ctx, ec.Recover(ctx, r))
   999  			ret = graphql.Null
  1000  		}
  1001  	}()
  1002  	fc := &graphql.FieldContext{
  1003  		Object:     "__Field",
  1004  		Field:      field,
  1005  		Args:       nil,
  1006  		IsMethod:   false,
  1007  		IsResolver: false,
  1008  	}
  1009  
  1010  	ctx = graphql.WithFieldContext(ctx, fc)
  1011  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
  1012  		ctx = rctx // use context from middleware stack in children
  1013  		return obj.Type, nil
  1014  	})
  1015  	if err != nil {
  1016  		ec.Error(ctx, err)
  1017  		return graphql.Null
  1018  	}
  1019  	if resTmp == nil {
  1020  		if !graphql.HasFieldError(ctx, fc) {
  1021  			ec.Errorf(ctx, "must not be null")
  1022  		}
  1023  		return graphql.Null
  1024  	}
  1025  	res := resTmp.(*introspection.Type)
  1026  	fc.Result = res
  1027  	return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
  1028  }
  1029  
  1030  func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
  1031  	defer func() {
  1032  		if r := recover(); r != nil {
  1033  			ec.Error(ctx, ec.Recover(ctx, r))
  1034  			ret = graphql.Null
  1035  		}
  1036  	}()
  1037  	fc := &graphql.FieldContext{
  1038  		Object:     "__Field",
  1039  		Field:      field,
  1040  		Args:       nil,
  1041  		IsMethod:   true,
  1042  		IsResolver: false,
  1043  	}
  1044  
  1045  	ctx = graphql.WithFieldContext(ctx, fc)
  1046  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
  1047  		ctx = rctx // use context from middleware stack in children
  1048  		return obj.IsDeprecated(), nil
  1049  	})
  1050  	if err != nil {
  1051  		ec.Error(ctx, err)
  1052  		return graphql.Null
  1053  	}
  1054  	if resTmp == nil {
  1055  		if !graphql.HasFieldError(ctx, fc) {
  1056  			ec.Errorf(ctx, "must not be null")
  1057  		}
  1058  		return graphql.Null
  1059  	}
  1060  	res := resTmp.(bool)
  1061  	fc.Result = res
  1062  	return ec.marshalNBoolean2bool(ctx, field.Selections, res)
  1063  }
  1064  
  1065  func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
  1066  	defer func() {
  1067  		if r := recover(); r != nil {
  1068  			ec.Error(ctx, ec.Recover(ctx, r))
  1069  			ret = graphql.Null
  1070  		}
  1071  	}()
  1072  	fc := &graphql.FieldContext{
  1073  		Object:     "__Field",
  1074  		Field:      field,
  1075  		Args:       nil,
  1076  		IsMethod:   true,
  1077  		IsResolver: false,
  1078  	}
  1079  
  1080  	ctx = graphql.WithFieldContext(ctx, fc)
  1081  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
  1082  		ctx = rctx // use context from middleware stack in children
  1083  		return obj.DeprecationReason(), nil
  1084  	})
  1085  	if err != nil {
  1086  		ec.Error(ctx, err)
  1087  		return graphql.Null
  1088  	}
  1089  	if resTmp == nil {
  1090  		return graphql.Null
  1091  	}
  1092  	res := resTmp.(*string)
  1093  	fc.Result = res
  1094  	return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
  1095  }
  1096  
  1097  func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) {
  1098  	defer func() {
  1099  		if r := recover(); r != nil {
  1100  			ec.Error(ctx, ec.Recover(ctx, r))
  1101  			ret = graphql.Null
  1102  		}
  1103  	}()
  1104  	fc := &graphql.FieldContext{
  1105  		Object:     "__InputValue",
  1106  		Field:      field,
  1107  		Args:       nil,
  1108  		IsMethod:   false,
  1109  		IsResolver: false,
  1110  	}
  1111  
  1112  	ctx = graphql.WithFieldContext(ctx, fc)
  1113  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
  1114  		ctx = rctx // use context from middleware stack in children
  1115  		return obj.Name, nil
  1116  	})
  1117  	if err != nil {
  1118  		ec.Error(ctx, err)
  1119  		return graphql.Null
  1120  	}
  1121  	if resTmp == nil {
  1122  		if !graphql.HasFieldError(ctx, fc) {
  1123  			ec.Errorf(ctx, "must not be null")
  1124  		}
  1125  		return graphql.Null
  1126  	}
  1127  	res := resTmp.(string)
  1128  	fc.Result = res
  1129  	return ec.marshalNString2string(ctx, field.Selections, res)
  1130  }
  1131  
  1132  func (ec *executionContext) ___InputValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) {
  1133  	defer func() {
  1134  		if r := recover(); r != nil {
  1135  			ec.Error(ctx, ec.Recover(ctx, r))
  1136  			ret = graphql.Null
  1137  		}
  1138  	}()
  1139  	fc := &graphql.FieldContext{
  1140  		Object:     "__InputValue",
  1141  		Field:      field,
  1142  		Args:       nil,
  1143  		IsMethod:   false,
  1144  		IsResolver: false,
  1145  	}
  1146  
  1147  	ctx = graphql.WithFieldContext(ctx, fc)
  1148  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
  1149  		ctx = rctx // use context from middleware stack in children
  1150  		return obj.Description, nil
  1151  	})
  1152  	if err != nil {
  1153  		ec.Error(ctx, err)
  1154  		return graphql.Null
  1155  	}
  1156  	if resTmp == nil {
  1157  		return graphql.Null
  1158  	}
  1159  	res := resTmp.(string)
  1160  	fc.Result = res
  1161  	return ec.marshalOString2string(ctx, field.Selections, res)
  1162  }
  1163  
  1164  func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) {
  1165  	defer func() {
  1166  		if r := recover(); r != nil {
  1167  			ec.Error(ctx, ec.Recover(ctx, r))
  1168  			ret = graphql.Null
  1169  		}
  1170  	}()
  1171  	fc := &graphql.FieldContext{
  1172  		Object:     "__InputValue",
  1173  		Field:      field,
  1174  		Args:       nil,
  1175  		IsMethod:   false,
  1176  		IsResolver: false,
  1177  	}
  1178  
  1179  	ctx = graphql.WithFieldContext(ctx, fc)
  1180  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
  1181  		ctx = rctx // use context from middleware stack in children
  1182  		return obj.Type, nil
  1183  	})
  1184  	if err != nil {
  1185  		ec.Error(ctx, err)
  1186  		return graphql.Null
  1187  	}
  1188  	if resTmp == nil {
  1189  		if !graphql.HasFieldError(ctx, fc) {
  1190  			ec.Errorf(ctx, "must not be null")
  1191  		}
  1192  		return graphql.Null
  1193  	}
  1194  	res := resTmp.(*introspection.Type)
  1195  	fc.Result = res
  1196  	return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
  1197  }
  1198  
  1199  func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) {
  1200  	defer func() {
  1201  		if r := recover(); r != nil {
  1202  			ec.Error(ctx, ec.Recover(ctx, r))
  1203  			ret = graphql.Null
  1204  		}
  1205  	}()
  1206  	fc := &graphql.FieldContext{
  1207  		Object:     "__InputValue",
  1208  		Field:      field,
  1209  		Args:       nil,
  1210  		IsMethod:   false,
  1211  		IsResolver: false,
  1212  	}
  1213  
  1214  	ctx = graphql.WithFieldContext(ctx, fc)
  1215  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
  1216  		ctx = rctx // use context from middleware stack in children
  1217  		return obj.DefaultValue, nil
  1218  	})
  1219  	if err != nil {
  1220  		ec.Error(ctx, err)
  1221  		return graphql.Null
  1222  	}
  1223  	if resTmp == nil {
  1224  		return graphql.Null
  1225  	}
  1226  	res := resTmp.(*string)
  1227  	fc.Result = res
  1228  	return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
  1229  }
  1230  
  1231  func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
  1232  	defer func() {
  1233  		if r := recover(); r != nil {
  1234  			ec.Error(ctx, ec.Recover(ctx, r))
  1235  			ret = graphql.Null
  1236  		}
  1237  	}()
  1238  	fc := &graphql.FieldContext{
  1239  		Object:     "__Schema",
  1240  		Field:      field,
  1241  		Args:       nil,
  1242  		IsMethod:   true,
  1243  		IsResolver: false,
  1244  	}
  1245  
  1246  	ctx = graphql.WithFieldContext(ctx, fc)
  1247  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
  1248  		ctx = rctx // use context from middleware stack in children
  1249  		return obj.Types(), nil
  1250  	})
  1251  	if err != nil {
  1252  		ec.Error(ctx, err)
  1253  		return graphql.Null
  1254  	}
  1255  	if resTmp == nil {
  1256  		if !graphql.HasFieldError(ctx, fc) {
  1257  			ec.Errorf(ctx, "must not be null")
  1258  		}
  1259  		return graphql.Null
  1260  	}
  1261  	res := resTmp.([]introspection.Type)
  1262  	fc.Result = res
  1263  	return ec.marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res)
  1264  }
  1265  
  1266  func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
  1267  	defer func() {
  1268  		if r := recover(); r != nil {
  1269  			ec.Error(ctx, ec.Recover(ctx, r))
  1270  			ret = graphql.Null
  1271  		}
  1272  	}()
  1273  	fc := &graphql.FieldContext{
  1274  		Object:     "__Schema",
  1275  		Field:      field,
  1276  		Args:       nil,
  1277  		IsMethod:   true,
  1278  		IsResolver: false,
  1279  	}
  1280  
  1281  	ctx = graphql.WithFieldContext(ctx, fc)
  1282  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
  1283  		ctx = rctx // use context from middleware stack in children
  1284  		return obj.QueryType(), nil
  1285  	})
  1286  	if err != nil {
  1287  		ec.Error(ctx, err)
  1288  		return graphql.Null
  1289  	}
  1290  	if resTmp == nil {
  1291  		if !graphql.HasFieldError(ctx, fc) {
  1292  			ec.Errorf(ctx, "must not be null")
  1293  		}
  1294  		return graphql.Null
  1295  	}
  1296  	res := resTmp.(*introspection.Type)
  1297  	fc.Result = res
  1298  	return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
  1299  }
  1300  
  1301  func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
  1302  	defer func() {
  1303  		if r := recover(); r != nil {
  1304  			ec.Error(ctx, ec.Recover(ctx, r))
  1305  			ret = graphql.Null
  1306  		}
  1307  	}()
  1308  	fc := &graphql.FieldContext{
  1309  		Object:     "__Schema",
  1310  		Field:      field,
  1311  		Args:       nil,
  1312  		IsMethod:   true,
  1313  		IsResolver: false,
  1314  	}
  1315  
  1316  	ctx = graphql.WithFieldContext(ctx, fc)
  1317  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
  1318  		ctx = rctx // use context from middleware stack in children
  1319  		return obj.MutationType(), nil
  1320  	})
  1321  	if err != nil {
  1322  		ec.Error(ctx, err)
  1323  		return graphql.Null
  1324  	}
  1325  	if resTmp == nil {
  1326  		return graphql.Null
  1327  	}
  1328  	res := resTmp.(*introspection.Type)
  1329  	fc.Result = res
  1330  	return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
  1331  }
  1332  
  1333  func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
  1334  	defer func() {
  1335  		if r := recover(); r != nil {
  1336  			ec.Error(ctx, ec.Recover(ctx, r))
  1337  			ret = graphql.Null
  1338  		}
  1339  	}()
  1340  	fc := &graphql.FieldContext{
  1341  		Object:     "__Schema",
  1342  		Field:      field,
  1343  		Args:       nil,
  1344  		IsMethod:   true,
  1345  		IsResolver: false,
  1346  	}
  1347  
  1348  	ctx = graphql.WithFieldContext(ctx, fc)
  1349  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
  1350  		ctx = rctx // use context from middleware stack in children
  1351  		return obj.SubscriptionType(), nil
  1352  	})
  1353  	if err != nil {
  1354  		ec.Error(ctx, err)
  1355  		return graphql.Null
  1356  	}
  1357  	if resTmp == nil {
  1358  		return graphql.Null
  1359  	}
  1360  	res := resTmp.(*introspection.Type)
  1361  	fc.Result = res
  1362  	return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
  1363  }
  1364  
  1365  func (ec *executionContext) ___Schema_directives(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
  1366  	defer func() {
  1367  		if r := recover(); r != nil {
  1368  			ec.Error(ctx, ec.Recover(ctx, r))
  1369  			ret = graphql.Null
  1370  		}
  1371  	}()
  1372  	fc := &graphql.FieldContext{
  1373  		Object:     "__Schema",
  1374  		Field:      field,
  1375  		Args:       nil,
  1376  		IsMethod:   true,
  1377  		IsResolver: false,
  1378  	}
  1379  
  1380  	ctx = graphql.WithFieldContext(ctx, fc)
  1381  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
  1382  		ctx = rctx // use context from middleware stack in children
  1383  		return obj.Directives(), nil
  1384  	})
  1385  	if err != nil {
  1386  		ec.Error(ctx, err)
  1387  		return graphql.Null
  1388  	}
  1389  	if resTmp == nil {
  1390  		if !graphql.HasFieldError(ctx, fc) {
  1391  			ec.Errorf(ctx, "must not be null")
  1392  		}
  1393  		return graphql.Null
  1394  	}
  1395  	res := resTmp.([]introspection.Directive)
  1396  	fc.Result = res
  1397  	return ec.marshalN__Directive2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirectiveᚄ(ctx, field.Selections, res)
  1398  }
  1399  
  1400  func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
  1401  	defer func() {
  1402  		if r := recover(); r != nil {
  1403  			ec.Error(ctx, ec.Recover(ctx, r))
  1404  			ret = graphql.Null
  1405  		}
  1406  	}()
  1407  	fc := &graphql.FieldContext{
  1408  		Object:     "__Type",
  1409  		Field:      field,
  1410  		Args:       nil,
  1411  		IsMethod:   true,
  1412  		IsResolver: false,
  1413  	}
  1414  
  1415  	ctx = graphql.WithFieldContext(ctx, fc)
  1416  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
  1417  		ctx = rctx // use context from middleware stack in children
  1418  		return obj.Kind(), nil
  1419  	})
  1420  	if err != nil {
  1421  		ec.Error(ctx, err)
  1422  		return graphql.Null
  1423  	}
  1424  	if resTmp == nil {
  1425  		if !graphql.HasFieldError(ctx, fc) {
  1426  			ec.Errorf(ctx, "must not be null")
  1427  		}
  1428  		return graphql.Null
  1429  	}
  1430  	res := resTmp.(string)
  1431  	fc.Result = res
  1432  	return ec.marshalN__TypeKind2string(ctx, field.Selections, res)
  1433  }
  1434  
  1435  func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
  1436  	defer func() {
  1437  		if r := recover(); r != nil {
  1438  			ec.Error(ctx, ec.Recover(ctx, r))
  1439  			ret = graphql.Null
  1440  		}
  1441  	}()
  1442  	fc := &graphql.FieldContext{
  1443  		Object:     "__Type",
  1444  		Field:      field,
  1445  		Args:       nil,
  1446  		IsMethod:   true,
  1447  		IsResolver: false,
  1448  	}
  1449  
  1450  	ctx = graphql.WithFieldContext(ctx, fc)
  1451  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
  1452  		ctx = rctx // use context from middleware stack in children
  1453  		return obj.Name(), nil
  1454  	})
  1455  	if err != nil {
  1456  		ec.Error(ctx, err)
  1457  		return graphql.Null
  1458  	}
  1459  	if resTmp == nil {
  1460  		return graphql.Null
  1461  	}
  1462  	res := resTmp.(*string)
  1463  	fc.Result = res
  1464  	return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
  1465  }
  1466  
  1467  func (ec *executionContext) ___Type_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
  1468  	defer func() {
  1469  		if r := recover(); r != nil {
  1470  			ec.Error(ctx, ec.Recover(ctx, r))
  1471  			ret = graphql.Null
  1472  		}
  1473  	}()
  1474  	fc := &graphql.FieldContext{
  1475  		Object:     "__Type",
  1476  		Field:      field,
  1477  		Args:       nil,
  1478  		IsMethod:   true,
  1479  		IsResolver: false,
  1480  	}
  1481  
  1482  	ctx = graphql.WithFieldContext(ctx, fc)
  1483  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
  1484  		ctx = rctx // use context from middleware stack in children
  1485  		return obj.Description(), nil
  1486  	})
  1487  	if err != nil {
  1488  		ec.Error(ctx, err)
  1489  		return graphql.Null
  1490  	}
  1491  	if resTmp == nil {
  1492  		return graphql.Null
  1493  	}
  1494  	res := resTmp.(string)
  1495  	fc.Result = res
  1496  	return ec.marshalOString2string(ctx, field.Selections, res)
  1497  }
  1498  
  1499  func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
  1500  	defer func() {
  1501  		if r := recover(); r != nil {
  1502  			ec.Error(ctx, ec.Recover(ctx, r))
  1503  			ret = graphql.Null
  1504  		}
  1505  	}()
  1506  	fc := &graphql.FieldContext{
  1507  		Object:     "__Type",
  1508  		Field:      field,
  1509  		Args:       nil,
  1510  		IsMethod:   true,
  1511  		IsResolver: false,
  1512  	}
  1513  
  1514  	ctx = graphql.WithFieldContext(ctx, fc)
  1515  	rawArgs := field.ArgumentMap(ec.Variables)
  1516  	args, err := ec.field___Type_fields_args(ctx, rawArgs)
  1517  	if err != nil {
  1518  		ec.Error(ctx, err)
  1519  		return graphql.Null
  1520  	}
  1521  	fc.Args = args
  1522  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
  1523  		ctx = rctx // use context from middleware stack in children
  1524  		return obj.Fields(args["includeDeprecated"].(bool)), nil
  1525  	})
  1526  	if err != nil {
  1527  		ec.Error(ctx, err)
  1528  		return graphql.Null
  1529  	}
  1530  	if resTmp == nil {
  1531  		return graphql.Null
  1532  	}
  1533  	res := resTmp.([]introspection.Field)
  1534  	fc.Result = res
  1535  	return ec.marshalO__Field2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐFieldᚄ(ctx, field.Selections, res)
  1536  }
  1537  
  1538  func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
  1539  	defer func() {
  1540  		if r := recover(); r != nil {
  1541  			ec.Error(ctx, ec.Recover(ctx, r))
  1542  			ret = graphql.Null
  1543  		}
  1544  	}()
  1545  	fc := &graphql.FieldContext{
  1546  		Object:     "__Type",
  1547  		Field:      field,
  1548  		Args:       nil,
  1549  		IsMethod:   true,
  1550  		IsResolver: false,
  1551  	}
  1552  
  1553  	ctx = graphql.WithFieldContext(ctx, fc)
  1554  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
  1555  		ctx = rctx // use context from middleware stack in children
  1556  		return obj.Interfaces(), nil
  1557  	})
  1558  	if err != nil {
  1559  		ec.Error(ctx, err)
  1560  		return graphql.Null
  1561  	}
  1562  	if resTmp == nil {
  1563  		return graphql.Null
  1564  	}
  1565  	res := resTmp.([]introspection.Type)
  1566  	fc.Result = res
  1567  	return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res)
  1568  }
  1569  
  1570  func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
  1571  	defer func() {
  1572  		if r := recover(); r != nil {
  1573  			ec.Error(ctx, ec.Recover(ctx, r))
  1574  			ret = graphql.Null
  1575  		}
  1576  	}()
  1577  	fc := &graphql.FieldContext{
  1578  		Object:     "__Type",
  1579  		Field:      field,
  1580  		Args:       nil,
  1581  		IsMethod:   true,
  1582  		IsResolver: false,
  1583  	}
  1584  
  1585  	ctx = graphql.WithFieldContext(ctx, fc)
  1586  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
  1587  		ctx = rctx // use context from middleware stack in children
  1588  		return obj.PossibleTypes(), nil
  1589  	})
  1590  	if err != nil {
  1591  		ec.Error(ctx, err)
  1592  		return graphql.Null
  1593  	}
  1594  	if resTmp == nil {
  1595  		return graphql.Null
  1596  	}
  1597  	res := resTmp.([]introspection.Type)
  1598  	fc.Result = res
  1599  	return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res)
  1600  }
  1601  
  1602  func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
  1603  	defer func() {
  1604  		if r := recover(); r != nil {
  1605  			ec.Error(ctx, ec.Recover(ctx, r))
  1606  			ret = graphql.Null
  1607  		}
  1608  	}()
  1609  	fc := &graphql.FieldContext{
  1610  		Object:     "__Type",
  1611  		Field:      field,
  1612  		Args:       nil,
  1613  		IsMethod:   true,
  1614  		IsResolver: false,
  1615  	}
  1616  
  1617  	ctx = graphql.WithFieldContext(ctx, fc)
  1618  	rawArgs := field.ArgumentMap(ec.Variables)
  1619  	args, err := ec.field___Type_enumValues_args(ctx, rawArgs)
  1620  	if err != nil {
  1621  		ec.Error(ctx, err)
  1622  		return graphql.Null
  1623  	}
  1624  	fc.Args = args
  1625  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
  1626  		ctx = rctx // use context from middleware stack in children
  1627  		return obj.EnumValues(args["includeDeprecated"].(bool)), nil
  1628  	})
  1629  	if err != nil {
  1630  		ec.Error(ctx, err)
  1631  		return graphql.Null
  1632  	}
  1633  	if resTmp == nil {
  1634  		return graphql.Null
  1635  	}
  1636  	res := resTmp.([]introspection.EnumValue)
  1637  	fc.Result = res
  1638  	return ec.marshalO__EnumValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValueᚄ(ctx, field.Selections, res)
  1639  }
  1640  
  1641  func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
  1642  	defer func() {
  1643  		if r := recover(); r != nil {
  1644  			ec.Error(ctx, ec.Recover(ctx, r))
  1645  			ret = graphql.Null
  1646  		}
  1647  	}()
  1648  	fc := &graphql.FieldContext{
  1649  		Object:     "__Type",
  1650  		Field:      field,
  1651  		Args:       nil,
  1652  		IsMethod:   true,
  1653  		IsResolver: false,
  1654  	}
  1655  
  1656  	ctx = graphql.WithFieldContext(ctx, fc)
  1657  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
  1658  		ctx = rctx // use context from middleware stack in children
  1659  		return obj.InputFields(), nil
  1660  	})
  1661  	if err != nil {
  1662  		ec.Error(ctx, err)
  1663  		return graphql.Null
  1664  	}
  1665  	if resTmp == nil {
  1666  		return graphql.Null
  1667  	}
  1668  	res := resTmp.([]introspection.InputValue)
  1669  	fc.Result = res
  1670  	return ec.marshalO__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res)
  1671  }
  1672  
  1673  func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
  1674  	defer func() {
  1675  		if r := recover(); r != nil {
  1676  			ec.Error(ctx, ec.Recover(ctx, r))
  1677  			ret = graphql.Null
  1678  		}
  1679  	}()
  1680  	fc := &graphql.FieldContext{
  1681  		Object:     "__Type",
  1682  		Field:      field,
  1683  		Args:       nil,
  1684  		IsMethod:   true,
  1685  		IsResolver: false,
  1686  	}
  1687  
  1688  	ctx = graphql.WithFieldContext(ctx, fc)
  1689  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
  1690  		ctx = rctx // use context from middleware stack in children
  1691  		return obj.OfType(), nil
  1692  	})
  1693  	if err != nil {
  1694  		ec.Error(ctx, err)
  1695  		return graphql.Null
  1696  	}
  1697  	if resTmp == nil {
  1698  		return graphql.Null
  1699  	}
  1700  	res := resTmp.(*introspection.Type)
  1701  	fc.Result = res
  1702  	return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
  1703  }
  1704  
  1705  // endregion **************************** field.gotpl *****************************
  1706  
  1707  // region    **************************** input.gotpl *****************************
  1708  
  1709  func (ec *executionContext) unmarshalInputEvaluateInput(ctx context.Context, obj interface{}) (EvaluateInput, error) {
  1710  	var it EvaluateInput
  1711  	var asMap = obj.(map[string]interface{})
  1712  
  1713  	for k, v := range asMap {
  1714  		switch k {
  1715  		case "sfen":
  1716  			var err error
  1717  
  1718  			ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("sfen"))
  1719  			it.Sfen, err = ec.unmarshalNString2string(ctx, v)
  1720  			if err != nil {
  1721  				return it, err
  1722  			}
  1723  		case "moves":
  1724  			var err error
  1725  
  1726  			ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("moves"))
  1727  			it.Moves, err = ec.unmarshalNString2ᚕstringᚄ(ctx, v)
  1728  			if err != nil {
  1729  				return it, err
  1730  			}
  1731  		case "timeoutSecond":
  1732  			var err error
  1733  
  1734  			ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("timeoutSecond"))
  1735  			it.TimeoutSecond, err = ec.unmarshalNInt2int(ctx, v)
  1736  			if err != nil {
  1737  				return it, err
  1738  			}
  1739  		}
  1740  	}
  1741  
  1742  	return it, nil
  1743  }
  1744  
  1745  // endregion **************************** input.gotpl *****************************
  1746  
  1747  // region    ************************** interface.gotpl ***************************
  1748  
  1749  // endregion ************************** interface.gotpl ***************************
  1750  
  1751  // region    **************************** object.gotpl ****************************
  1752  
  1753  var evaluateOutputImplementors = []string{"EvaluateOutput"}
  1754  
  1755  func (ec *executionContext) _EvaluateOutput(ctx context.Context, sel ast.SelectionSet, obj *EvaluateOutput) graphql.Marshaler {
  1756  	fields := graphql.CollectFields(ec.OperationContext, sel, evaluateOutputImplementors)
  1757  
  1758  	out := graphql.NewFieldSet(fields)
  1759  	var invalids uint32
  1760  	for i, field := range fields {
  1761  		switch field.Name {
  1762  		case "__typename":
  1763  			out.Values[i] = graphql.MarshalString("EvaluateOutput")
  1764  		case "value":
  1765  			out.Values[i] = ec._EvaluateOutput_value(ctx, field, obj)
  1766  			if out.Values[i] == graphql.Null {
  1767  				invalids++
  1768  			}
  1769  		case "nodes":
  1770  			out.Values[i] = ec._EvaluateOutput_nodes(ctx, field, obj)
  1771  			if out.Values[i] == graphql.Null {
  1772  				invalids++
  1773  			}
  1774  		case "depth":
  1775  			out.Values[i] = ec._EvaluateOutput_depth(ctx, field, obj)
  1776  			if out.Values[i] == graphql.Null {
  1777  				invalids++
  1778  			}
  1779  		case "bestmove":
  1780  			out.Values[i] = ec._EvaluateOutput_bestmove(ctx, field, obj)
  1781  			if out.Values[i] == graphql.Null {
  1782  				invalids++
  1783  			}
  1784  		case "pv":
  1785  			out.Values[i] = ec._EvaluateOutput_pv(ctx, field, obj)
  1786  			if out.Values[i] == graphql.Null {
  1787  				invalids++
  1788  			}
  1789  		default:
  1790  			panic("unknown field " + strconv.Quote(field.Name))
  1791  		}
  1792  	}
  1793  	out.Dispatch()
  1794  	if invalids > 0 {
  1795  		return graphql.Null
  1796  	}
  1797  	return out
  1798  }
  1799  
  1800  var mutationImplementors = []string{"Mutation"}
  1801  
  1802  func (ec *executionContext) _Mutation(ctx context.Context, sel ast.SelectionSet) graphql.Marshaler {
  1803  	fields := graphql.CollectFields(ec.OperationContext, sel, mutationImplementors)
  1804  
  1805  	ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{
  1806  		Object: "Mutation",
  1807  	})
  1808  
  1809  	out := graphql.NewFieldSet(fields)
  1810  	var invalids uint32
  1811  	for i, field := range fields {
  1812  		switch field.Name {
  1813  		case "__typename":
  1814  			out.Values[i] = graphql.MarshalString("Mutation")
  1815  		case "foo":
  1816  			out.Values[i] = ec._Mutation_foo(ctx, field)
  1817  			if out.Values[i] == graphql.Null {
  1818  				invalids++
  1819  			}
  1820  		default:
  1821  			panic("unknown field " + strconv.Quote(field.Name))
  1822  		}
  1823  	}
  1824  	out.Dispatch()
  1825  	if invalids > 0 {
  1826  		return graphql.Null
  1827  	}
  1828  	return out
  1829  }
  1830  
  1831  var queryImplementors = []string{"Query"}
  1832  
  1833  func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) graphql.Marshaler {
  1834  	fields := graphql.CollectFields(ec.OperationContext, sel, queryImplementors)
  1835  
  1836  	ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{
  1837  		Object: "Query",
  1838  	})
  1839  
  1840  	out := graphql.NewFieldSet(fields)
  1841  	var invalids uint32
  1842  	for i, field := range fields {
  1843  		switch field.Name {
  1844  		case "__typename":
  1845  			out.Values[i] = graphql.MarshalString("Query")
  1846  		case "evaluate":
  1847  			field := field
  1848  			out.Concurrently(i, func() (res graphql.Marshaler) {
  1849  				defer func() {
  1850  					if r := recover(); r != nil {
  1851  						ec.Error(ctx, ec.Recover(ctx, r))
  1852  					}
  1853  				}()
  1854  				res = ec._Query_evaluate(ctx, field)
  1855  				if res == graphql.Null {
  1856  					atomic.AddUint32(&invalids, 1)
  1857  				}
  1858  				return res
  1859  			})
  1860  		case "__type":
  1861  			out.Values[i] = ec._Query___type(ctx, field)
  1862  		case "__schema":
  1863  			out.Values[i] = ec._Query___schema(ctx, field)
  1864  		default:
  1865  			panic("unknown field " + strconv.Quote(field.Name))
  1866  		}
  1867  	}
  1868  	out.Dispatch()
  1869  	if invalids > 0 {
  1870  		return graphql.Null
  1871  	}
  1872  	return out
  1873  }
  1874  
  1875  var __DirectiveImplementors = []string{"__Directive"}
  1876  
  1877  func (ec *executionContext) ___Directive(ctx context.Context, sel ast.SelectionSet, obj *introspection.Directive) graphql.Marshaler {
  1878  	fields := graphql.CollectFields(ec.OperationContext, sel, __DirectiveImplementors)
  1879  
  1880  	out := graphql.NewFieldSet(fields)
  1881  	var invalids uint32
  1882  	for i, field := range fields {
  1883  		switch field.Name {
  1884  		case "__typename":
  1885  			out.Values[i] = graphql.MarshalString("__Directive")
  1886  		case "name":
  1887  			out.Values[i] = ec.___Directive_name(ctx, field, obj)
  1888  			if out.Values[i] == graphql.Null {
  1889  				invalids++
  1890  			}
  1891  		case "description":
  1892  			out.Values[i] = ec.___Directive_description(ctx, field, obj)
  1893  		case "locations":
  1894  			out.Values[i] = ec.___Directive_locations(ctx, field, obj)
  1895  			if out.Values[i] == graphql.Null {
  1896  				invalids++
  1897  			}
  1898  		case "args":
  1899  			out.Values[i] = ec.___Directive_args(ctx, field, obj)
  1900  			if out.Values[i] == graphql.Null {
  1901  				invalids++
  1902  			}
  1903  		default:
  1904  			panic("unknown field " + strconv.Quote(field.Name))
  1905  		}
  1906  	}
  1907  	out.Dispatch()
  1908  	if invalids > 0 {
  1909  		return graphql.Null
  1910  	}
  1911  	return out
  1912  }
  1913  
  1914  var __EnumValueImplementors = []string{"__EnumValue"}
  1915  
  1916  func (ec *executionContext) ___EnumValue(ctx context.Context, sel ast.SelectionSet, obj *introspection.EnumValue) graphql.Marshaler {
  1917  	fields := graphql.CollectFields(ec.OperationContext, sel, __EnumValueImplementors)
  1918  
  1919  	out := graphql.NewFieldSet(fields)
  1920  	var invalids uint32
  1921  	for i, field := range fields {
  1922  		switch field.Name {
  1923  		case "__typename":
  1924  			out.Values[i] = graphql.MarshalString("__EnumValue")
  1925  		case "name":
  1926  			out.Values[i] = ec.___EnumValue_name(ctx, field, obj)
  1927  			if out.Values[i] == graphql.Null {
  1928  				invalids++
  1929  			}
  1930  		case "description":
  1931  			out.Values[i] = ec.___EnumValue_description(ctx, field, obj)
  1932  		case "isDeprecated":
  1933  			out.Values[i] = ec.___EnumValue_isDeprecated(ctx, field, obj)
  1934  			if out.Values[i] == graphql.Null {
  1935  				invalids++
  1936  			}
  1937  		case "deprecationReason":
  1938  			out.Values[i] = ec.___EnumValue_deprecationReason(ctx, field, obj)
  1939  		default:
  1940  			panic("unknown field " + strconv.Quote(field.Name))
  1941  		}
  1942  	}
  1943  	out.Dispatch()
  1944  	if invalids > 0 {
  1945  		return graphql.Null
  1946  	}
  1947  	return out
  1948  }
  1949  
  1950  var __FieldImplementors = []string{"__Field"}
  1951  
  1952  func (ec *executionContext) ___Field(ctx context.Context, sel ast.SelectionSet, obj *introspection.Field) graphql.Marshaler {
  1953  	fields := graphql.CollectFields(ec.OperationContext, sel, __FieldImplementors)
  1954  
  1955  	out := graphql.NewFieldSet(fields)
  1956  	var invalids uint32
  1957  	for i, field := range fields {
  1958  		switch field.Name {
  1959  		case "__typename":
  1960  			out.Values[i] = graphql.MarshalString("__Field")
  1961  		case "name":
  1962  			out.Values[i] = ec.___Field_name(ctx, field, obj)
  1963  			if out.Values[i] == graphql.Null {
  1964  				invalids++
  1965  			}
  1966  		case "description":
  1967  			out.Values[i] = ec.___Field_description(ctx, field, obj)
  1968  		case "args":
  1969  			out.Values[i] = ec.___Field_args(ctx, field, obj)
  1970  			if out.Values[i] == graphql.Null {
  1971  				invalids++
  1972  			}
  1973  		case "type":
  1974  			out.Values[i] = ec.___Field_type(ctx, field, obj)
  1975  			if out.Values[i] == graphql.Null {
  1976  				invalids++
  1977  			}
  1978  		case "isDeprecated":
  1979  			out.Values[i] = ec.___Field_isDeprecated(ctx, field, obj)
  1980  			if out.Values[i] == graphql.Null {
  1981  				invalids++
  1982  			}
  1983  		case "deprecationReason":
  1984  			out.Values[i] = ec.___Field_deprecationReason(ctx, field, obj)
  1985  		default:
  1986  			panic("unknown field " + strconv.Quote(field.Name))
  1987  		}
  1988  	}
  1989  	out.Dispatch()
  1990  	if invalids > 0 {
  1991  		return graphql.Null
  1992  	}
  1993  	return out
  1994  }
  1995  
  1996  var __InputValueImplementors = []string{"__InputValue"}
  1997  
  1998  func (ec *executionContext) ___InputValue(ctx context.Context, sel ast.SelectionSet, obj *introspection.InputValue) graphql.Marshaler {
  1999  	fields := graphql.CollectFields(ec.OperationContext, sel, __InputValueImplementors)
  2000  
  2001  	out := graphql.NewFieldSet(fields)
  2002  	var invalids uint32
  2003  	for i, field := range fields {
  2004  		switch field.Name {
  2005  		case "__typename":
  2006  			out.Values[i] = graphql.MarshalString("__InputValue")
  2007  		case "name":
  2008  			out.Values[i] = ec.___InputValue_name(ctx, field, obj)
  2009  			if out.Values[i] == graphql.Null {
  2010  				invalids++
  2011  			}
  2012  		case "description":
  2013  			out.Values[i] = ec.___InputValue_description(ctx, field, obj)
  2014  		case "type":
  2015  			out.Values[i] = ec.___InputValue_type(ctx, field, obj)
  2016  			if out.Values[i] == graphql.Null {
  2017  				invalids++
  2018  			}
  2019  		case "defaultValue":
  2020  			out.Values[i] = ec.___InputValue_defaultValue(ctx, field, obj)
  2021  		default:
  2022  			panic("unknown field " + strconv.Quote(field.Name))
  2023  		}
  2024  	}
  2025  	out.Dispatch()
  2026  	if invalids > 0 {
  2027  		return graphql.Null
  2028  	}
  2029  	return out
  2030  }
  2031  
  2032  var __SchemaImplementors = []string{"__Schema"}
  2033  
  2034  func (ec *executionContext) ___Schema(ctx context.Context, sel ast.SelectionSet, obj *introspection.Schema) graphql.Marshaler {
  2035  	fields := graphql.CollectFields(ec.OperationContext, sel, __SchemaImplementors)
  2036  
  2037  	out := graphql.NewFieldSet(fields)
  2038  	var invalids uint32
  2039  	for i, field := range fields {
  2040  		switch field.Name {
  2041  		case "__typename":
  2042  			out.Values[i] = graphql.MarshalString("__Schema")
  2043  		case "types":
  2044  			out.Values[i] = ec.___Schema_types(ctx, field, obj)
  2045  			if out.Values[i] == graphql.Null {
  2046  				invalids++
  2047  			}
  2048  		case "queryType":
  2049  			out.Values[i] = ec.___Schema_queryType(ctx, field, obj)
  2050  			if out.Values[i] == graphql.Null {
  2051  				invalids++
  2052  			}
  2053  		case "mutationType":
  2054  			out.Values[i] = ec.___Schema_mutationType(ctx, field, obj)
  2055  		case "subscriptionType":
  2056  			out.Values[i] = ec.___Schema_subscriptionType(ctx, field, obj)
  2057  		case "directives":
  2058  			out.Values[i] = ec.___Schema_directives(ctx, field, obj)
  2059  			if out.Values[i] == graphql.Null {
  2060  				invalids++
  2061  			}
  2062  		default:
  2063  			panic("unknown field " + strconv.Quote(field.Name))
  2064  		}
  2065  	}
  2066  	out.Dispatch()
  2067  	if invalids > 0 {
  2068  		return graphql.Null
  2069  	}
  2070  	return out
  2071  }
  2072  
  2073  var __TypeImplementors = []string{"__Type"}
  2074  
  2075  func (ec *executionContext) ___Type(ctx context.Context, sel ast.SelectionSet, obj *introspection.Type) graphql.Marshaler {
  2076  	fields := graphql.CollectFields(ec.OperationContext, sel, __TypeImplementors)
  2077  
  2078  	out := graphql.NewFieldSet(fields)
  2079  	var invalids uint32
  2080  	for i, field := range fields {
  2081  		switch field.Name {
  2082  		case "__typename":
  2083  			out.Values[i] = graphql.MarshalString("__Type")
  2084  		case "kind":
  2085  			out.Values[i] = ec.___Type_kind(ctx, field, obj)
  2086  			if out.Values[i] == graphql.Null {
  2087  				invalids++
  2088  			}
  2089  		case "name":
  2090  			out.Values[i] = ec.___Type_name(ctx, field, obj)
  2091  		case "description":
  2092  			out.Values[i] = ec.___Type_description(ctx, field, obj)
  2093  		case "fields":
  2094  			out.Values[i] = ec.___Type_fields(ctx, field, obj)
  2095  		case "interfaces":
  2096  			out.Values[i] = ec.___Type_interfaces(ctx, field, obj)
  2097  		case "possibleTypes":
  2098  			out.Values[i] = ec.___Type_possibleTypes(ctx, field, obj)
  2099  		case "enumValues":
  2100  			out.Values[i] = ec.___Type_enumValues(ctx, field, obj)
  2101  		case "inputFields":
  2102  			out.Values[i] = ec.___Type_inputFields(ctx, field, obj)
  2103  		case "ofType":
  2104  			out.Values[i] = ec.___Type_ofType(ctx, field, obj)
  2105  		default:
  2106  			panic("unknown field " + strconv.Quote(field.Name))
  2107  		}
  2108  	}
  2109  	out.Dispatch()
  2110  	if invalids > 0 {
  2111  		return graphql.Null
  2112  	}
  2113  	return out
  2114  }
  2115  
  2116  // endregion **************************** object.gotpl ****************************
  2117  
  2118  // region    ***************************** type.gotpl *****************************
  2119  
  2120  func (ec *executionContext) unmarshalNBoolean2bool(ctx context.Context, v interface{}) (bool, error) {
  2121  	res, err := graphql.UnmarshalBoolean(v)
  2122  	return res, graphql.ErrorOnPath(ctx, err)
  2123  }
  2124  
  2125  func (ec *executionContext) marshalNBoolean2bool(ctx context.Context, sel ast.SelectionSet, v bool) graphql.Marshaler {
  2126  	res := graphql.MarshalBoolean(v)
  2127  	if res == graphql.Null {
  2128  		if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
  2129  			ec.Errorf(ctx, "must not be null")
  2130  		}
  2131  	}
  2132  	return res
  2133  }
  2134  
  2135  func (ec *executionContext) unmarshalNEvaluateInput2githubᚗcomᚋryicohᚋaperyᚑgraphqlᚋpkgᚐEvaluateInput(ctx context.Context, v interface{}) (EvaluateInput, error) {
  2136  	res, err := ec.unmarshalInputEvaluateInput(ctx, v)
  2137  	return res, graphql.ErrorOnPath(ctx, err)
  2138  }
  2139  
  2140  func (ec *executionContext) marshalNEvaluateOutput2githubᚗcomᚋryicohᚋaperyᚑgraphqlᚋpkgᚐEvaluateOutput(ctx context.Context, sel ast.SelectionSet, v EvaluateOutput) graphql.Marshaler {
  2141  	return ec._EvaluateOutput(ctx, sel, &v)
  2142  }
  2143  
  2144  func (ec *executionContext) marshalNEvaluateOutput2ᚖgithubᚗcomᚋryicohᚋaperyᚑgraphqlᚋpkgᚐEvaluateOutput(ctx context.Context, sel ast.SelectionSet, v *EvaluateOutput) graphql.Marshaler {
  2145  	if v == nil {
  2146  		if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
  2147  			ec.Errorf(ctx, "must not be null")
  2148  		}
  2149  		return graphql.Null
  2150  	}
  2151  	return ec._EvaluateOutput(ctx, sel, v)
  2152  }
  2153  
  2154  func (ec *executionContext) unmarshalNInt2int(ctx context.Context, v interface{}) (int, error) {
  2155  	res, err := graphql.UnmarshalInt(v)
  2156  	return res, graphql.ErrorOnPath(ctx, err)
  2157  }
  2158  
  2159  func (ec *executionContext) marshalNInt2int(ctx context.Context, sel ast.SelectionSet, v int) graphql.Marshaler {
  2160  	res := graphql.MarshalInt(v)
  2161  	if res == graphql.Null {
  2162  		if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
  2163  			ec.Errorf(ctx, "must not be null")
  2164  		}
  2165  	}
  2166  	return res
  2167  }
  2168  
  2169  func (ec *executionContext) unmarshalNString2string(ctx context.Context, v interface{}) (string, error) {
  2170  	res, err := graphql.UnmarshalString(v)
  2171  	return res, graphql.ErrorOnPath(ctx, err)
  2172  }
  2173  
  2174  func (ec *executionContext) marshalNString2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler {
  2175  	res := graphql.MarshalString(v)
  2176  	if res == graphql.Null {
  2177  		if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
  2178  			ec.Errorf(ctx, "must not be null")
  2179  		}
  2180  	}
  2181  	return res
  2182  }
  2183  
  2184  func (ec *executionContext) unmarshalNString2ᚕstringᚄ(ctx context.Context, v interface{}) ([]string, error) {
  2185  	var vSlice []interface{}
  2186  	if v != nil {
  2187  		if tmp1, ok := v.([]interface{}); ok {
  2188  			vSlice = tmp1
  2189  		} else {
  2190  			vSlice = []interface{}{v}
  2191  		}
  2192  	}
  2193  	var err error
  2194  	res := make([]string, len(vSlice))
  2195  	for i := range vSlice {
  2196  		ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i))
  2197  		res[i], err = ec.unmarshalNString2string(ctx, vSlice[i])
  2198  		if err != nil {
  2199  			return nil, err
  2200  		}
  2201  	}
  2202  	return res, nil
  2203  }
  2204  
  2205  func (ec *executionContext) marshalNString2ᚕstringᚄ(ctx context.Context, sel ast.SelectionSet, v []string) graphql.Marshaler {
  2206  	ret := make(graphql.Array, len(v))
  2207  	for i := range v {
  2208  		ret[i] = ec.marshalNString2string(ctx, sel, v[i])
  2209  	}
  2210  
  2211  	return ret
  2212  }
  2213  
  2214  func (ec *executionContext) marshalN__Directive2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirective(ctx context.Context, sel ast.SelectionSet, v introspection.Directive) graphql.Marshaler {
  2215  	return ec.___Directive(ctx, sel, &v)
  2216  }
  2217  
  2218  func (ec *executionContext) marshalN__Directive2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirectiveᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Directive) graphql.Marshaler {
  2219  	ret := make(graphql.Array, len(v))
  2220  	var wg sync.WaitGroup
  2221  	isLen1 := len(v) == 1
  2222  	if !isLen1 {
  2223  		wg.Add(len(v))
  2224  	}
  2225  	for i := range v {
  2226  		i := i
  2227  		fc := &graphql.FieldContext{
  2228  			Index:  &i,
  2229  			Result: &v[i],
  2230  		}
  2231  		ctx := graphql.WithFieldContext(ctx, fc)
  2232  		f := func(i int) {
  2233  			defer func() {
  2234  				if r := recover(); r != nil {
  2235  					ec.Error(ctx, ec.Recover(ctx, r))
  2236  					ret = nil
  2237  				}
  2238  			}()
  2239  			if !isLen1 {
  2240  				defer wg.Done()
  2241  			}
  2242  			ret[i] = ec.marshalN__Directive2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirective(ctx, sel, v[i])
  2243  		}
  2244  		if isLen1 {
  2245  			f(i)
  2246  		} else {
  2247  			go f(i)
  2248  		}
  2249  
  2250  	}
  2251  	wg.Wait()
  2252  	return ret
  2253  }
  2254  
  2255  func (ec *executionContext) unmarshalN__DirectiveLocation2string(ctx context.Context, v interface{}) (string, error) {
  2256  	res, err := graphql.UnmarshalString(v)
  2257  	return res, graphql.ErrorOnPath(ctx, err)
  2258  }
  2259  
  2260  func (ec *executionContext) marshalN__DirectiveLocation2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler {
  2261  	res := graphql.MarshalString(v)
  2262  	if res == graphql.Null {
  2263  		if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
  2264  			ec.Errorf(ctx, "must not be null")
  2265  		}
  2266  	}
  2267  	return res
  2268  }
  2269  
  2270  func (ec *executionContext) unmarshalN__DirectiveLocation2ᚕstringᚄ(ctx context.Context, v interface{}) ([]string, error) {
  2271  	var vSlice []interface{}
  2272  	if v != nil {
  2273  		if tmp1, ok := v.([]interface{}); ok {
  2274  			vSlice = tmp1
  2275  		} else {
  2276  			vSlice = []interface{}{v}
  2277  		}
  2278  	}
  2279  	var err error
  2280  	res := make([]string, len(vSlice))
  2281  	for i := range vSlice {
  2282  		ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i))
  2283  		res[i], err = ec.unmarshalN__DirectiveLocation2string(ctx, vSlice[i])
  2284  		if err != nil {
  2285  			return nil, err
  2286  		}
  2287  	}
  2288  	return res, nil
  2289  }
  2290  
  2291  func (ec *executionContext) marshalN__DirectiveLocation2ᚕstringᚄ(ctx context.Context, sel ast.SelectionSet, v []string) graphql.Marshaler {
  2292  	ret := make(graphql.Array, len(v))
  2293  	var wg sync.WaitGroup
  2294  	isLen1 := len(v) == 1
  2295  	if !isLen1 {
  2296  		wg.Add(len(v))
  2297  	}
  2298  	for i := range v {
  2299  		i := i
  2300  		fc := &graphql.FieldContext{
  2301  			Index:  &i,
  2302  			Result: &v[i],
  2303  		}
  2304  		ctx := graphql.WithFieldContext(ctx, fc)
  2305  		f := func(i int) {
  2306  			defer func() {
  2307  				if r := recover(); r != nil {
  2308  					ec.Error(ctx, ec.Recover(ctx, r))
  2309  					ret = nil
  2310  				}
  2311  			}()
  2312  			if !isLen1 {
  2313  				defer wg.Done()
  2314  			}
  2315  			ret[i] = ec.marshalN__DirectiveLocation2string(ctx, sel, v[i])
  2316  		}
  2317  		if isLen1 {
  2318  			f(i)
  2319  		} else {
  2320  			go f(i)
  2321  		}
  2322  
  2323  	}
  2324  	wg.Wait()
  2325  	return ret
  2326  }
  2327  
  2328  func (ec *executionContext) marshalN__EnumValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValue(ctx context.Context, sel ast.SelectionSet, v introspection.EnumValue) graphql.Marshaler {
  2329  	return ec.___EnumValue(ctx, sel, &v)
  2330  }
  2331  
  2332  func (ec *executionContext) marshalN__Field2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐField(ctx context.Context, sel ast.SelectionSet, v introspection.Field) graphql.Marshaler {
  2333  	return ec.___Field(ctx, sel, &v)
  2334  }
  2335  
  2336  func (ec *executionContext) marshalN__InputValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx context.Context, sel ast.SelectionSet, v introspection.InputValue) graphql.Marshaler {
  2337  	return ec.___InputValue(ctx, sel, &v)
  2338  }
  2339  
  2340  func (ec *executionContext) marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.InputValue) graphql.Marshaler {
  2341  	ret := make(graphql.Array, len(v))
  2342  	var wg sync.WaitGroup
  2343  	isLen1 := len(v) == 1
  2344  	if !isLen1 {
  2345  		wg.Add(len(v))
  2346  	}
  2347  	for i := range v {
  2348  		i := i
  2349  		fc := &graphql.FieldContext{
  2350  			Index:  &i,
  2351  			Result: &v[i],
  2352  		}
  2353  		ctx := graphql.WithFieldContext(ctx, fc)
  2354  		f := func(i int) {
  2355  			defer func() {
  2356  				if r := recover(); r != nil {
  2357  					ec.Error(ctx, ec.Recover(ctx, r))
  2358  					ret = nil
  2359  				}
  2360  			}()
  2361  			if !isLen1 {
  2362  				defer wg.Done()
  2363  			}
  2364  			ret[i] = ec.marshalN__InputValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx, sel, v[i])
  2365  		}
  2366  		if isLen1 {
  2367  			f(i)
  2368  		} else {
  2369  			go f(i)
  2370  		}
  2371  
  2372  	}
  2373  	wg.Wait()
  2374  	return ret
  2375  }
  2376  
  2377  func (ec *executionContext) marshalN__Type2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v introspection.Type) graphql.Marshaler {
  2378  	return ec.___Type(ctx, sel, &v)
  2379  }
  2380  
  2381  func (ec *executionContext) marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Type) graphql.Marshaler {
  2382  	ret := make(graphql.Array, len(v))
  2383  	var wg sync.WaitGroup
  2384  	isLen1 := len(v) == 1
  2385  	if !isLen1 {
  2386  		wg.Add(len(v))
  2387  	}
  2388  	for i := range v {
  2389  		i := i
  2390  		fc := &graphql.FieldContext{
  2391  			Index:  &i,
  2392  			Result: &v[i],
  2393  		}
  2394  		ctx := graphql.WithFieldContext(ctx, fc)
  2395  		f := func(i int) {
  2396  			defer func() {
  2397  				if r := recover(); r != nil {
  2398  					ec.Error(ctx, ec.Recover(ctx, r))
  2399  					ret = nil
  2400  				}
  2401  			}()
  2402  			if !isLen1 {
  2403  				defer wg.Done()
  2404  			}
  2405  			ret[i] = ec.marshalN__Type2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, sel, v[i])
  2406  		}
  2407  		if isLen1 {
  2408  			f(i)
  2409  		} else {
  2410  			go f(i)
  2411  		}
  2412  
  2413  	}
  2414  	wg.Wait()
  2415  	return ret
  2416  }
  2417  
  2418  func (ec *executionContext) marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v *introspection.Type) graphql.Marshaler {
  2419  	if v == nil {
  2420  		if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
  2421  			ec.Errorf(ctx, "must not be null")
  2422  		}
  2423  		return graphql.Null
  2424  	}
  2425  	return ec.___Type(ctx, sel, v)
  2426  }
  2427  
  2428  func (ec *executionContext) unmarshalN__TypeKind2string(ctx context.Context, v interface{}) (string, error) {
  2429  	res, err := graphql.UnmarshalString(v)
  2430  	return res, graphql.ErrorOnPath(ctx, err)
  2431  }
  2432  
  2433  func (ec *executionContext) marshalN__TypeKind2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler {
  2434  	res := graphql.MarshalString(v)
  2435  	if res == graphql.Null {
  2436  		if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
  2437  			ec.Errorf(ctx, "must not be null")
  2438  		}
  2439  	}
  2440  	return res
  2441  }
  2442  
  2443  func (ec *executionContext) unmarshalOBoolean2bool(ctx context.Context, v interface{}) (bool, error) {
  2444  	res, err := graphql.UnmarshalBoolean(v)
  2445  	return res, graphql.ErrorOnPath(ctx, err)
  2446  }
  2447  
  2448  func (ec *executionContext) marshalOBoolean2bool(ctx context.Context, sel ast.SelectionSet, v bool) graphql.Marshaler {
  2449  	return graphql.MarshalBoolean(v)
  2450  }
  2451  
  2452  func (ec *executionContext) unmarshalOBoolean2ᚖbool(ctx context.Context, v interface{}) (*bool, error) {
  2453  	if v == nil {
  2454  		return nil, nil
  2455  	}
  2456  	res, err := graphql.UnmarshalBoolean(v)
  2457  	return &res, graphql.ErrorOnPath(ctx, err)
  2458  }
  2459  
  2460  func (ec *executionContext) marshalOBoolean2ᚖbool(ctx context.Context, sel ast.SelectionSet, v *bool) graphql.Marshaler {
  2461  	if v == nil {
  2462  		return graphql.Null
  2463  	}
  2464  	return graphql.MarshalBoolean(*v)
  2465  }
  2466  
  2467  func (ec *executionContext) unmarshalOString2string(ctx context.Context, v interface{}) (string, error) {
  2468  	res, err := graphql.UnmarshalString(v)
  2469  	return res, graphql.ErrorOnPath(ctx, err)
  2470  }
  2471  
  2472  func (ec *executionContext) marshalOString2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler {
  2473  	return graphql.MarshalString(v)
  2474  }
  2475  
  2476  func (ec *executionContext) unmarshalOString2ᚖstring(ctx context.Context, v interface{}) (*string, error) {
  2477  	if v == nil {
  2478  		return nil, nil
  2479  	}
  2480  	res, err := graphql.UnmarshalString(v)
  2481  	return &res, graphql.ErrorOnPath(ctx, err)
  2482  }
  2483  
  2484  func (ec *executionContext) marshalOString2ᚖstring(ctx context.Context, sel ast.SelectionSet, v *string) graphql.Marshaler {
  2485  	if v == nil {
  2486  		return graphql.Null
  2487  	}
  2488  	return graphql.MarshalString(*v)
  2489  }
  2490  
  2491  func (ec *executionContext) marshalO__EnumValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValueᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.EnumValue) graphql.Marshaler {
  2492  	if v == nil {
  2493  		return graphql.Null
  2494  	}
  2495  	ret := make(graphql.Array, len(v))
  2496  	var wg sync.WaitGroup
  2497  	isLen1 := len(v) == 1
  2498  	if !isLen1 {
  2499  		wg.Add(len(v))
  2500  	}
  2501  	for i := range v {
  2502  		i := i
  2503  		fc := &graphql.FieldContext{
  2504  			Index:  &i,
  2505  			Result: &v[i],
  2506  		}
  2507  		ctx := graphql.WithFieldContext(ctx, fc)
  2508  		f := func(i int) {
  2509  			defer func() {
  2510  				if r := recover(); r != nil {
  2511  					ec.Error(ctx, ec.Recover(ctx, r))
  2512  					ret = nil
  2513  				}
  2514  			}()
  2515  			if !isLen1 {
  2516  				defer wg.Done()
  2517  			}
  2518  			ret[i] = ec.marshalN__EnumValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValue(ctx, sel, v[i])
  2519  		}
  2520  		if isLen1 {
  2521  			f(i)
  2522  		} else {
  2523  			go f(i)
  2524  		}
  2525  
  2526  	}
  2527  	wg.Wait()
  2528  	return ret
  2529  }
  2530  
  2531  func (ec *executionContext) marshalO__Field2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐFieldᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Field) graphql.Marshaler {
  2532  	if v == nil {
  2533  		return graphql.Null
  2534  	}
  2535  	ret := make(graphql.Array, len(v))
  2536  	var wg sync.WaitGroup
  2537  	isLen1 := len(v) == 1
  2538  	if !isLen1 {
  2539  		wg.Add(len(v))
  2540  	}
  2541  	for i := range v {
  2542  		i := i
  2543  		fc := &graphql.FieldContext{
  2544  			Index:  &i,
  2545  			Result: &v[i],
  2546  		}
  2547  		ctx := graphql.WithFieldContext(ctx, fc)
  2548  		f := func(i int) {
  2549  			defer func() {
  2550  				if r := recover(); r != nil {
  2551  					ec.Error(ctx, ec.Recover(ctx, r))
  2552  					ret = nil
  2553  				}
  2554  			}()
  2555  			if !isLen1 {
  2556  				defer wg.Done()
  2557  			}
  2558  			ret[i] = ec.marshalN__Field2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐField(ctx, sel, v[i])
  2559  		}
  2560  		if isLen1 {
  2561  			f(i)
  2562  		} else {
  2563  			go f(i)
  2564  		}
  2565  
  2566  	}
  2567  	wg.Wait()
  2568  	return ret
  2569  }
  2570  
  2571  func (ec *executionContext) marshalO__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.InputValue) graphql.Marshaler {
  2572  	if v == nil {
  2573  		return graphql.Null
  2574  	}
  2575  	ret := make(graphql.Array, len(v))
  2576  	var wg sync.WaitGroup
  2577  	isLen1 := len(v) == 1
  2578  	if !isLen1 {
  2579  		wg.Add(len(v))
  2580  	}
  2581  	for i := range v {
  2582  		i := i
  2583  		fc := &graphql.FieldContext{
  2584  			Index:  &i,
  2585  			Result: &v[i],
  2586  		}
  2587  		ctx := graphql.WithFieldContext(ctx, fc)
  2588  		f := func(i int) {
  2589  			defer func() {
  2590  				if r := recover(); r != nil {
  2591  					ec.Error(ctx, ec.Recover(ctx, r))
  2592  					ret = nil
  2593  				}
  2594  			}()
  2595  			if !isLen1 {
  2596  				defer wg.Done()
  2597  			}
  2598  			ret[i] = ec.marshalN__InputValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx, sel, v[i])
  2599  		}
  2600  		if isLen1 {
  2601  			f(i)
  2602  		} else {
  2603  			go f(i)
  2604  		}
  2605  
  2606  	}
  2607  	wg.Wait()
  2608  	return ret
  2609  }
  2610  
  2611  func (ec *executionContext) marshalO__Schema2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐSchema(ctx context.Context, sel ast.SelectionSet, v *introspection.Schema) graphql.Marshaler {
  2612  	if v == nil {
  2613  		return graphql.Null
  2614  	}
  2615  	return ec.___Schema(ctx, sel, v)
  2616  }
  2617  
  2618  func (ec *executionContext) marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Type) graphql.Marshaler {
  2619  	if v == nil {
  2620  		return graphql.Null
  2621  	}
  2622  	ret := make(graphql.Array, len(v))
  2623  	var wg sync.WaitGroup
  2624  	isLen1 := len(v) == 1
  2625  	if !isLen1 {
  2626  		wg.Add(len(v))
  2627  	}
  2628  	for i := range v {
  2629  		i := i
  2630  		fc := &graphql.FieldContext{
  2631  			Index:  &i,
  2632  			Result: &v[i],
  2633  		}
  2634  		ctx := graphql.WithFieldContext(ctx, fc)
  2635  		f := func(i int) {
  2636  			defer func() {
  2637  				if r := recover(); r != nil {
  2638  					ec.Error(ctx, ec.Recover(ctx, r))
  2639  					ret = nil
  2640  				}
  2641  			}()
  2642  			if !isLen1 {
  2643  				defer wg.Done()
  2644  			}
  2645  			ret[i] = ec.marshalN__Type2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, sel, v[i])
  2646  		}
  2647  		if isLen1 {
  2648  			f(i)
  2649  		} else {
  2650  			go f(i)
  2651  		}
  2652  
  2653  	}
  2654  	wg.Wait()
  2655  	return ret
  2656  }
  2657  
  2658  func (ec *executionContext) marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v *introspection.Type) graphql.Marshaler {
  2659  	if v == nil {
  2660  		return graphql.Null
  2661  	}
  2662  	return ec.___Type(ctx, sel, v)
  2663  }
  2664  
  2665  // endregion ***************************** type.gotpl *****************************