github.com/animeshon/gqlgen@v0.13.1-0.20210304133704-3a770431bb6d/example/config/generated.go (about)

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