git.sr.ht/~sircmpwn/gqlgen@v0.0.0-20200522192042-c84d29a1c940/example/type-system-extension/generated.go (about)

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