github.com/maeglindeveloper/gqlgen@v0.13.1-0.20210413081235-57808b12a0a0/example/federation/accounts/graph/generated/generated.go (about)

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