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

     1  // Code generated by git.sr.ht/~sircmpwn/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  	"time"
    14  
    15  	"git.sr.ht/~sircmpwn/gqlgen/example/starwars/models"
    16  	"git.sr.ht/~sircmpwn/gqlgen/graphql"
    17  	"git.sr.ht/~sircmpwn/gqlgen/graphql/introspection"
    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  	Droid() DroidResolver
    41  	FriendsConnection() FriendsConnectionResolver
    42  	Human() HumanResolver
    43  	Mutation() MutationResolver
    44  	Query() QueryResolver
    45  	Starship() StarshipResolver
    46  }
    47  
    48  type DirectiveRoot struct {
    49  }
    50  
    51  type ComplexityRoot struct {
    52  	Droid struct {
    53  		AppearsIn         func(childComplexity int) int
    54  		Friends           func(childComplexity int) int
    55  		FriendsConnection func(childComplexity int, first *int, after *string) int
    56  		ID                func(childComplexity int) int
    57  		Name              func(childComplexity int) int
    58  		PrimaryFunction   func(childComplexity int) int
    59  	}
    60  
    61  	FriendsConnection struct {
    62  		Edges      func(childComplexity int) int
    63  		Friends    func(childComplexity int) int
    64  		PageInfo   func(childComplexity int) int
    65  		TotalCount func(childComplexity int) int
    66  	}
    67  
    68  	FriendsEdge struct {
    69  		Cursor func(childComplexity int) int
    70  		Node   func(childComplexity int) int
    71  	}
    72  
    73  	Human struct {
    74  		AppearsIn         func(childComplexity int) int
    75  		Friends           func(childComplexity int) int
    76  		FriendsConnection func(childComplexity int, first *int, after *string) int
    77  		Height            func(childComplexity int, unit models.LengthUnit) int
    78  		ID                func(childComplexity int) int
    79  		Mass              func(childComplexity int) int
    80  		Name              func(childComplexity int) int
    81  		Starships         func(childComplexity int) int
    82  	}
    83  
    84  	Mutation struct {
    85  		CreateReview func(childComplexity int, episode models.Episode, review models.Review) int
    86  	}
    87  
    88  	PageInfo struct {
    89  		EndCursor   func(childComplexity int) int
    90  		HasNextPage func(childComplexity int) int
    91  		StartCursor func(childComplexity int) int
    92  	}
    93  
    94  	Query struct {
    95  		Character func(childComplexity int, id string) int
    96  		Droid     func(childComplexity int, id string) int
    97  		Hero      func(childComplexity int, episode *models.Episode) int
    98  		Human     func(childComplexity int, id string) int
    99  		Reviews   func(childComplexity int, episode models.Episode, since *time.Time) int
   100  		Search    func(childComplexity int, text string) int
   101  		Starship  func(childComplexity int, id string) int
   102  	}
   103  
   104  	Review struct {
   105  		Commentary func(childComplexity int) int
   106  		Stars      func(childComplexity int) int
   107  		Time       func(childComplexity int) int
   108  	}
   109  
   110  	Starship struct {
   111  		History func(childComplexity int) int
   112  		ID      func(childComplexity int) int
   113  		Length  func(childComplexity int, unit *models.LengthUnit) int
   114  		Name    func(childComplexity int) int
   115  	}
   116  }
   117  
   118  type DroidResolver interface {
   119  	Friends(ctx context.Context, obj *models.Droid) ([]models.Character, error)
   120  	FriendsConnection(ctx context.Context, obj *models.Droid, first *int, after *string) (*models.FriendsConnection, error)
   121  }
   122  type FriendsConnectionResolver interface {
   123  	Edges(ctx context.Context, obj *models.FriendsConnection) ([]*models.FriendsEdge, error)
   124  	Friends(ctx context.Context, obj *models.FriendsConnection) ([]models.Character, error)
   125  }
   126  type HumanResolver interface {
   127  	Friends(ctx context.Context, obj *models.Human) ([]models.Character, error)
   128  	FriendsConnection(ctx context.Context, obj *models.Human, first *int, after *string) (*models.FriendsConnection, error)
   129  
   130  	Starships(ctx context.Context, obj *models.Human) ([]*models.Starship, error)
   131  }
   132  type MutationResolver interface {
   133  	CreateReview(ctx context.Context, episode models.Episode, review models.Review) (*models.Review, error)
   134  }
   135  type QueryResolver interface {
   136  	Hero(ctx context.Context, episode *models.Episode) (models.Character, error)
   137  	Reviews(ctx context.Context, episode models.Episode, since *time.Time) ([]*models.Review, error)
   138  	Search(ctx context.Context, text string) ([]models.SearchResult, error)
   139  	Character(ctx context.Context, id string) (models.Character, error)
   140  	Droid(ctx context.Context, id string) (*models.Droid, error)
   141  	Human(ctx context.Context, id string) (*models.Human, error)
   142  	Starship(ctx context.Context, id string) (*models.Starship, error)
   143  }
   144  type StarshipResolver interface {
   145  	Length(ctx context.Context, obj *models.Starship, unit *models.LengthUnit) (float64, error)
   146  }
   147  
   148  type executableSchema struct {
   149  	resolvers  ResolverRoot
   150  	directives DirectiveRoot
   151  	complexity ComplexityRoot
   152  }
   153  
   154  func (e *executableSchema) Schema() *ast.Schema {
   155  	return parsedSchema
   156  }
   157  
   158  func (e *executableSchema) Complexity(typeName, field string, childComplexity int, rawArgs map[string]interface{}) (int, bool) {
   159  	ec := executionContext{nil, e}
   160  	_ = ec
   161  	switch typeName + "." + field {
   162  
   163  	case "Droid.appearsIn":
   164  		if e.complexity.Droid.AppearsIn == nil {
   165  			break
   166  		}
   167  
   168  		return e.complexity.Droid.AppearsIn(childComplexity), true
   169  
   170  	case "Droid.friends":
   171  		if e.complexity.Droid.Friends == nil {
   172  			break
   173  		}
   174  
   175  		return e.complexity.Droid.Friends(childComplexity), true
   176  
   177  	case "Droid.friendsConnection":
   178  		if e.complexity.Droid.FriendsConnection == nil {
   179  			break
   180  		}
   181  
   182  		args, err := ec.field_Droid_friendsConnection_args(context.TODO(), rawArgs)
   183  		if err != nil {
   184  			return 0, false
   185  		}
   186  
   187  		return e.complexity.Droid.FriendsConnection(childComplexity, args["first"].(*int), args["after"].(*string)), true
   188  
   189  	case "Droid.id":
   190  		if e.complexity.Droid.ID == nil {
   191  			break
   192  		}
   193  
   194  		return e.complexity.Droid.ID(childComplexity), true
   195  
   196  	case "Droid.name":
   197  		if e.complexity.Droid.Name == nil {
   198  			break
   199  		}
   200  
   201  		return e.complexity.Droid.Name(childComplexity), true
   202  
   203  	case "Droid.primaryFunction":
   204  		if e.complexity.Droid.PrimaryFunction == nil {
   205  			break
   206  		}
   207  
   208  		return e.complexity.Droid.PrimaryFunction(childComplexity), true
   209  
   210  	case "FriendsConnection.edges":
   211  		if e.complexity.FriendsConnection.Edges == nil {
   212  			break
   213  		}
   214  
   215  		return e.complexity.FriendsConnection.Edges(childComplexity), true
   216  
   217  	case "FriendsConnection.friends":
   218  		if e.complexity.FriendsConnection.Friends == nil {
   219  			break
   220  		}
   221  
   222  		return e.complexity.FriendsConnection.Friends(childComplexity), true
   223  
   224  	case "FriendsConnection.pageInfo":
   225  		if e.complexity.FriendsConnection.PageInfo == nil {
   226  			break
   227  		}
   228  
   229  		return e.complexity.FriendsConnection.PageInfo(childComplexity), true
   230  
   231  	case "FriendsConnection.totalCount":
   232  		if e.complexity.FriendsConnection.TotalCount == nil {
   233  			break
   234  		}
   235  
   236  		return e.complexity.FriendsConnection.TotalCount(childComplexity), true
   237  
   238  	case "FriendsEdge.cursor":
   239  		if e.complexity.FriendsEdge.Cursor == nil {
   240  			break
   241  		}
   242  
   243  		return e.complexity.FriendsEdge.Cursor(childComplexity), true
   244  
   245  	case "FriendsEdge.node":
   246  		if e.complexity.FriendsEdge.Node == nil {
   247  			break
   248  		}
   249  
   250  		return e.complexity.FriendsEdge.Node(childComplexity), true
   251  
   252  	case "Human.appearsIn":
   253  		if e.complexity.Human.AppearsIn == nil {
   254  			break
   255  		}
   256  
   257  		return e.complexity.Human.AppearsIn(childComplexity), true
   258  
   259  	case "Human.friends":
   260  		if e.complexity.Human.Friends == nil {
   261  			break
   262  		}
   263  
   264  		return e.complexity.Human.Friends(childComplexity), true
   265  
   266  	case "Human.friendsConnection":
   267  		if e.complexity.Human.FriendsConnection == nil {
   268  			break
   269  		}
   270  
   271  		args, err := ec.field_Human_friendsConnection_args(context.TODO(), rawArgs)
   272  		if err != nil {
   273  			return 0, false
   274  		}
   275  
   276  		return e.complexity.Human.FriendsConnection(childComplexity, args["first"].(*int), args["after"].(*string)), true
   277  
   278  	case "Human.height":
   279  		if e.complexity.Human.Height == nil {
   280  			break
   281  		}
   282  
   283  		args, err := ec.field_Human_height_args(context.TODO(), rawArgs)
   284  		if err != nil {
   285  			return 0, false
   286  		}
   287  
   288  		return e.complexity.Human.Height(childComplexity, args["unit"].(models.LengthUnit)), true
   289  
   290  	case "Human.id":
   291  		if e.complexity.Human.ID == nil {
   292  			break
   293  		}
   294  
   295  		return e.complexity.Human.ID(childComplexity), true
   296  
   297  	case "Human.mass":
   298  		if e.complexity.Human.Mass == nil {
   299  			break
   300  		}
   301  
   302  		return e.complexity.Human.Mass(childComplexity), true
   303  
   304  	case "Human.name":
   305  		if e.complexity.Human.Name == nil {
   306  			break
   307  		}
   308  
   309  		return e.complexity.Human.Name(childComplexity), true
   310  
   311  	case "Human.starships":
   312  		if e.complexity.Human.Starships == nil {
   313  			break
   314  		}
   315  
   316  		return e.complexity.Human.Starships(childComplexity), true
   317  
   318  	case "Mutation.createReview":
   319  		if e.complexity.Mutation.CreateReview == nil {
   320  			break
   321  		}
   322  
   323  		args, err := ec.field_Mutation_createReview_args(context.TODO(), rawArgs)
   324  		if err != nil {
   325  			return 0, false
   326  		}
   327  
   328  		return e.complexity.Mutation.CreateReview(childComplexity, args["episode"].(models.Episode), args["review"].(models.Review)), true
   329  
   330  	case "PageInfo.endCursor":
   331  		if e.complexity.PageInfo.EndCursor == nil {
   332  			break
   333  		}
   334  
   335  		return e.complexity.PageInfo.EndCursor(childComplexity), true
   336  
   337  	case "PageInfo.hasNextPage":
   338  		if e.complexity.PageInfo.HasNextPage == nil {
   339  			break
   340  		}
   341  
   342  		return e.complexity.PageInfo.HasNextPage(childComplexity), true
   343  
   344  	case "PageInfo.startCursor":
   345  		if e.complexity.PageInfo.StartCursor == nil {
   346  			break
   347  		}
   348  
   349  		return e.complexity.PageInfo.StartCursor(childComplexity), true
   350  
   351  	case "Query.character":
   352  		if e.complexity.Query.Character == nil {
   353  			break
   354  		}
   355  
   356  		args, err := ec.field_Query_character_args(context.TODO(), rawArgs)
   357  		if err != nil {
   358  			return 0, false
   359  		}
   360  
   361  		return e.complexity.Query.Character(childComplexity, args["id"].(string)), true
   362  
   363  	case "Query.droid":
   364  		if e.complexity.Query.Droid == nil {
   365  			break
   366  		}
   367  
   368  		args, err := ec.field_Query_droid_args(context.TODO(), rawArgs)
   369  		if err != nil {
   370  			return 0, false
   371  		}
   372  
   373  		return e.complexity.Query.Droid(childComplexity, args["id"].(string)), true
   374  
   375  	case "Query.hero":
   376  		if e.complexity.Query.Hero == nil {
   377  			break
   378  		}
   379  
   380  		args, err := ec.field_Query_hero_args(context.TODO(), rawArgs)
   381  		if err != nil {
   382  			return 0, false
   383  		}
   384  
   385  		return e.complexity.Query.Hero(childComplexity, args["episode"].(*models.Episode)), true
   386  
   387  	case "Query.human":
   388  		if e.complexity.Query.Human == nil {
   389  			break
   390  		}
   391  
   392  		args, err := ec.field_Query_human_args(context.TODO(), rawArgs)
   393  		if err != nil {
   394  			return 0, false
   395  		}
   396  
   397  		return e.complexity.Query.Human(childComplexity, args["id"].(string)), true
   398  
   399  	case "Query.reviews":
   400  		if e.complexity.Query.Reviews == nil {
   401  			break
   402  		}
   403  
   404  		args, err := ec.field_Query_reviews_args(context.TODO(), rawArgs)
   405  		if err != nil {
   406  			return 0, false
   407  		}
   408  
   409  		return e.complexity.Query.Reviews(childComplexity, args["episode"].(models.Episode), args["since"].(*time.Time)), true
   410  
   411  	case "Query.search":
   412  		if e.complexity.Query.Search == nil {
   413  			break
   414  		}
   415  
   416  		args, err := ec.field_Query_search_args(context.TODO(), rawArgs)
   417  		if err != nil {
   418  			return 0, false
   419  		}
   420  
   421  		return e.complexity.Query.Search(childComplexity, args["text"].(string)), true
   422  
   423  	case "Query.starship":
   424  		if e.complexity.Query.Starship == nil {
   425  			break
   426  		}
   427  
   428  		args, err := ec.field_Query_starship_args(context.TODO(), rawArgs)
   429  		if err != nil {
   430  			return 0, false
   431  		}
   432  
   433  		return e.complexity.Query.Starship(childComplexity, args["id"].(string)), true
   434  
   435  	case "Review.commentary":
   436  		if e.complexity.Review.Commentary == nil {
   437  			break
   438  		}
   439  
   440  		return e.complexity.Review.Commentary(childComplexity), true
   441  
   442  	case "Review.stars":
   443  		if e.complexity.Review.Stars == nil {
   444  			break
   445  		}
   446  
   447  		return e.complexity.Review.Stars(childComplexity), true
   448  
   449  	case "Review.time":
   450  		if e.complexity.Review.Time == nil {
   451  			break
   452  		}
   453  
   454  		return e.complexity.Review.Time(childComplexity), true
   455  
   456  	case "Starship.history":
   457  		if e.complexity.Starship.History == nil {
   458  			break
   459  		}
   460  
   461  		return e.complexity.Starship.History(childComplexity), true
   462  
   463  	case "Starship.id":
   464  		if e.complexity.Starship.ID == nil {
   465  			break
   466  		}
   467  
   468  		return e.complexity.Starship.ID(childComplexity), true
   469  
   470  	case "Starship.length":
   471  		if e.complexity.Starship.Length == nil {
   472  			break
   473  		}
   474  
   475  		args, err := ec.field_Starship_length_args(context.TODO(), rawArgs)
   476  		if err != nil {
   477  			return 0, false
   478  		}
   479  
   480  		return e.complexity.Starship.Length(childComplexity, args["unit"].(*models.LengthUnit)), true
   481  
   482  	case "Starship.name":
   483  		if e.complexity.Starship.Name == nil {
   484  			break
   485  		}
   486  
   487  		return e.complexity.Starship.Name(childComplexity), true
   488  
   489  	}
   490  	return 0, false
   491  }
   492  
   493  func (e *executableSchema) Exec(ctx context.Context) graphql.ResponseHandler {
   494  	rc := graphql.GetOperationContext(ctx)
   495  	ec := executionContext{rc, e}
   496  	first := true
   497  
   498  	switch rc.Operation.Operation {
   499  	case ast.Query:
   500  		return func(ctx context.Context) *graphql.Response {
   501  			if !first {
   502  				return nil
   503  			}
   504  			first = false
   505  			data := ec._Query(ctx, rc.Operation.SelectionSet)
   506  			var buf bytes.Buffer
   507  			data.MarshalGQL(&buf)
   508  
   509  			return &graphql.Response{
   510  				Data: buf.Bytes(),
   511  			}
   512  		}
   513  	case ast.Mutation:
   514  		return func(ctx context.Context) *graphql.Response {
   515  			if !first {
   516  				return nil
   517  			}
   518  			first = false
   519  			data := ec._Mutation(ctx, rc.Operation.SelectionSet)
   520  			var buf bytes.Buffer
   521  			data.MarshalGQL(&buf)
   522  
   523  			return &graphql.Response{
   524  				Data: buf.Bytes(),
   525  			}
   526  		}
   527  
   528  	default:
   529  		return graphql.OneShot(graphql.ErrorResponse(ctx, "unsupported GraphQL operation"))
   530  	}
   531  }
   532  
   533  type executionContext struct {
   534  	*graphql.OperationContext
   535  	*executableSchema
   536  }
   537  
   538  func (ec *executionContext) introspectSchema() (*introspection.Schema, error) {
   539  	if ec.DisableIntrospection {
   540  		return nil, errors.New("introspection disabled")
   541  	}
   542  	return introspection.WrapSchema(parsedSchema), nil
   543  }
   544  
   545  func (ec *executionContext) introspectType(name string) (*introspection.Type, error) {
   546  	if ec.DisableIntrospection {
   547  		return nil, errors.New("introspection disabled")
   548  	}
   549  	return introspection.WrapTypeFromDef(parsedSchema, parsedSchema.Types[name]), nil
   550  }
   551  
   552  var sources = []*ast.Source{
   553  	&ast.Source{Name: "schema.graphql", Input: `# The query type, represents all of the entry points into our object graph
   554  type Query {
   555      hero(episode: Episode = NEWHOPE): Character
   556      reviews(episode: Episode!, since: Time): [Review!]!
   557      search(text: String!): [SearchResult!]!
   558      character(id: ID!): Character
   559      droid(id: ID!): Droid
   560      human(id: ID!): Human
   561      starship(id: ID!): Starship
   562  }
   563  # The mutation type, represents all updates we can make to our data
   564  type Mutation {
   565      createReview(episode: Episode!, review: ReviewInput!): Review
   566  }
   567  # The episodes in the Star Wars trilogy
   568  enum Episode {
   569      # Star Wars Episode IV: A New Hope, released in 1977.
   570      NEWHOPE
   571      # Star Wars Episode V: The Empire Strikes Back, released in 1980.
   572      EMPIRE
   573      # Star Wars Episode VI: Return of the Jedi, released in 1983.
   574      JEDI
   575  }
   576  # A character from the Star Wars universe
   577  interface Character {
   578      # The ID of the character
   579      id: ID!
   580      # The name of the character
   581      name: String!
   582      # The friends of the character, or an empty list if they have none
   583      friends: [Character!]
   584      # The friends of the character exposed as a connection with edges
   585      friendsConnection(first: Int, after: ID): FriendsConnection!
   586      # The movies this character appears in
   587      appearsIn: [Episode!]!
   588  }
   589  # Units of height
   590  enum LengthUnit {
   591      # The standard unit around the world
   592      METER
   593      # Primarily used in the United States
   594      FOOT
   595  }
   596  # A humanoid creature from the Star Wars universe
   597  type Human implements Character {
   598      # The ID of the human
   599      id: ID!
   600      # What this human calls themselves
   601      name: String!
   602      # Height in the preferred unit, default is meters
   603      height(unit: LengthUnit = METER): Float!
   604      # Mass in kilograms, or null if unknown
   605      mass: Float
   606      # This human's friends, or an empty list if they have none
   607      friends: [Character!]
   608      # The friends of the human exposed as a connection with edges
   609      friendsConnection(first: Int, after: ID): FriendsConnection!
   610      # The movies this human appears in
   611      appearsIn: [Episode!]!
   612      # A list of starships this person has piloted, or an empty list if none
   613      starships: [Starship!]
   614  }
   615  # An autonomous mechanical character in the Star Wars universe
   616  type Droid implements Character {
   617      # The ID of the droid
   618      id: ID!
   619      # What others call this droid
   620      name: String!
   621      # This droid's friends, or an empty list if they have none
   622      friends: [Character!]
   623      # The friends of the droid exposed as a connection with edges
   624      friendsConnection(first: Int, after: ID): FriendsConnection!
   625      # The movies this droid appears in
   626      appearsIn: [Episode!]!
   627      # This droid's primary function
   628      primaryFunction: String
   629  }
   630  # A connection object for a character's friends
   631  type FriendsConnection {
   632      # The total number of friends
   633      totalCount: Int!
   634      # The edges for each of the character's friends.
   635      edges: [FriendsEdge!]
   636      # A list of the friends, as a convenience when edges are not needed.
   637      friends: [Character!]
   638      # Information for paginating this connection
   639      pageInfo: PageInfo!
   640  }
   641  # An edge object for a character's friends
   642  type FriendsEdge {
   643      # A cursor used for pagination
   644      cursor: ID!
   645      # The character represented by this friendship edge
   646      node: Character
   647  }
   648  # Information for paginating this connection
   649  type PageInfo {
   650      startCursor: ID!
   651      endCursor: ID!
   652      hasNextPage: Boolean!
   653  }
   654  # Represents a review for a movie
   655  type Review {
   656      # The number of stars this review gave, 1-5
   657      stars: Int!
   658      # Comment about the movie
   659      commentary: String
   660      # when the review was posted
   661      time: Time
   662  }
   663  # The input object sent when someone is creating a new review
   664  input ReviewInput {
   665      # 0-5 stars
   666      stars: Int!
   667      # Comment about the movie, optional
   668      commentary: String
   669      # when the review was posted
   670      time: Time
   671  }
   672  type Starship {
   673      # The ID of the starship
   674      id: ID!
   675      # The name of the starship
   676      name: String!
   677      # Length of the starship, along the longest axis
   678      length(unit: LengthUnit = METER): Float!
   679      # coordinates tracking this ship
   680      history: [[Int!]!]!
   681  }
   682  union SearchResult = Human | Droid | Starship
   683  scalar Time
   684  `, BuiltIn: false},
   685  }
   686  var parsedSchema = gqlparser.MustLoadSchema(sources...)
   687  
   688  // endregion ************************** generated!.gotpl **************************
   689  
   690  // region    ***************************** args.gotpl *****************************
   691  
   692  func (ec *executionContext) field_Droid_friendsConnection_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
   693  	var err error
   694  	args := map[string]interface{}{}
   695  	var arg0 *int
   696  	if tmp, ok := rawArgs["first"]; ok {
   697  		arg0, err = ec.unmarshalOInt2ᚖint(ctx, tmp)
   698  		if err != nil {
   699  			return nil, err
   700  		}
   701  	}
   702  	args["first"] = arg0
   703  	var arg1 *string
   704  	if tmp, ok := rawArgs["after"]; ok {
   705  		arg1, err = ec.unmarshalOID2ᚖstring(ctx, tmp)
   706  		if err != nil {
   707  			return nil, err
   708  		}
   709  	}
   710  	args["after"] = arg1
   711  	return args, nil
   712  }
   713  
   714  func (ec *executionContext) field_Human_friendsConnection_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
   715  	var err error
   716  	args := map[string]interface{}{}
   717  	var arg0 *int
   718  	if tmp, ok := rawArgs["first"]; ok {
   719  		arg0, err = ec.unmarshalOInt2ᚖint(ctx, tmp)
   720  		if err != nil {
   721  			return nil, err
   722  		}
   723  	}
   724  	args["first"] = arg0
   725  	var arg1 *string
   726  	if tmp, ok := rawArgs["after"]; ok {
   727  		arg1, err = ec.unmarshalOID2ᚖstring(ctx, tmp)
   728  		if err != nil {
   729  			return nil, err
   730  		}
   731  	}
   732  	args["after"] = arg1
   733  	return args, nil
   734  }
   735  
   736  func (ec *executionContext) field_Human_height_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
   737  	var err error
   738  	args := map[string]interface{}{}
   739  	var arg0 models.LengthUnit
   740  	if tmp, ok := rawArgs["unit"]; ok {
   741  		arg0, err = ec.unmarshalOLengthUnit2githubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋstarwarsᚋmodelsᚐLengthUnit(ctx, tmp)
   742  		if err != nil {
   743  			return nil, err
   744  		}
   745  	}
   746  	args["unit"] = arg0
   747  	return args, nil
   748  }
   749  
   750  func (ec *executionContext) field_Mutation_createReview_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
   751  	var err error
   752  	args := map[string]interface{}{}
   753  	var arg0 models.Episode
   754  	if tmp, ok := rawArgs["episode"]; ok {
   755  		arg0, err = ec.unmarshalNEpisode2githubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋstarwarsᚋmodelsᚐEpisode(ctx, tmp)
   756  		if err != nil {
   757  			return nil, err
   758  		}
   759  	}
   760  	args["episode"] = arg0
   761  	var arg1 models.Review
   762  	if tmp, ok := rawArgs["review"]; ok {
   763  		arg1, err = ec.unmarshalNReviewInput2githubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋstarwarsᚋmodelsᚐReview(ctx, tmp)
   764  		if err != nil {
   765  			return nil, err
   766  		}
   767  	}
   768  	args["review"] = arg1
   769  	return args, nil
   770  }
   771  
   772  func (ec *executionContext) field_Query___type_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
   773  	var err error
   774  	args := map[string]interface{}{}
   775  	var arg0 string
   776  	if tmp, ok := rawArgs["name"]; ok {
   777  		arg0, err = ec.unmarshalNString2string(ctx, tmp)
   778  		if err != nil {
   779  			return nil, err
   780  		}
   781  	}
   782  	args["name"] = arg0
   783  	return args, nil
   784  }
   785  
   786  func (ec *executionContext) field_Query_character_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
   787  	var err error
   788  	args := map[string]interface{}{}
   789  	var arg0 string
   790  	if tmp, ok := rawArgs["id"]; ok {
   791  		arg0, err = ec.unmarshalNID2string(ctx, tmp)
   792  		if err != nil {
   793  			return nil, err
   794  		}
   795  	}
   796  	args["id"] = arg0
   797  	return args, nil
   798  }
   799  
   800  func (ec *executionContext) field_Query_droid_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
   801  	var err error
   802  	args := map[string]interface{}{}
   803  	var arg0 string
   804  	if tmp, ok := rawArgs["id"]; ok {
   805  		arg0, err = ec.unmarshalNID2string(ctx, tmp)
   806  		if err != nil {
   807  			return nil, err
   808  		}
   809  	}
   810  	args["id"] = arg0
   811  	return args, nil
   812  }
   813  
   814  func (ec *executionContext) field_Query_hero_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
   815  	var err error
   816  	args := map[string]interface{}{}
   817  	var arg0 *models.Episode
   818  	if tmp, ok := rawArgs["episode"]; ok {
   819  		arg0, err = ec.unmarshalOEpisode2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋstarwarsᚋmodelsᚐEpisode(ctx, tmp)
   820  		if err != nil {
   821  			return nil, err
   822  		}
   823  	}
   824  	args["episode"] = arg0
   825  	return args, nil
   826  }
   827  
   828  func (ec *executionContext) field_Query_human_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
   829  	var err error
   830  	args := map[string]interface{}{}
   831  	var arg0 string
   832  	if tmp, ok := rawArgs["id"]; ok {
   833  		arg0, err = ec.unmarshalNID2string(ctx, tmp)
   834  		if err != nil {
   835  			return nil, err
   836  		}
   837  	}
   838  	args["id"] = arg0
   839  	return args, nil
   840  }
   841  
   842  func (ec *executionContext) field_Query_reviews_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
   843  	var err error
   844  	args := map[string]interface{}{}
   845  	var arg0 models.Episode
   846  	if tmp, ok := rawArgs["episode"]; ok {
   847  		arg0, err = ec.unmarshalNEpisode2githubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋstarwarsᚋmodelsᚐEpisode(ctx, tmp)
   848  		if err != nil {
   849  			return nil, err
   850  		}
   851  	}
   852  	args["episode"] = arg0
   853  	var arg1 *time.Time
   854  	if tmp, ok := rawArgs["since"]; ok {
   855  		arg1, err = ec.unmarshalOTime2ᚖtimeᚐTime(ctx, tmp)
   856  		if err != nil {
   857  			return nil, err
   858  		}
   859  	}
   860  	args["since"] = arg1
   861  	return args, nil
   862  }
   863  
   864  func (ec *executionContext) field_Query_search_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
   865  	var err error
   866  	args := map[string]interface{}{}
   867  	var arg0 string
   868  	if tmp, ok := rawArgs["text"]; ok {
   869  		arg0, err = ec.unmarshalNString2string(ctx, tmp)
   870  		if err != nil {
   871  			return nil, err
   872  		}
   873  	}
   874  	args["text"] = arg0
   875  	return args, nil
   876  }
   877  
   878  func (ec *executionContext) field_Query_starship_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
   879  	var err error
   880  	args := map[string]interface{}{}
   881  	var arg0 string
   882  	if tmp, ok := rawArgs["id"]; ok {
   883  		arg0, err = ec.unmarshalNID2string(ctx, tmp)
   884  		if err != nil {
   885  			return nil, err
   886  		}
   887  	}
   888  	args["id"] = arg0
   889  	return args, nil
   890  }
   891  
   892  func (ec *executionContext) field_Starship_length_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
   893  	var err error
   894  	args := map[string]interface{}{}
   895  	var arg0 *models.LengthUnit
   896  	if tmp, ok := rawArgs["unit"]; ok {
   897  		arg0, err = ec.unmarshalOLengthUnit2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋstarwarsᚋmodelsᚐLengthUnit(ctx, tmp)
   898  		if err != nil {
   899  			return nil, err
   900  		}
   901  	}
   902  	args["unit"] = arg0
   903  	return args, nil
   904  }
   905  
   906  func (ec *executionContext) field___Type_enumValues_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
   907  	var err error
   908  	args := map[string]interface{}{}
   909  	var arg0 bool
   910  	if tmp, ok := rawArgs["includeDeprecated"]; ok {
   911  		arg0, err = ec.unmarshalOBoolean2bool(ctx, tmp)
   912  		if err != nil {
   913  			return nil, err
   914  		}
   915  	}
   916  	args["includeDeprecated"] = arg0
   917  	return args, nil
   918  }
   919  
   920  func (ec *executionContext) field___Type_fields_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
   921  	var err error
   922  	args := map[string]interface{}{}
   923  	var arg0 bool
   924  	if tmp, ok := rawArgs["includeDeprecated"]; ok {
   925  		arg0, err = ec.unmarshalOBoolean2bool(ctx, tmp)
   926  		if err != nil {
   927  			return nil, err
   928  		}
   929  	}
   930  	args["includeDeprecated"] = arg0
   931  	return args, nil
   932  }
   933  
   934  // endregion ***************************** args.gotpl *****************************
   935  
   936  // region    ************************** directives.gotpl **************************
   937  
   938  // endregion ************************** directives.gotpl **************************
   939  
   940  // region    **************************** field.gotpl *****************************
   941  
   942  func (ec *executionContext) _Droid_id(ctx context.Context, field graphql.CollectedField, obj *models.Droid) (ret graphql.Marshaler) {
   943  	defer func() {
   944  		if r := recover(); r != nil {
   945  			ec.Error(ctx, ec.Recover(ctx, r))
   946  			ret = graphql.Null
   947  		}
   948  	}()
   949  	fc := &graphql.FieldContext{
   950  		Object:   "Droid",
   951  		Field:    field,
   952  		Args:     nil,
   953  		IsMethod: false,
   954  	}
   955  
   956  	ctx = graphql.WithFieldContext(ctx, fc)
   957  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
   958  		ctx = rctx // use context from middleware stack in children
   959  		return obj.ID, nil
   960  	})
   961  	if err != nil {
   962  		ec.Error(ctx, err)
   963  		return graphql.Null
   964  	}
   965  	if resTmp == nil {
   966  		if !graphql.HasFieldError(ctx, fc) {
   967  			ec.Errorf(ctx, "must not be null")
   968  		}
   969  		return graphql.Null
   970  	}
   971  	res := resTmp.(string)
   972  	fc.Result = res
   973  	return ec.marshalNID2string(ctx, field.Selections, res)
   974  }
   975  
   976  func (ec *executionContext) _Droid_name(ctx context.Context, field graphql.CollectedField, obj *models.Droid) (ret graphql.Marshaler) {
   977  	defer func() {
   978  		if r := recover(); r != nil {
   979  			ec.Error(ctx, ec.Recover(ctx, r))
   980  			ret = graphql.Null
   981  		}
   982  	}()
   983  	fc := &graphql.FieldContext{
   984  		Object:   "Droid",
   985  		Field:    field,
   986  		Args:     nil,
   987  		IsMethod: false,
   988  	}
   989  
   990  	ctx = graphql.WithFieldContext(ctx, fc)
   991  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
   992  		ctx = rctx // use context from middleware stack in children
   993  		return obj.Name, nil
   994  	})
   995  	if err != nil {
   996  		ec.Error(ctx, err)
   997  		return graphql.Null
   998  	}
   999  	if resTmp == nil {
  1000  		if !graphql.HasFieldError(ctx, fc) {
  1001  			ec.Errorf(ctx, "must not be null")
  1002  		}
  1003  		return graphql.Null
  1004  	}
  1005  	res := resTmp.(string)
  1006  	fc.Result = res
  1007  	return ec.marshalNString2string(ctx, field.Selections, res)
  1008  }
  1009  
  1010  func (ec *executionContext) _Droid_friends(ctx context.Context, field graphql.CollectedField, obj *models.Droid) (ret graphql.Marshaler) {
  1011  	defer func() {
  1012  		if r := recover(); r != nil {
  1013  			ec.Error(ctx, ec.Recover(ctx, r))
  1014  			ret = graphql.Null
  1015  		}
  1016  	}()
  1017  	fc := &graphql.FieldContext{
  1018  		Object:   "Droid",
  1019  		Field:    field,
  1020  		Args:     nil,
  1021  		IsMethod: true,
  1022  	}
  1023  
  1024  	ctx = graphql.WithFieldContext(ctx, fc)
  1025  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
  1026  		ctx = rctx // use context from middleware stack in children
  1027  		return ec.resolvers.Droid().Friends(rctx, obj)
  1028  	})
  1029  	if err != nil {
  1030  		ec.Error(ctx, err)
  1031  		return graphql.Null
  1032  	}
  1033  	if resTmp == nil {
  1034  		return graphql.Null
  1035  	}
  1036  	res := resTmp.([]models.Character)
  1037  	fc.Result = res
  1038  	return ec.marshalOCharacter2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋstarwarsᚋmodelsᚐCharacterᚄ(ctx, field.Selections, res)
  1039  }
  1040  
  1041  func (ec *executionContext) _Droid_friendsConnection(ctx context.Context, field graphql.CollectedField, obj *models.Droid) (ret graphql.Marshaler) {
  1042  	defer func() {
  1043  		if r := recover(); r != nil {
  1044  			ec.Error(ctx, ec.Recover(ctx, r))
  1045  			ret = graphql.Null
  1046  		}
  1047  	}()
  1048  	fc := &graphql.FieldContext{
  1049  		Object:   "Droid",
  1050  		Field:    field,
  1051  		Args:     nil,
  1052  		IsMethod: true,
  1053  	}
  1054  
  1055  	ctx = graphql.WithFieldContext(ctx, fc)
  1056  	rawArgs := field.ArgumentMap(ec.Variables)
  1057  	args, err := ec.field_Droid_friendsConnection_args(ctx, rawArgs)
  1058  	if err != nil {
  1059  		ec.Error(ctx, err)
  1060  		return graphql.Null
  1061  	}
  1062  	fc.Args = args
  1063  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
  1064  		ctx = rctx // use context from middleware stack in children
  1065  		return ec.resolvers.Droid().FriendsConnection(rctx, obj, args["first"].(*int), args["after"].(*string))
  1066  	})
  1067  	if err != nil {
  1068  		ec.Error(ctx, err)
  1069  		return graphql.Null
  1070  	}
  1071  	if resTmp == nil {
  1072  		if !graphql.HasFieldError(ctx, fc) {
  1073  			ec.Errorf(ctx, "must not be null")
  1074  		}
  1075  		return graphql.Null
  1076  	}
  1077  	res := resTmp.(*models.FriendsConnection)
  1078  	fc.Result = res
  1079  	return ec.marshalNFriendsConnection2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋstarwarsᚋmodelsᚐFriendsConnection(ctx, field.Selections, res)
  1080  }
  1081  
  1082  func (ec *executionContext) _Droid_appearsIn(ctx context.Context, field graphql.CollectedField, obj *models.Droid) (ret graphql.Marshaler) {
  1083  	defer func() {
  1084  		if r := recover(); r != nil {
  1085  			ec.Error(ctx, ec.Recover(ctx, r))
  1086  			ret = graphql.Null
  1087  		}
  1088  	}()
  1089  	fc := &graphql.FieldContext{
  1090  		Object:   "Droid",
  1091  		Field:    field,
  1092  		Args:     nil,
  1093  		IsMethod: false,
  1094  	}
  1095  
  1096  	ctx = graphql.WithFieldContext(ctx, fc)
  1097  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
  1098  		ctx = rctx // use context from middleware stack in children
  1099  		return obj.AppearsIn, nil
  1100  	})
  1101  	if err != nil {
  1102  		ec.Error(ctx, err)
  1103  		return graphql.Null
  1104  	}
  1105  	if resTmp == nil {
  1106  		if !graphql.HasFieldError(ctx, fc) {
  1107  			ec.Errorf(ctx, "must not be null")
  1108  		}
  1109  		return graphql.Null
  1110  	}
  1111  	res := resTmp.([]models.Episode)
  1112  	fc.Result = res
  1113  	return ec.marshalNEpisode2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋstarwarsᚋmodelsᚐEpisodeᚄ(ctx, field.Selections, res)
  1114  }
  1115  
  1116  func (ec *executionContext) _Droid_primaryFunction(ctx context.Context, field graphql.CollectedField, obj *models.Droid) (ret graphql.Marshaler) {
  1117  	defer func() {
  1118  		if r := recover(); r != nil {
  1119  			ec.Error(ctx, ec.Recover(ctx, r))
  1120  			ret = graphql.Null
  1121  		}
  1122  	}()
  1123  	fc := &graphql.FieldContext{
  1124  		Object:   "Droid",
  1125  		Field:    field,
  1126  		Args:     nil,
  1127  		IsMethod: false,
  1128  	}
  1129  
  1130  	ctx = graphql.WithFieldContext(ctx, fc)
  1131  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
  1132  		ctx = rctx // use context from middleware stack in children
  1133  		return obj.PrimaryFunction, nil
  1134  	})
  1135  	if err != nil {
  1136  		ec.Error(ctx, err)
  1137  		return graphql.Null
  1138  	}
  1139  	if resTmp == nil {
  1140  		return graphql.Null
  1141  	}
  1142  	res := resTmp.(string)
  1143  	fc.Result = res
  1144  	return ec.marshalOString2string(ctx, field.Selections, res)
  1145  }
  1146  
  1147  func (ec *executionContext) _FriendsConnection_totalCount(ctx context.Context, field graphql.CollectedField, obj *models.FriendsConnection) (ret graphql.Marshaler) {
  1148  	defer func() {
  1149  		if r := recover(); r != nil {
  1150  			ec.Error(ctx, ec.Recover(ctx, r))
  1151  			ret = graphql.Null
  1152  		}
  1153  	}()
  1154  	fc := &graphql.FieldContext{
  1155  		Object:   "FriendsConnection",
  1156  		Field:    field,
  1157  		Args:     nil,
  1158  		IsMethod: true,
  1159  	}
  1160  
  1161  	ctx = graphql.WithFieldContext(ctx, fc)
  1162  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
  1163  		ctx = rctx // use context from middleware stack in children
  1164  		return obj.TotalCount(), nil
  1165  	})
  1166  	if err != nil {
  1167  		ec.Error(ctx, err)
  1168  		return graphql.Null
  1169  	}
  1170  	if resTmp == nil {
  1171  		if !graphql.HasFieldError(ctx, fc) {
  1172  			ec.Errorf(ctx, "must not be null")
  1173  		}
  1174  		return graphql.Null
  1175  	}
  1176  	res := resTmp.(int)
  1177  	fc.Result = res
  1178  	return ec.marshalNInt2int(ctx, field.Selections, res)
  1179  }
  1180  
  1181  func (ec *executionContext) _FriendsConnection_edges(ctx context.Context, field graphql.CollectedField, obj *models.FriendsConnection) (ret graphql.Marshaler) {
  1182  	defer func() {
  1183  		if r := recover(); r != nil {
  1184  			ec.Error(ctx, ec.Recover(ctx, r))
  1185  			ret = graphql.Null
  1186  		}
  1187  	}()
  1188  	fc := &graphql.FieldContext{
  1189  		Object:   "FriendsConnection",
  1190  		Field:    field,
  1191  		Args:     nil,
  1192  		IsMethod: true,
  1193  	}
  1194  
  1195  	ctx = graphql.WithFieldContext(ctx, fc)
  1196  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
  1197  		ctx = rctx // use context from middleware stack in children
  1198  		return ec.resolvers.FriendsConnection().Edges(rctx, obj)
  1199  	})
  1200  	if err != nil {
  1201  		ec.Error(ctx, err)
  1202  		return graphql.Null
  1203  	}
  1204  	if resTmp == nil {
  1205  		return graphql.Null
  1206  	}
  1207  	res := resTmp.([]*models.FriendsEdge)
  1208  	fc.Result = res
  1209  	return ec.marshalOFriendsEdge2ᚕᚖgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋstarwarsᚋmodelsᚐFriendsEdgeᚄ(ctx, field.Selections, res)
  1210  }
  1211  
  1212  func (ec *executionContext) _FriendsConnection_friends(ctx context.Context, field graphql.CollectedField, obj *models.FriendsConnection) (ret graphql.Marshaler) {
  1213  	defer func() {
  1214  		if r := recover(); r != nil {
  1215  			ec.Error(ctx, ec.Recover(ctx, r))
  1216  			ret = graphql.Null
  1217  		}
  1218  	}()
  1219  	fc := &graphql.FieldContext{
  1220  		Object:   "FriendsConnection",
  1221  		Field:    field,
  1222  		Args:     nil,
  1223  		IsMethod: true,
  1224  	}
  1225  
  1226  	ctx = graphql.WithFieldContext(ctx, fc)
  1227  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
  1228  		ctx = rctx // use context from middleware stack in children
  1229  		return ec.resolvers.FriendsConnection().Friends(rctx, obj)
  1230  	})
  1231  	if err != nil {
  1232  		ec.Error(ctx, err)
  1233  		return graphql.Null
  1234  	}
  1235  	if resTmp == nil {
  1236  		return graphql.Null
  1237  	}
  1238  	res := resTmp.([]models.Character)
  1239  	fc.Result = res
  1240  	return ec.marshalOCharacter2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋstarwarsᚋmodelsᚐCharacterᚄ(ctx, field.Selections, res)
  1241  }
  1242  
  1243  func (ec *executionContext) _FriendsConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *models.FriendsConnection) (ret graphql.Marshaler) {
  1244  	defer func() {
  1245  		if r := recover(); r != nil {
  1246  			ec.Error(ctx, ec.Recover(ctx, r))
  1247  			ret = graphql.Null
  1248  		}
  1249  	}()
  1250  	fc := &graphql.FieldContext{
  1251  		Object:   "FriendsConnection",
  1252  		Field:    field,
  1253  		Args:     nil,
  1254  		IsMethod: true,
  1255  	}
  1256  
  1257  	ctx = graphql.WithFieldContext(ctx, fc)
  1258  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
  1259  		ctx = rctx // use context from middleware stack in children
  1260  		return obj.PageInfo(), nil
  1261  	})
  1262  	if err != nil {
  1263  		ec.Error(ctx, err)
  1264  		return graphql.Null
  1265  	}
  1266  	if resTmp == nil {
  1267  		if !graphql.HasFieldError(ctx, fc) {
  1268  			ec.Errorf(ctx, "must not be null")
  1269  		}
  1270  		return graphql.Null
  1271  	}
  1272  	res := resTmp.(models.PageInfo)
  1273  	fc.Result = res
  1274  	return ec.marshalNPageInfo2githubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋstarwarsᚋmodelsᚐPageInfo(ctx, field.Selections, res)
  1275  }
  1276  
  1277  func (ec *executionContext) _FriendsEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *models.FriendsEdge) (ret graphql.Marshaler) {
  1278  	defer func() {
  1279  		if r := recover(); r != nil {
  1280  			ec.Error(ctx, ec.Recover(ctx, r))
  1281  			ret = graphql.Null
  1282  		}
  1283  	}()
  1284  	fc := &graphql.FieldContext{
  1285  		Object:   "FriendsEdge",
  1286  		Field:    field,
  1287  		Args:     nil,
  1288  		IsMethod: false,
  1289  	}
  1290  
  1291  	ctx = graphql.WithFieldContext(ctx, fc)
  1292  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
  1293  		ctx = rctx // use context from middleware stack in children
  1294  		return obj.Cursor, nil
  1295  	})
  1296  	if err != nil {
  1297  		ec.Error(ctx, err)
  1298  		return graphql.Null
  1299  	}
  1300  	if resTmp == nil {
  1301  		if !graphql.HasFieldError(ctx, fc) {
  1302  			ec.Errorf(ctx, "must not be null")
  1303  		}
  1304  		return graphql.Null
  1305  	}
  1306  	res := resTmp.(string)
  1307  	fc.Result = res
  1308  	return ec.marshalNID2string(ctx, field.Selections, res)
  1309  }
  1310  
  1311  func (ec *executionContext) _FriendsEdge_node(ctx context.Context, field graphql.CollectedField, obj *models.FriendsEdge) (ret graphql.Marshaler) {
  1312  	defer func() {
  1313  		if r := recover(); r != nil {
  1314  			ec.Error(ctx, ec.Recover(ctx, r))
  1315  			ret = graphql.Null
  1316  		}
  1317  	}()
  1318  	fc := &graphql.FieldContext{
  1319  		Object:   "FriendsEdge",
  1320  		Field:    field,
  1321  		Args:     nil,
  1322  		IsMethod: false,
  1323  	}
  1324  
  1325  	ctx = graphql.WithFieldContext(ctx, fc)
  1326  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
  1327  		ctx = rctx // use context from middleware stack in children
  1328  		return obj.Node, nil
  1329  	})
  1330  	if err != nil {
  1331  		ec.Error(ctx, err)
  1332  		return graphql.Null
  1333  	}
  1334  	if resTmp == nil {
  1335  		return graphql.Null
  1336  	}
  1337  	res := resTmp.(models.Character)
  1338  	fc.Result = res
  1339  	return ec.marshalOCharacter2githubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋstarwarsᚋmodelsᚐCharacter(ctx, field.Selections, res)
  1340  }
  1341  
  1342  func (ec *executionContext) _Human_id(ctx context.Context, field graphql.CollectedField, obj *models.Human) (ret graphql.Marshaler) {
  1343  	defer func() {
  1344  		if r := recover(); r != nil {
  1345  			ec.Error(ctx, ec.Recover(ctx, r))
  1346  			ret = graphql.Null
  1347  		}
  1348  	}()
  1349  	fc := &graphql.FieldContext{
  1350  		Object:   "Human",
  1351  		Field:    field,
  1352  		Args:     nil,
  1353  		IsMethod: false,
  1354  	}
  1355  
  1356  	ctx = graphql.WithFieldContext(ctx, fc)
  1357  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
  1358  		ctx = rctx // use context from middleware stack in children
  1359  		return obj.ID, nil
  1360  	})
  1361  	if err != nil {
  1362  		ec.Error(ctx, err)
  1363  		return graphql.Null
  1364  	}
  1365  	if resTmp == nil {
  1366  		if !graphql.HasFieldError(ctx, fc) {
  1367  			ec.Errorf(ctx, "must not be null")
  1368  		}
  1369  		return graphql.Null
  1370  	}
  1371  	res := resTmp.(string)
  1372  	fc.Result = res
  1373  	return ec.marshalNID2string(ctx, field.Selections, res)
  1374  }
  1375  
  1376  func (ec *executionContext) _Human_name(ctx context.Context, field graphql.CollectedField, obj *models.Human) (ret graphql.Marshaler) {
  1377  	defer func() {
  1378  		if r := recover(); r != nil {
  1379  			ec.Error(ctx, ec.Recover(ctx, r))
  1380  			ret = graphql.Null
  1381  		}
  1382  	}()
  1383  	fc := &graphql.FieldContext{
  1384  		Object:   "Human",
  1385  		Field:    field,
  1386  		Args:     nil,
  1387  		IsMethod: false,
  1388  	}
  1389  
  1390  	ctx = graphql.WithFieldContext(ctx, fc)
  1391  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
  1392  		ctx = rctx // use context from middleware stack in children
  1393  		return obj.Name, nil
  1394  	})
  1395  	if err != nil {
  1396  		ec.Error(ctx, err)
  1397  		return graphql.Null
  1398  	}
  1399  	if resTmp == nil {
  1400  		if !graphql.HasFieldError(ctx, fc) {
  1401  			ec.Errorf(ctx, "must not be null")
  1402  		}
  1403  		return graphql.Null
  1404  	}
  1405  	res := resTmp.(string)
  1406  	fc.Result = res
  1407  	return ec.marshalNString2string(ctx, field.Selections, res)
  1408  }
  1409  
  1410  func (ec *executionContext) _Human_height(ctx context.Context, field graphql.CollectedField, obj *models.Human) (ret graphql.Marshaler) {
  1411  	defer func() {
  1412  		if r := recover(); r != nil {
  1413  			ec.Error(ctx, ec.Recover(ctx, r))
  1414  			ret = graphql.Null
  1415  		}
  1416  	}()
  1417  	fc := &graphql.FieldContext{
  1418  		Object:   "Human",
  1419  		Field:    field,
  1420  		Args:     nil,
  1421  		IsMethod: true,
  1422  	}
  1423  
  1424  	ctx = graphql.WithFieldContext(ctx, fc)
  1425  	rawArgs := field.ArgumentMap(ec.Variables)
  1426  	args, err := ec.field_Human_height_args(ctx, rawArgs)
  1427  	if err != nil {
  1428  		ec.Error(ctx, err)
  1429  		return graphql.Null
  1430  	}
  1431  	fc.Args = args
  1432  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
  1433  		ctx = rctx // use context from middleware stack in children
  1434  		return obj.Height(args["unit"].(models.LengthUnit)), nil
  1435  	})
  1436  	if err != nil {
  1437  		ec.Error(ctx, err)
  1438  		return graphql.Null
  1439  	}
  1440  	if resTmp == nil {
  1441  		if !graphql.HasFieldError(ctx, fc) {
  1442  			ec.Errorf(ctx, "must not be null")
  1443  		}
  1444  		return graphql.Null
  1445  	}
  1446  	res := resTmp.(float64)
  1447  	fc.Result = res
  1448  	return ec.marshalNFloat2float64(ctx, field.Selections, res)
  1449  }
  1450  
  1451  func (ec *executionContext) _Human_mass(ctx context.Context, field graphql.CollectedField, obj *models.Human) (ret graphql.Marshaler) {
  1452  	defer func() {
  1453  		if r := recover(); r != nil {
  1454  			ec.Error(ctx, ec.Recover(ctx, r))
  1455  			ret = graphql.Null
  1456  		}
  1457  	}()
  1458  	fc := &graphql.FieldContext{
  1459  		Object:   "Human",
  1460  		Field:    field,
  1461  		Args:     nil,
  1462  		IsMethod: false,
  1463  	}
  1464  
  1465  	ctx = graphql.WithFieldContext(ctx, fc)
  1466  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
  1467  		ctx = rctx // use context from middleware stack in children
  1468  		return obj.Mass, nil
  1469  	})
  1470  	if err != nil {
  1471  		ec.Error(ctx, err)
  1472  		return graphql.Null
  1473  	}
  1474  	if resTmp == nil {
  1475  		return graphql.Null
  1476  	}
  1477  	res := resTmp.(float64)
  1478  	fc.Result = res
  1479  	return ec.marshalOFloat2float64(ctx, field.Selections, res)
  1480  }
  1481  
  1482  func (ec *executionContext) _Human_friends(ctx context.Context, field graphql.CollectedField, obj *models.Human) (ret graphql.Marshaler) {
  1483  	defer func() {
  1484  		if r := recover(); r != nil {
  1485  			ec.Error(ctx, ec.Recover(ctx, r))
  1486  			ret = graphql.Null
  1487  		}
  1488  	}()
  1489  	fc := &graphql.FieldContext{
  1490  		Object:   "Human",
  1491  		Field:    field,
  1492  		Args:     nil,
  1493  		IsMethod: true,
  1494  	}
  1495  
  1496  	ctx = graphql.WithFieldContext(ctx, fc)
  1497  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
  1498  		ctx = rctx // use context from middleware stack in children
  1499  		return ec.resolvers.Human().Friends(rctx, obj)
  1500  	})
  1501  	if err != nil {
  1502  		ec.Error(ctx, err)
  1503  		return graphql.Null
  1504  	}
  1505  	if resTmp == nil {
  1506  		return graphql.Null
  1507  	}
  1508  	res := resTmp.([]models.Character)
  1509  	fc.Result = res
  1510  	return ec.marshalOCharacter2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋstarwarsᚋmodelsᚐCharacterᚄ(ctx, field.Selections, res)
  1511  }
  1512  
  1513  func (ec *executionContext) _Human_friendsConnection(ctx context.Context, field graphql.CollectedField, obj *models.Human) (ret graphql.Marshaler) {
  1514  	defer func() {
  1515  		if r := recover(); r != nil {
  1516  			ec.Error(ctx, ec.Recover(ctx, r))
  1517  			ret = graphql.Null
  1518  		}
  1519  	}()
  1520  	fc := &graphql.FieldContext{
  1521  		Object:   "Human",
  1522  		Field:    field,
  1523  		Args:     nil,
  1524  		IsMethod: true,
  1525  	}
  1526  
  1527  	ctx = graphql.WithFieldContext(ctx, fc)
  1528  	rawArgs := field.ArgumentMap(ec.Variables)
  1529  	args, err := ec.field_Human_friendsConnection_args(ctx, rawArgs)
  1530  	if err != nil {
  1531  		ec.Error(ctx, err)
  1532  		return graphql.Null
  1533  	}
  1534  	fc.Args = args
  1535  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
  1536  		ctx = rctx // use context from middleware stack in children
  1537  		return ec.resolvers.Human().FriendsConnection(rctx, obj, args["first"].(*int), args["after"].(*string))
  1538  	})
  1539  	if err != nil {
  1540  		ec.Error(ctx, err)
  1541  		return graphql.Null
  1542  	}
  1543  	if resTmp == nil {
  1544  		if !graphql.HasFieldError(ctx, fc) {
  1545  			ec.Errorf(ctx, "must not be null")
  1546  		}
  1547  		return graphql.Null
  1548  	}
  1549  	res := resTmp.(*models.FriendsConnection)
  1550  	fc.Result = res
  1551  	return ec.marshalNFriendsConnection2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋstarwarsᚋmodelsᚐFriendsConnection(ctx, field.Selections, res)
  1552  }
  1553  
  1554  func (ec *executionContext) _Human_appearsIn(ctx context.Context, field graphql.CollectedField, obj *models.Human) (ret graphql.Marshaler) {
  1555  	defer func() {
  1556  		if r := recover(); r != nil {
  1557  			ec.Error(ctx, ec.Recover(ctx, r))
  1558  			ret = graphql.Null
  1559  		}
  1560  	}()
  1561  	fc := &graphql.FieldContext{
  1562  		Object:   "Human",
  1563  		Field:    field,
  1564  		Args:     nil,
  1565  		IsMethod: false,
  1566  	}
  1567  
  1568  	ctx = graphql.WithFieldContext(ctx, fc)
  1569  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
  1570  		ctx = rctx // use context from middleware stack in children
  1571  		return obj.AppearsIn, nil
  1572  	})
  1573  	if err != nil {
  1574  		ec.Error(ctx, err)
  1575  		return graphql.Null
  1576  	}
  1577  	if resTmp == nil {
  1578  		if !graphql.HasFieldError(ctx, fc) {
  1579  			ec.Errorf(ctx, "must not be null")
  1580  		}
  1581  		return graphql.Null
  1582  	}
  1583  	res := resTmp.([]models.Episode)
  1584  	fc.Result = res
  1585  	return ec.marshalNEpisode2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋstarwarsᚋmodelsᚐEpisodeᚄ(ctx, field.Selections, res)
  1586  }
  1587  
  1588  func (ec *executionContext) _Human_starships(ctx context.Context, field graphql.CollectedField, obj *models.Human) (ret graphql.Marshaler) {
  1589  	defer func() {
  1590  		if r := recover(); r != nil {
  1591  			ec.Error(ctx, ec.Recover(ctx, r))
  1592  			ret = graphql.Null
  1593  		}
  1594  	}()
  1595  	fc := &graphql.FieldContext{
  1596  		Object:   "Human",
  1597  		Field:    field,
  1598  		Args:     nil,
  1599  		IsMethod: true,
  1600  	}
  1601  
  1602  	ctx = graphql.WithFieldContext(ctx, fc)
  1603  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
  1604  		ctx = rctx // use context from middleware stack in children
  1605  		return ec.resolvers.Human().Starships(rctx, obj)
  1606  	})
  1607  	if err != nil {
  1608  		ec.Error(ctx, err)
  1609  		return graphql.Null
  1610  	}
  1611  	if resTmp == nil {
  1612  		return graphql.Null
  1613  	}
  1614  	res := resTmp.([]*models.Starship)
  1615  	fc.Result = res
  1616  	return ec.marshalOStarship2ᚕᚖgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋstarwarsᚋmodelsᚐStarshipᚄ(ctx, field.Selections, res)
  1617  }
  1618  
  1619  func (ec *executionContext) _Mutation_createReview(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
  1620  	defer func() {
  1621  		if r := recover(); r != nil {
  1622  			ec.Error(ctx, ec.Recover(ctx, r))
  1623  			ret = graphql.Null
  1624  		}
  1625  	}()
  1626  	fc := &graphql.FieldContext{
  1627  		Object:   "Mutation",
  1628  		Field:    field,
  1629  		Args:     nil,
  1630  		IsMethod: true,
  1631  	}
  1632  
  1633  	ctx = graphql.WithFieldContext(ctx, fc)
  1634  	rawArgs := field.ArgumentMap(ec.Variables)
  1635  	args, err := ec.field_Mutation_createReview_args(ctx, rawArgs)
  1636  	if err != nil {
  1637  		ec.Error(ctx, err)
  1638  		return graphql.Null
  1639  	}
  1640  	fc.Args = args
  1641  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
  1642  		ctx = rctx // use context from middleware stack in children
  1643  		return ec.resolvers.Mutation().CreateReview(rctx, args["episode"].(models.Episode), args["review"].(models.Review))
  1644  	})
  1645  	if err != nil {
  1646  		ec.Error(ctx, err)
  1647  		return graphql.Null
  1648  	}
  1649  	if resTmp == nil {
  1650  		return graphql.Null
  1651  	}
  1652  	res := resTmp.(*models.Review)
  1653  	fc.Result = res
  1654  	return ec.marshalOReview2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋstarwarsᚋmodelsᚐReview(ctx, field.Selections, res)
  1655  }
  1656  
  1657  func (ec *executionContext) _PageInfo_startCursor(ctx context.Context, field graphql.CollectedField, obj *models.PageInfo) (ret graphql.Marshaler) {
  1658  	defer func() {
  1659  		if r := recover(); r != nil {
  1660  			ec.Error(ctx, ec.Recover(ctx, r))
  1661  			ret = graphql.Null
  1662  		}
  1663  	}()
  1664  	fc := &graphql.FieldContext{
  1665  		Object:   "PageInfo",
  1666  		Field:    field,
  1667  		Args:     nil,
  1668  		IsMethod: false,
  1669  	}
  1670  
  1671  	ctx = graphql.WithFieldContext(ctx, fc)
  1672  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
  1673  		ctx = rctx // use context from middleware stack in children
  1674  		return obj.StartCursor, nil
  1675  	})
  1676  	if err != nil {
  1677  		ec.Error(ctx, err)
  1678  		return graphql.Null
  1679  	}
  1680  	if resTmp == nil {
  1681  		if !graphql.HasFieldError(ctx, fc) {
  1682  			ec.Errorf(ctx, "must not be null")
  1683  		}
  1684  		return graphql.Null
  1685  	}
  1686  	res := resTmp.(string)
  1687  	fc.Result = res
  1688  	return ec.marshalNID2string(ctx, field.Selections, res)
  1689  }
  1690  
  1691  func (ec *executionContext) _PageInfo_endCursor(ctx context.Context, field graphql.CollectedField, obj *models.PageInfo) (ret graphql.Marshaler) {
  1692  	defer func() {
  1693  		if r := recover(); r != nil {
  1694  			ec.Error(ctx, ec.Recover(ctx, r))
  1695  			ret = graphql.Null
  1696  		}
  1697  	}()
  1698  	fc := &graphql.FieldContext{
  1699  		Object:   "PageInfo",
  1700  		Field:    field,
  1701  		Args:     nil,
  1702  		IsMethod: false,
  1703  	}
  1704  
  1705  	ctx = graphql.WithFieldContext(ctx, fc)
  1706  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
  1707  		ctx = rctx // use context from middleware stack in children
  1708  		return obj.EndCursor, nil
  1709  	})
  1710  	if err != nil {
  1711  		ec.Error(ctx, err)
  1712  		return graphql.Null
  1713  	}
  1714  	if resTmp == nil {
  1715  		if !graphql.HasFieldError(ctx, fc) {
  1716  			ec.Errorf(ctx, "must not be null")
  1717  		}
  1718  		return graphql.Null
  1719  	}
  1720  	res := resTmp.(string)
  1721  	fc.Result = res
  1722  	return ec.marshalNID2string(ctx, field.Selections, res)
  1723  }
  1724  
  1725  func (ec *executionContext) _PageInfo_hasNextPage(ctx context.Context, field graphql.CollectedField, obj *models.PageInfo) (ret graphql.Marshaler) {
  1726  	defer func() {
  1727  		if r := recover(); r != nil {
  1728  			ec.Error(ctx, ec.Recover(ctx, r))
  1729  			ret = graphql.Null
  1730  		}
  1731  	}()
  1732  	fc := &graphql.FieldContext{
  1733  		Object:   "PageInfo",
  1734  		Field:    field,
  1735  		Args:     nil,
  1736  		IsMethod: false,
  1737  	}
  1738  
  1739  	ctx = graphql.WithFieldContext(ctx, fc)
  1740  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
  1741  		ctx = rctx // use context from middleware stack in children
  1742  		return obj.HasNextPage, nil
  1743  	})
  1744  	if err != nil {
  1745  		ec.Error(ctx, err)
  1746  		return graphql.Null
  1747  	}
  1748  	if resTmp == nil {
  1749  		if !graphql.HasFieldError(ctx, fc) {
  1750  			ec.Errorf(ctx, "must not be null")
  1751  		}
  1752  		return graphql.Null
  1753  	}
  1754  	res := resTmp.(bool)
  1755  	fc.Result = res
  1756  	return ec.marshalNBoolean2bool(ctx, field.Selections, res)
  1757  }
  1758  
  1759  func (ec *executionContext) _Query_hero(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
  1760  	defer func() {
  1761  		if r := recover(); r != nil {
  1762  			ec.Error(ctx, ec.Recover(ctx, r))
  1763  			ret = graphql.Null
  1764  		}
  1765  	}()
  1766  	fc := &graphql.FieldContext{
  1767  		Object:   "Query",
  1768  		Field:    field,
  1769  		Args:     nil,
  1770  		IsMethod: true,
  1771  	}
  1772  
  1773  	ctx = graphql.WithFieldContext(ctx, fc)
  1774  	rawArgs := field.ArgumentMap(ec.Variables)
  1775  	args, err := ec.field_Query_hero_args(ctx, rawArgs)
  1776  	if err != nil {
  1777  		ec.Error(ctx, err)
  1778  		return graphql.Null
  1779  	}
  1780  	fc.Args = args
  1781  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
  1782  		ctx = rctx // use context from middleware stack in children
  1783  		return ec.resolvers.Query().Hero(rctx, args["episode"].(*models.Episode))
  1784  	})
  1785  	if err != nil {
  1786  		ec.Error(ctx, err)
  1787  		return graphql.Null
  1788  	}
  1789  	if resTmp == nil {
  1790  		return graphql.Null
  1791  	}
  1792  	res := resTmp.(models.Character)
  1793  	fc.Result = res
  1794  	return ec.marshalOCharacter2githubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋstarwarsᚋmodelsᚐCharacter(ctx, field.Selections, res)
  1795  }
  1796  
  1797  func (ec *executionContext) _Query_reviews(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
  1798  	defer func() {
  1799  		if r := recover(); r != nil {
  1800  			ec.Error(ctx, ec.Recover(ctx, r))
  1801  			ret = graphql.Null
  1802  		}
  1803  	}()
  1804  	fc := &graphql.FieldContext{
  1805  		Object:   "Query",
  1806  		Field:    field,
  1807  		Args:     nil,
  1808  		IsMethod: true,
  1809  	}
  1810  
  1811  	ctx = graphql.WithFieldContext(ctx, fc)
  1812  	rawArgs := field.ArgumentMap(ec.Variables)
  1813  	args, err := ec.field_Query_reviews_args(ctx, rawArgs)
  1814  	if err != nil {
  1815  		ec.Error(ctx, err)
  1816  		return graphql.Null
  1817  	}
  1818  	fc.Args = args
  1819  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
  1820  		ctx = rctx // use context from middleware stack in children
  1821  		return ec.resolvers.Query().Reviews(rctx, args["episode"].(models.Episode), args["since"].(*time.Time))
  1822  	})
  1823  	if err != nil {
  1824  		ec.Error(ctx, err)
  1825  		return graphql.Null
  1826  	}
  1827  	if resTmp == nil {
  1828  		if !graphql.HasFieldError(ctx, fc) {
  1829  			ec.Errorf(ctx, "must not be null")
  1830  		}
  1831  		return graphql.Null
  1832  	}
  1833  	res := resTmp.([]*models.Review)
  1834  	fc.Result = res
  1835  	return ec.marshalNReview2ᚕᚖgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋstarwarsᚋmodelsᚐReviewᚄ(ctx, field.Selections, res)
  1836  }
  1837  
  1838  func (ec *executionContext) _Query_search(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
  1839  	defer func() {
  1840  		if r := recover(); r != nil {
  1841  			ec.Error(ctx, ec.Recover(ctx, r))
  1842  			ret = graphql.Null
  1843  		}
  1844  	}()
  1845  	fc := &graphql.FieldContext{
  1846  		Object:   "Query",
  1847  		Field:    field,
  1848  		Args:     nil,
  1849  		IsMethod: true,
  1850  	}
  1851  
  1852  	ctx = graphql.WithFieldContext(ctx, fc)
  1853  	rawArgs := field.ArgumentMap(ec.Variables)
  1854  	args, err := ec.field_Query_search_args(ctx, rawArgs)
  1855  	if err != nil {
  1856  		ec.Error(ctx, err)
  1857  		return graphql.Null
  1858  	}
  1859  	fc.Args = args
  1860  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
  1861  		ctx = rctx // use context from middleware stack in children
  1862  		return ec.resolvers.Query().Search(rctx, args["text"].(string))
  1863  	})
  1864  	if err != nil {
  1865  		ec.Error(ctx, err)
  1866  		return graphql.Null
  1867  	}
  1868  	if resTmp == nil {
  1869  		if !graphql.HasFieldError(ctx, fc) {
  1870  			ec.Errorf(ctx, "must not be null")
  1871  		}
  1872  		return graphql.Null
  1873  	}
  1874  	res := resTmp.([]models.SearchResult)
  1875  	fc.Result = res
  1876  	return ec.marshalNSearchResult2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋstarwarsᚋmodelsᚐSearchResultᚄ(ctx, field.Selections, res)
  1877  }
  1878  
  1879  func (ec *executionContext) _Query_character(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
  1880  	defer func() {
  1881  		if r := recover(); r != nil {
  1882  			ec.Error(ctx, ec.Recover(ctx, r))
  1883  			ret = graphql.Null
  1884  		}
  1885  	}()
  1886  	fc := &graphql.FieldContext{
  1887  		Object:   "Query",
  1888  		Field:    field,
  1889  		Args:     nil,
  1890  		IsMethod: true,
  1891  	}
  1892  
  1893  	ctx = graphql.WithFieldContext(ctx, fc)
  1894  	rawArgs := field.ArgumentMap(ec.Variables)
  1895  	args, err := ec.field_Query_character_args(ctx, rawArgs)
  1896  	if err != nil {
  1897  		ec.Error(ctx, err)
  1898  		return graphql.Null
  1899  	}
  1900  	fc.Args = args
  1901  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
  1902  		ctx = rctx // use context from middleware stack in children
  1903  		return ec.resolvers.Query().Character(rctx, args["id"].(string))
  1904  	})
  1905  	if err != nil {
  1906  		ec.Error(ctx, err)
  1907  		return graphql.Null
  1908  	}
  1909  	if resTmp == nil {
  1910  		return graphql.Null
  1911  	}
  1912  	res := resTmp.(models.Character)
  1913  	fc.Result = res
  1914  	return ec.marshalOCharacter2githubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋstarwarsᚋmodelsᚐCharacter(ctx, field.Selections, res)
  1915  }
  1916  
  1917  func (ec *executionContext) _Query_droid(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
  1918  	defer func() {
  1919  		if r := recover(); r != nil {
  1920  			ec.Error(ctx, ec.Recover(ctx, r))
  1921  			ret = graphql.Null
  1922  		}
  1923  	}()
  1924  	fc := &graphql.FieldContext{
  1925  		Object:   "Query",
  1926  		Field:    field,
  1927  		Args:     nil,
  1928  		IsMethod: true,
  1929  	}
  1930  
  1931  	ctx = graphql.WithFieldContext(ctx, fc)
  1932  	rawArgs := field.ArgumentMap(ec.Variables)
  1933  	args, err := ec.field_Query_droid_args(ctx, rawArgs)
  1934  	if err != nil {
  1935  		ec.Error(ctx, err)
  1936  		return graphql.Null
  1937  	}
  1938  	fc.Args = args
  1939  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
  1940  		ctx = rctx // use context from middleware stack in children
  1941  		return ec.resolvers.Query().Droid(rctx, args["id"].(string))
  1942  	})
  1943  	if err != nil {
  1944  		ec.Error(ctx, err)
  1945  		return graphql.Null
  1946  	}
  1947  	if resTmp == nil {
  1948  		return graphql.Null
  1949  	}
  1950  	res := resTmp.(*models.Droid)
  1951  	fc.Result = res
  1952  	return ec.marshalODroid2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋstarwarsᚋmodelsᚐDroid(ctx, field.Selections, res)
  1953  }
  1954  
  1955  func (ec *executionContext) _Query_human(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
  1956  	defer func() {
  1957  		if r := recover(); r != nil {
  1958  			ec.Error(ctx, ec.Recover(ctx, r))
  1959  			ret = graphql.Null
  1960  		}
  1961  	}()
  1962  	fc := &graphql.FieldContext{
  1963  		Object:   "Query",
  1964  		Field:    field,
  1965  		Args:     nil,
  1966  		IsMethod: true,
  1967  	}
  1968  
  1969  	ctx = graphql.WithFieldContext(ctx, fc)
  1970  	rawArgs := field.ArgumentMap(ec.Variables)
  1971  	args, err := ec.field_Query_human_args(ctx, rawArgs)
  1972  	if err != nil {
  1973  		ec.Error(ctx, err)
  1974  		return graphql.Null
  1975  	}
  1976  	fc.Args = args
  1977  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
  1978  		ctx = rctx // use context from middleware stack in children
  1979  		return ec.resolvers.Query().Human(rctx, args["id"].(string))
  1980  	})
  1981  	if err != nil {
  1982  		ec.Error(ctx, err)
  1983  		return graphql.Null
  1984  	}
  1985  	if resTmp == nil {
  1986  		return graphql.Null
  1987  	}
  1988  	res := resTmp.(*models.Human)
  1989  	fc.Result = res
  1990  	return ec.marshalOHuman2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋstarwarsᚋmodelsᚐHuman(ctx, field.Selections, res)
  1991  }
  1992  
  1993  func (ec *executionContext) _Query_starship(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
  1994  	defer func() {
  1995  		if r := recover(); r != nil {
  1996  			ec.Error(ctx, ec.Recover(ctx, r))
  1997  			ret = graphql.Null
  1998  		}
  1999  	}()
  2000  	fc := &graphql.FieldContext{
  2001  		Object:   "Query",
  2002  		Field:    field,
  2003  		Args:     nil,
  2004  		IsMethod: true,
  2005  	}
  2006  
  2007  	ctx = graphql.WithFieldContext(ctx, fc)
  2008  	rawArgs := field.ArgumentMap(ec.Variables)
  2009  	args, err := ec.field_Query_starship_args(ctx, rawArgs)
  2010  	if err != nil {
  2011  		ec.Error(ctx, err)
  2012  		return graphql.Null
  2013  	}
  2014  	fc.Args = args
  2015  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
  2016  		ctx = rctx // use context from middleware stack in children
  2017  		return ec.resolvers.Query().Starship(rctx, args["id"].(string))
  2018  	})
  2019  	if err != nil {
  2020  		ec.Error(ctx, err)
  2021  		return graphql.Null
  2022  	}
  2023  	if resTmp == nil {
  2024  		return graphql.Null
  2025  	}
  2026  	res := resTmp.(*models.Starship)
  2027  	fc.Result = res
  2028  	return ec.marshalOStarship2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋstarwarsᚋmodelsᚐStarship(ctx, field.Selections, res)
  2029  }
  2030  
  2031  func (ec *executionContext) _Query___type(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
  2032  	defer func() {
  2033  		if r := recover(); r != nil {
  2034  			ec.Error(ctx, ec.Recover(ctx, r))
  2035  			ret = graphql.Null
  2036  		}
  2037  	}()
  2038  	fc := &graphql.FieldContext{
  2039  		Object:   "Query",
  2040  		Field:    field,
  2041  		Args:     nil,
  2042  		IsMethod: true,
  2043  	}
  2044  
  2045  	ctx = graphql.WithFieldContext(ctx, fc)
  2046  	rawArgs := field.ArgumentMap(ec.Variables)
  2047  	args, err := ec.field_Query___type_args(ctx, rawArgs)
  2048  	if err != nil {
  2049  		ec.Error(ctx, err)
  2050  		return graphql.Null
  2051  	}
  2052  	fc.Args = args
  2053  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
  2054  		ctx = rctx // use context from middleware stack in children
  2055  		return ec.introspectType(args["name"].(string))
  2056  	})
  2057  	if err != nil {
  2058  		ec.Error(ctx, err)
  2059  		return graphql.Null
  2060  	}
  2061  	if resTmp == nil {
  2062  		return graphql.Null
  2063  	}
  2064  	res := resTmp.(*introspection.Type)
  2065  	fc.Result = res
  2066  	return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
  2067  }
  2068  
  2069  func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
  2070  	defer func() {
  2071  		if r := recover(); r != nil {
  2072  			ec.Error(ctx, ec.Recover(ctx, r))
  2073  			ret = graphql.Null
  2074  		}
  2075  	}()
  2076  	fc := &graphql.FieldContext{
  2077  		Object:   "Query",
  2078  		Field:    field,
  2079  		Args:     nil,
  2080  		IsMethod: true,
  2081  	}
  2082  
  2083  	ctx = graphql.WithFieldContext(ctx, fc)
  2084  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
  2085  		ctx = rctx // use context from middleware stack in children
  2086  		return ec.introspectSchema()
  2087  	})
  2088  	if err != nil {
  2089  		ec.Error(ctx, err)
  2090  		return graphql.Null
  2091  	}
  2092  	if resTmp == nil {
  2093  		return graphql.Null
  2094  	}
  2095  	res := resTmp.(*introspection.Schema)
  2096  	fc.Result = res
  2097  	return ec.marshalO__Schema2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐSchema(ctx, field.Selections, res)
  2098  }
  2099  
  2100  func (ec *executionContext) _Review_stars(ctx context.Context, field graphql.CollectedField, obj *models.Review) (ret graphql.Marshaler) {
  2101  	defer func() {
  2102  		if r := recover(); r != nil {
  2103  			ec.Error(ctx, ec.Recover(ctx, r))
  2104  			ret = graphql.Null
  2105  		}
  2106  	}()
  2107  	fc := &graphql.FieldContext{
  2108  		Object:   "Review",
  2109  		Field:    field,
  2110  		Args:     nil,
  2111  		IsMethod: false,
  2112  	}
  2113  
  2114  	ctx = graphql.WithFieldContext(ctx, fc)
  2115  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
  2116  		ctx = rctx // use context from middleware stack in children
  2117  		return obj.Stars, nil
  2118  	})
  2119  	if err != nil {
  2120  		ec.Error(ctx, err)
  2121  		return graphql.Null
  2122  	}
  2123  	if resTmp == nil {
  2124  		if !graphql.HasFieldError(ctx, fc) {
  2125  			ec.Errorf(ctx, "must not be null")
  2126  		}
  2127  		return graphql.Null
  2128  	}
  2129  	res := resTmp.(int)
  2130  	fc.Result = res
  2131  	return ec.marshalNInt2int(ctx, field.Selections, res)
  2132  }
  2133  
  2134  func (ec *executionContext) _Review_commentary(ctx context.Context, field graphql.CollectedField, obj *models.Review) (ret graphql.Marshaler) {
  2135  	defer func() {
  2136  		if r := recover(); r != nil {
  2137  			ec.Error(ctx, ec.Recover(ctx, r))
  2138  			ret = graphql.Null
  2139  		}
  2140  	}()
  2141  	fc := &graphql.FieldContext{
  2142  		Object:   "Review",
  2143  		Field:    field,
  2144  		Args:     nil,
  2145  		IsMethod: false,
  2146  	}
  2147  
  2148  	ctx = graphql.WithFieldContext(ctx, fc)
  2149  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
  2150  		ctx = rctx // use context from middleware stack in children
  2151  		return obj.Commentary, nil
  2152  	})
  2153  	if err != nil {
  2154  		ec.Error(ctx, err)
  2155  		return graphql.Null
  2156  	}
  2157  	if resTmp == nil {
  2158  		return graphql.Null
  2159  	}
  2160  	res := resTmp.(*string)
  2161  	fc.Result = res
  2162  	return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
  2163  }
  2164  
  2165  func (ec *executionContext) _Review_time(ctx context.Context, field graphql.CollectedField, obj *models.Review) (ret graphql.Marshaler) {
  2166  	defer func() {
  2167  		if r := recover(); r != nil {
  2168  			ec.Error(ctx, ec.Recover(ctx, r))
  2169  			ret = graphql.Null
  2170  		}
  2171  	}()
  2172  	fc := &graphql.FieldContext{
  2173  		Object:   "Review",
  2174  		Field:    field,
  2175  		Args:     nil,
  2176  		IsMethod: false,
  2177  	}
  2178  
  2179  	ctx = graphql.WithFieldContext(ctx, fc)
  2180  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
  2181  		ctx = rctx // use context from middleware stack in children
  2182  		return obj.Time, nil
  2183  	})
  2184  	if err != nil {
  2185  		ec.Error(ctx, err)
  2186  		return graphql.Null
  2187  	}
  2188  	if resTmp == nil {
  2189  		return graphql.Null
  2190  	}
  2191  	res := resTmp.(time.Time)
  2192  	fc.Result = res
  2193  	return ec.marshalOTime2timeᚐTime(ctx, field.Selections, res)
  2194  }
  2195  
  2196  func (ec *executionContext) _Starship_id(ctx context.Context, field graphql.CollectedField, obj *models.Starship) (ret graphql.Marshaler) {
  2197  	defer func() {
  2198  		if r := recover(); r != nil {
  2199  			ec.Error(ctx, ec.Recover(ctx, r))
  2200  			ret = graphql.Null
  2201  		}
  2202  	}()
  2203  	fc := &graphql.FieldContext{
  2204  		Object:   "Starship",
  2205  		Field:    field,
  2206  		Args:     nil,
  2207  		IsMethod: false,
  2208  	}
  2209  
  2210  	ctx = graphql.WithFieldContext(ctx, fc)
  2211  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
  2212  		ctx = rctx // use context from middleware stack in children
  2213  		return obj.ID, nil
  2214  	})
  2215  	if err != nil {
  2216  		ec.Error(ctx, err)
  2217  		return graphql.Null
  2218  	}
  2219  	if resTmp == nil {
  2220  		if !graphql.HasFieldError(ctx, fc) {
  2221  			ec.Errorf(ctx, "must not be null")
  2222  		}
  2223  		return graphql.Null
  2224  	}
  2225  	res := resTmp.(string)
  2226  	fc.Result = res
  2227  	return ec.marshalNID2string(ctx, field.Selections, res)
  2228  }
  2229  
  2230  func (ec *executionContext) _Starship_name(ctx context.Context, field graphql.CollectedField, obj *models.Starship) (ret graphql.Marshaler) {
  2231  	defer func() {
  2232  		if r := recover(); r != nil {
  2233  			ec.Error(ctx, ec.Recover(ctx, r))
  2234  			ret = graphql.Null
  2235  		}
  2236  	}()
  2237  	fc := &graphql.FieldContext{
  2238  		Object:   "Starship",
  2239  		Field:    field,
  2240  		Args:     nil,
  2241  		IsMethod: false,
  2242  	}
  2243  
  2244  	ctx = graphql.WithFieldContext(ctx, fc)
  2245  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
  2246  		ctx = rctx // use context from middleware stack in children
  2247  		return obj.Name, nil
  2248  	})
  2249  	if err != nil {
  2250  		ec.Error(ctx, err)
  2251  		return graphql.Null
  2252  	}
  2253  	if resTmp == nil {
  2254  		if !graphql.HasFieldError(ctx, fc) {
  2255  			ec.Errorf(ctx, "must not be null")
  2256  		}
  2257  		return graphql.Null
  2258  	}
  2259  	res := resTmp.(string)
  2260  	fc.Result = res
  2261  	return ec.marshalNString2string(ctx, field.Selections, res)
  2262  }
  2263  
  2264  func (ec *executionContext) _Starship_length(ctx context.Context, field graphql.CollectedField, obj *models.Starship) (ret graphql.Marshaler) {
  2265  	defer func() {
  2266  		if r := recover(); r != nil {
  2267  			ec.Error(ctx, ec.Recover(ctx, r))
  2268  			ret = graphql.Null
  2269  		}
  2270  	}()
  2271  	fc := &graphql.FieldContext{
  2272  		Object:   "Starship",
  2273  		Field:    field,
  2274  		Args:     nil,
  2275  		IsMethod: true,
  2276  	}
  2277  
  2278  	ctx = graphql.WithFieldContext(ctx, fc)
  2279  	rawArgs := field.ArgumentMap(ec.Variables)
  2280  	args, err := ec.field_Starship_length_args(ctx, rawArgs)
  2281  	if err != nil {
  2282  		ec.Error(ctx, err)
  2283  		return graphql.Null
  2284  	}
  2285  	fc.Args = args
  2286  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
  2287  		ctx = rctx // use context from middleware stack in children
  2288  		return ec.resolvers.Starship().Length(rctx, obj, args["unit"].(*models.LengthUnit))
  2289  	})
  2290  	if err != nil {
  2291  		ec.Error(ctx, err)
  2292  		return graphql.Null
  2293  	}
  2294  	if resTmp == nil {
  2295  		if !graphql.HasFieldError(ctx, fc) {
  2296  			ec.Errorf(ctx, "must not be null")
  2297  		}
  2298  		return graphql.Null
  2299  	}
  2300  	res := resTmp.(float64)
  2301  	fc.Result = res
  2302  	return ec.marshalNFloat2float64(ctx, field.Selections, res)
  2303  }
  2304  
  2305  func (ec *executionContext) _Starship_history(ctx context.Context, field graphql.CollectedField, obj *models.Starship) (ret graphql.Marshaler) {
  2306  	defer func() {
  2307  		if r := recover(); r != nil {
  2308  			ec.Error(ctx, ec.Recover(ctx, r))
  2309  			ret = graphql.Null
  2310  		}
  2311  	}()
  2312  	fc := &graphql.FieldContext{
  2313  		Object:   "Starship",
  2314  		Field:    field,
  2315  		Args:     nil,
  2316  		IsMethod: false,
  2317  	}
  2318  
  2319  	ctx = graphql.WithFieldContext(ctx, fc)
  2320  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
  2321  		ctx = rctx // use context from middleware stack in children
  2322  		return obj.History, nil
  2323  	})
  2324  	if err != nil {
  2325  		ec.Error(ctx, err)
  2326  		return graphql.Null
  2327  	}
  2328  	if resTmp == nil {
  2329  		if !graphql.HasFieldError(ctx, fc) {
  2330  			ec.Errorf(ctx, "must not be null")
  2331  		}
  2332  		return graphql.Null
  2333  	}
  2334  	res := resTmp.([][]int)
  2335  	fc.Result = res
  2336  	return ec.marshalNInt2ᚕᚕintᚄ(ctx, field.Selections, res)
  2337  }
  2338  
  2339  func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) {
  2340  	defer func() {
  2341  		if r := recover(); r != nil {
  2342  			ec.Error(ctx, ec.Recover(ctx, r))
  2343  			ret = graphql.Null
  2344  		}
  2345  	}()
  2346  	fc := &graphql.FieldContext{
  2347  		Object:   "__Directive",
  2348  		Field:    field,
  2349  		Args:     nil,
  2350  		IsMethod: false,
  2351  	}
  2352  
  2353  	ctx = graphql.WithFieldContext(ctx, fc)
  2354  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
  2355  		ctx = rctx // use context from middleware stack in children
  2356  		return obj.Name, nil
  2357  	})
  2358  	if err != nil {
  2359  		ec.Error(ctx, err)
  2360  		return graphql.Null
  2361  	}
  2362  	if resTmp == nil {
  2363  		if !graphql.HasFieldError(ctx, fc) {
  2364  			ec.Errorf(ctx, "must not be null")
  2365  		}
  2366  		return graphql.Null
  2367  	}
  2368  	res := resTmp.(string)
  2369  	fc.Result = res
  2370  	return ec.marshalNString2string(ctx, field.Selections, res)
  2371  }
  2372  
  2373  func (ec *executionContext) ___Directive_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) {
  2374  	defer func() {
  2375  		if r := recover(); r != nil {
  2376  			ec.Error(ctx, ec.Recover(ctx, r))
  2377  			ret = graphql.Null
  2378  		}
  2379  	}()
  2380  	fc := &graphql.FieldContext{
  2381  		Object:   "__Directive",
  2382  		Field:    field,
  2383  		Args:     nil,
  2384  		IsMethod: false,
  2385  	}
  2386  
  2387  	ctx = graphql.WithFieldContext(ctx, fc)
  2388  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
  2389  		ctx = rctx // use context from middleware stack in children
  2390  		return obj.Description, nil
  2391  	})
  2392  	if err != nil {
  2393  		ec.Error(ctx, err)
  2394  		return graphql.Null
  2395  	}
  2396  	if resTmp == nil {
  2397  		return graphql.Null
  2398  	}
  2399  	res := resTmp.(string)
  2400  	fc.Result = res
  2401  	return ec.marshalOString2string(ctx, field.Selections, res)
  2402  }
  2403  
  2404  func (ec *executionContext) ___Directive_locations(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) {
  2405  	defer func() {
  2406  		if r := recover(); r != nil {
  2407  			ec.Error(ctx, ec.Recover(ctx, r))
  2408  			ret = graphql.Null
  2409  		}
  2410  	}()
  2411  	fc := &graphql.FieldContext{
  2412  		Object:   "__Directive",
  2413  		Field:    field,
  2414  		Args:     nil,
  2415  		IsMethod: false,
  2416  	}
  2417  
  2418  	ctx = graphql.WithFieldContext(ctx, fc)
  2419  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
  2420  		ctx = rctx // use context from middleware stack in children
  2421  		return obj.Locations, nil
  2422  	})
  2423  	if err != nil {
  2424  		ec.Error(ctx, err)
  2425  		return graphql.Null
  2426  	}
  2427  	if resTmp == nil {
  2428  		if !graphql.HasFieldError(ctx, fc) {
  2429  			ec.Errorf(ctx, "must not be null")
  2430  		}
  2431  		return graphql.Null
  2432  	}
  2433  	res := resTmp.([]string)
  2434  	fc.Result = res
  2435  	return ec.marshalN__DirectiveLocation2ᚕstringᚄ(ctx, field.Selections, res)
  2436  }
  2437  
  2438  func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) {
  2439  	defer func() {
  2440  		if r := recover(); r != nil {
  2441  			ec.Error(ctx, ec.Recover(ctx, r))
  2442  			ret = graphql.Null
  2443  		}
  2444  	}()
  2445  	fc := &graphql.FieldContext{
  2446  		Object:   "__Directive",
  2447  		Field:    field,
  2448  		Args:     nil,
  2449  		IsMethod: false,
  2450  	}
  2451  
  2452  	ctx = graphql.WithFieldContext(ctx, fc)
  2453  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
  2454  		ctx = rctx // use context from middleware stack in children
  2455  		return obj.Args, nil
  2456  	})
  2457  	if err != nil {
  2458  		ec.Error(ctx, err)
  2459  		return graphql.Null
  2460  	}
  2461  	if resTmp == nil {
  2462  		if !graphql.HasFieldError(ctx, fc) {
  2463  			ec.Errorf(ctx, "must not be null")
  2464  		}
  2465  		return graphql.Null
  2466  	}
  2467  	res := resTmp.([]introspection.InputValue)
  2468  	fc.Result = res
  2469  	return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res)
  2470  }
  2471  
  2472  func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) {
  2473  	defer func() {
  2474  		if r := recover(); r != nil {
  2475  			ec.Error(ctx, ec.Recover(ctx, r))
  2476  			ret = graphql.Null
  2477  		}
  2478  	}()
  2479  	fc := &graphql.FieldContext{
  2480  		Object:   "__EnumValue",
  2481  		Field:    field,
  2482  		Args:     nil,
  2483  		IsMethod: false,
  2484  	}
  2485  
  2486  	ctx = graphql.WithFieldContext(ctx, fc)
  2487  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
  2488  		ctx = rctx // use context from middleware stack in children
  2489  		return obj.Name, nil
  2490  	})
  2491  	if err != nil {
  2492  		ec.Error(ctx, err)
  2493  		return graphql.Null
  2494  	}
  2495  	if resTmp == nil {
  2496  		if !graphql.HasFieldError(ctx, fc) {
  2497  			ec.Errorf(ctx, "must not be null")
  2498  		}
  2499  		return graphql.Null
  2500  	}
  2501  	res := resTmp.(string)
  2502  	fc.Result = res
  2503  	return ec.marshalNString2string(ctx, field.Selections, res)
  2504  }
  2505  
  2506  func (ec *executionContext) ___EnumValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) {
  2507  	defer func() {
  2508  		if r := recover(); r != nil {
  2509  			ec.Error(ctx, ec.Recover(ctx, r))
  2510  			ret = graphql.Null
  2511  		}
  2512  	}()
  2513  	fc := &graphql.FieldContext{
  2514  		Object:   "__EnumValue",
  2515  		Field:    field,
  2516  		Args:     nil,
  2517  		IsMethod: false,
  2518  	}
  2519  
  2520  	ctx = graphql.WithFieldContext(ctx, fc)
  2521  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
  2522  		ctx = rctx // use context from middleware stack in children
  2523  		return obj.Description, nil
  2524  	})
  2525  	if err != nil {
  2526  		ec.Error(ctx, err)
  2527  		return graphql.Null
  2528  	}
  2529  	if resTmp == nil {
  2530  		return graphql.Null
  2531  	}
  2532  	res := resTmp.(string)
  2533  	fc.Result = res
  2534  	return ec.marshalOString2string(ctx, field.Selections, res)
  2535  }
  2536  
  2537  func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) {
  2538  	defer func() {
  2539  		if r := recover(); r != nil {
  2540  			ec.Error(ctx, ec.Recover(ctx, r))
  2541  			ret = graphql.Null
  2542  		}
  2543  	}()
  2544  	fc := &graphql.FieldContext{
  2545  		Object:   "__EnumValue",
  2546  		Field:    field,
  2547  		Args:     nil,
  2548  		IsMethod: true,
  2549  	}
  2550  
  2551  	ctx = graphql.WithFieldContext(ctx, fc)
  2552  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
  2553  		ctx = rctx // use context from middleware stack in children
  2554  		return obj.IsDeprecated(), nil
  2555  	})
  2556  	if err != nil {
  2557  		ec.Error(ctx, err)
  2558  		return graphql.Null
  2559  	}
  2560  	if resTmp == nil {
  2561  		if !graphql.HasFieldError(ctx, fc) {
  2562  			ec.Errorf(ctx, "must not be null")
  2563  		}
  2564  		return graphql.Null
  2565  	}
  2566  	res := resTmp.(bool)
  2567  	fc.Result = res
  2568  	return ec.marshalNBoolean2bool(ctx, field.Selections, res)
  2569  }
  2570  
  2571  func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) {
  2572  	defer func() {
  2573  		if r := recover(); r != nil {
  2574  			ec.Error(ctx, ec.Recover(ctx, r))
  2575  			ret = graphql.Null
  2576  		}
  2577  	}()
  2578  	fc := &graphql.FieldContext{
  2579  		Object:   "__EnumValue",
  2580  		Field:    field,
  2581  		Args:     nil,
  2582  		IsMethod: true,
  2583  	}
  2584  
  2585  	ctx = graphql.WithFieldContext(ctx, fc)
  2586  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
  2587  		ctx = rctx // use context from middleware stack in children
  2588  		return obj.DeprecationReason(), nil
  2589  	})
  2590  	if err != nil {
  2591  		ec.Error(ctx, err)
  2592  		return graphql.Null
  2593  	}
  2594  	if resTmp == nil {
  2595  		return graphql.Null
  2596  	}
  2597  	res := resTmp.(*string)
  2598  	fc.Result = res
  2599  	return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
  2600  }
  2601  
  2602  func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
  2603  	defer func() {
  2604  		if r := recover(); r != nil {
  2605  			ec.Error(ctx, ec.Recover(ctx, r))
  2606  			ret = graphql.Null
  2607  		}
  2608  	}()
  2609  	fc := &graphql.FieldContext{
  2610  		Object:   "__Field",
  2611  		Field:    field,
  2612  		Args:     nil,
  2613  		IsMethod: false,
  2614  	}
  2615  
  2616  	ctx = graphql.WithFieldContext(ctx, fc)
  2617  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
  2618  		ctx = rctx // use context from middleware stack in children
  2619  		return obj.Name, nil
  2620  	})
  2621  	if err != nil {
  2622  		ec.Error(ctx, err)
  2623  		return graphql.Null
  2624  	}
  2625  	if resTmp == nil {
  2626  		if !graphql.HasFieldError(ctx, fc) {
  2627  			ec.Errorf(ctx, "must not be null")
  2628  		}
  2629  		return graphql.Null
  2630  	}
  2631  	res := resTmp.(string)
  2632  	fc.Result = res
  2633  	return ec.marshalNString2string(ctx, field.Selections, res)
  2634  }
  2635  
  2636  func (ec *executionContext) ___Field_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
  2637  	defer func() {
  2638  		if r := recover(); r != nil {
  2639  			ec.Error(ctx, ec.Recover(ctx, r))
  2640  			ret = graphql.Null
  2641  		}
  2642  	}()
  2643  	fc := &graphql.FieldContext{
  2644  		Object:   "__Field",
  2645  		Field:    field,
  2646  		Args:     nil,
  2647  		IsMethod: false,
  2648  	}
  2649  
  2650  	ctx = graphql.WithFieldContext(ctx, fc)
  2651  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
  2652  		ctx = rctx // use context from middleware stack in children
  2653  		return obj.Description, nil
  2654  	})
  2655  	if err != nil {
  2656  		ec.Error(ctx, err)
  2657  		return graphql.Null
  2658  	}
  2659  	if resTmp == nil {
  2660  		return graphql.Null
  2661  	}
  2662  	res := resTmp.(string)
  2663  	fc.Result = res
  2664  	return ec.marshalOString2string(ctx, field.Selections, res)
  2665  }
  2666  
  2667  func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
  2668  	defer func() {
  2669  		if r := recover(); r != nil {
  2670  			ec.Error(ctx, ec.Recover(ctx, r))
  2671  			ret = graphql.Null
  2672  		}
  2673  	}()
  2674  	fc := &graphql.FieldContext{
  2675  		Object:   "__Field",
  2676  		Field:    field,
  2677  		Args:     nil,
  2678  		IsMethod: false,
  2679  	}
  2680  
  2681  	ctx = graphql.WithFieldContext(ctx, fc)
  2682  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
  2683  		ctx = rctx // use context from middleware stack in children
  2684  		return obj.Args, nil
  2685  	})
  2686  	if err != nil {
  2687  		ec.Error(ctx, err)
  2688  		return graphql.Null
  2689  	}
  2690  	if resTmp == nil {
  2691  		if !graphql.HasFieldError(ctx, fc) {
  2692  			ec.Errorf(ctx, "must not be null")
  2693  		}
  2694  		return graphql.Null
  2695  	}
  2696  	res := resTmp.([]introspection.InputValue)
  2697  	fc.Result = res
  2698  	return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res)
  2699  }
  2700  
  2701  func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
  2702  	defer func() {
  2703  		if r := recover(); r != nil {
  2704  			ec.Error(ctx, ec.Recover(ctx, r))
  2705  			ret = graphql.Null
  2706  		}
  2707  	}()
  2708  	fc := &graphql.FieldContext{
  2709  		Object:   "__Field",
  2710  		Field:    field,
  2711  		Args:     nil,
  2712  		IsMethod: false,
  2713  	}
  2714  
  2715  	ctx = graphql.WithFieldContext(ctx, fc)
  2716  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
  2717  		ctx = rctx // use context from middleware stack in children
  2718  		return obj.Type, nil
  2719  	})
  2720  	if err != nil {
  2721  		ec.Error(ctx, err)
  2722  		return graphql.Null
  2723  	}
  2724  	if resTmp == nil {
  2725  		if !graphql.HasFieldError(ctx, fc) {
  2726  			ec.Errorf(ctx, "must not be null")
  2727  		}
  2728  		return graphql.Null
  2729  	}
  2730  	res := resTmp.(*introspection.Type)
  2731  	fc.Result = res
  2732  	return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
  2733  }
  2734  
  2735  func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
  2736  	defer func() {
  2737  		if r := recover(); r != nil {
  2738  			ec.Error(ctx, ec.Recover(ctx, r))
  2739  			ret = graphql.Null
  2740  		}
  2741  	}()
  2742  	fc := &graphql.FieldContext{
  2743  		Object:   "__Field",
  2744  		Field:    field,
  2745  		Args:     nil,
  2746  		IsMethod: true,
  2747  	}
  2748  
  2749  	ctx = graphql.WithFieldContext(ctx, fc)
  2750  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
  2751  		ctx = rctx // use context from middleware stack in children
  2752  		return obj.IsDeprecated(), nil
  2753  	})
  2754  	if err != nil {
  2755  		ec.Error(ctx, err)
  2756  		return graphql.Null
  2757  	}
  2758  	if resTmp == nil {
  2759  		if !graphql.HasFieldError(ctx, fc) {
  2760  			ec.Errorf(ctx, "must not be null")
  2761  		}
  2762  		return graphql.Null
  2763  	}
  2764  	res := resTmp.(bool)
  2765  	fc.Result = res
  2766  	return ec.marshalNBoolean2bool(ctx, field.Selections, res)
  2767  }
  2768  
  2769  func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
  2770  	defer func() {
  2771  		if r := recover(); r != nil {
  2772  			ec.Error(ctx, ec.Recover(ctx, r))
  2773  			ret = graphql.Null
  2774  		}
  2775  	}()
  2776  	fc := &graphql.FieldContext{
  2777  		Object:   "__Field",
  2778  		Field:    field,
  2779  		Args:     nil,
  2780  		IsMethod: true,
  2781  	}
  2782  
  2783  	ctx = graphql.WithFieldContext(ctx, fc)
  2784  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
  2785  		ctx = rctx // use context from middleware stack in children
  2786  		return obj.DeprecationReason(), nil
  2787  	})
  2788  	if err != nil {
  2789  		ec.Error(ctx, err)
  2790  		return graphql.Null
  2791  	}
  2792  	if resTmp == nil {
  2793  		return graphql.Null
  2794  	}
  2795  	res := resTmp.(*string)
  2796  	fc.Result = res
  2797  	return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
  2798  }
  2799  
  2800  func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) {
  2801  	defer func() {
  2802  		if r := recover(); r != nil {
  2803  			ec.Error(ctx, ec.Recover(ctx, r))
  2804  			ret = graphql.Null
  2805  		}
  2806  	}()
  2807  	fc := &graphql.FieldContext{
  2808  		Object:   "__InputValue",
  2809  		Field:    field,
  2810  		Args:     nil,
  2811  		IsMethod: false,
  2812  	}
  2813  
  2814  	ctx = graphql.WithFieldContext(ctx, fc)
  2815  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
  2816  		ctx = rctx // use context from middleware stack in children
  2817  		return obj.Name, nil
  2818  	})
  2819  	if err != nil {
  2820  		ec.Error(ctx, err)
  2821  		return graphql.Null
  2822  	}
  2823  	if resTmp == nil {
  2824  		if !graphql.HasFieldError(ctx, fc) {
  2825  			ec.Errorf(ctx, "must not be null")
  2826  		}
  2827  		return graphql.Null
  2828  	}
  2829  	res := resTmp.(string)
  2830  	fc.Result = res
  2831  	return ec.marshalNString2string(ctx, field.Selections, res)
  2832  }
  2833  
  2834  func (ec *executionContext) ___InputValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) {
  2835  	defer func() {
  2836  		if r := recover(); r != nil {
  2837  			ec.Error(ctx, ec.Recover(ctx, r))
  2838  			ret = graphql.Null
  2839  		}
  2840  	}()
  2841  	fc := &graphql.FieldContext{
  2842  		Object:   "__InputValue",
  2843  		Field:    field,
  2844  		Args:     nil,
  2845  		IsMethod: false,
  2846  	}
  2847  
  2848  	ctx = graphql.WithFieldContext(ctx, fc)
  2849  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
  2850  		ctx = rctx // use context from middleware stack in children
  2851  		return obj.Description, nil
  2852  	})
  2853  	if err != nil {
  2854  		ec.Error(ctx, err)
  2855  		return graphql.Null
  2856  	}
  2857  	if resTmp == nil {
  2858  		return graphql.Null
  2859  	}
  2860  	res := resTmp.(string)
  2861  	fc.Result = res
  2862  	return ec.marshalOString2string(ctx, field.Selections, res)
  2863  }
  2864  
  2865  func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) {
  2866  	defer func() {
  2867  		if r := recover(); r != nil {
  2868  			ec.Error(ctx, ec.Recover(ctx, r))
  2869  			ret = graphql.Null
  2870  		}
  2871  	}()
  2872  	fc := &graphql.FieldContext{
  2873  		Object:   "__InputValue",
  2874  		Field:    field,
  2875  		Args:     nil,
  2876  		IsMethod: false,
  2877  	}
  2878  
  2879  	ctx = graphql.WithFieldContext(ctx, fc)
  2880  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
  2881  		ctx = rctx // use context from middleware stack in children
  2882  		return obj.Type, nil
  2883  	})
  2884  	if err != nil {
  2885  		ec.Error(ctx, err)
  2886  		return graphql.Null
  2887  	}
  2888  	if resTmp == nil {
  2889  		if !graphql.HasFieldError(ctx, fc) {
  2890  			ec.Errorf(ctx, "must not be null")
  2891  		}
  2892  		return graphql.Null
  2893  	}
  2894  	res := resTmp.(*introspection.Type)
  2895  	fc.Result = res
  2896  	return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
  2897  }
  2898  
  2899  func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) {
  2900  	defer func() {
  2901  		if r := recover(); r != nil {
  2902  			ec.Error(ctx, ec.Recover(ctx, r))
  2903  			ret = graphql.Null
  2904  		}
  2905  	}()
  2906  	fc := &graphql.FieldContext{
  2907  		Object:   "__InputValue",
  2908  		Field:    field,
  2909  		Args:     nil,
  2910  		IsMethod: false,
  2911  	}
  2912  
  2913  	ctx = graphql.WithFieldContext(ctx, fc)
  2914  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
  2915  		ctx = rctx // use context from middleware stack in children
  2916  		return obj.DefaultValue, nil
  2917  	})
  2918  	if err != nil {
  2919  		ec.Error(ctx, err)
  2920  		return graphql.Null
  2921  	}
  2922  	if resTmp == nil {
  2923  		return graphql.Null
  2924  	}
  2925  	res := resTmp.(*string)
  2926  	fc.Result = res
  2927  	return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
  2928  }
  2929  
  2930  func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
  2931  	defer func() {
  2932  		if r := recover(); r != nil {
  2933  			ec.Error(ctx, ec.Recover(ctx, r))
  2934  			ret = graphql.Null
  2935  		}
  2936  	}()
  2937  	fc := &graphql.FieldContext{
  2938  		Object:   "__Schema",
  2939  		Field:    field,
  2940  		Args:     nil,
  2941  		IsMethod: true,
  2942  	}
  2943  
  2944  	ctx = graphql.WithFieldContext(ctx, fc)
  2945  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
  2946  		ctx = rctx // use context from middleware stack in children
  2947  		return obj.Types(), nil
  2948  	})
  2949  	if err != nil {
  2950  		ec.Error(ctx, err)
  2951  		return graphql.Null
  2952  	}
  2953  	if resTmp == nil {
  2954  		if !graphql.HasFieldError(ctx, fc) {
  2955  			ec.Errorf(ctx, "must not be null")
  2956  		}
  2957  		return graphql.Null
  2958  	}
  2959  	res := resTmp.([]introspection.Type)
  2960  	fc.Result = res
  2961  	return ec.marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res)
  2962  }
  2963  
  2964  func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
  2965  	defer func() {
  2966  		if r := recover(); r != nil {
  2967  			ec.Error(ctx, ec.Recover(ctx, r))
  2968  			ret = graphql.Null
  2969  		}
  2970  	}()
  2971  	fc := &graphql.FieldContext{
  2972  		Object:   "__Schema",
  2973  		Field:    field,
  2974  		Args:     nil,
  2975  		IsMethod: true,
  2976  	}
  2977  
  2978  	ctx = graphql.WithFieldContext(ctx, fc)
  2979  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
  2980  		ctx = rctx // use context from middleware stack in children
  2981  		return obj.QueryType(), nil
  2982  	})
  2983  	if err != nil {
  2984  		ec.Error(ctx, err)
  2985  		return graphql.Null
  2986  	}
  2987  	if resTmp == nil {
  2988  		if !graphql.HasFieldError(ctx, fc) {
  2989  			ec.Errorf(ctx, "must not be null")
  2990  		}
  2991  		return graphql.Null
  2992  	}
  2993  	res := resTmp.(*introspection.Type)
  2994  	fc.Result = res
  2995  	return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
  2996  }
  2997  
  2998  func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
  2999  	defer func() {
  3000  		if r := recover(); r != nil {
  3001  			ec.Error(ctx, ec.Recover(ctx, r))
  3002  			ret = graphql.Null
  3003  		}
  3004  	}()
  3005  	fc := &graphql.FieldContext{
  3006  		Object:   "__Schema",
  3007  		Field:    field,
  3008  		Args:     nil,
  3009  		IsMethod: true,
  3010  	}
  3011  
  3012  	ctx = graphql.WithFieldContext(ctx, fc)
  3013  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
  3014  		ctx = rctx // use context from middleware stack in children
  3015  		return obj.MutationType(), nil
  3016  	})
  3017  	if err != nil {
  3018  		ec.Error(ctx, err)
  3019  		return graphql.Null
  3020  	}
  3021  	if resTmp == nil {
  3022  		return graphql.Null
  3023  	}
  3024  	res := resTmp.(*introspection.Type)
  3025  	fc.Result = res
  3026  	return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
  3027  }
  3028  
  3029  func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
  3030  	defer func() {
  3031  		if r := recover(); r != nil {
  3032  			ec.Error(ctx, ec.Recover(ctx, r))
  3033  			ret = graphql.Null
  3034  		}
  3035  	}()
  3036  	fc := &graphql.FieldContext{
  3037  		Object:   "__Schema",
  3038  		Field:    field,
  3039  		Args:     nil,
  3040  		IsMethod: true,
  3041  	}
  3042  
  3043  	ctx = graphql.WithFieldContext(ctx, fc)
  3044  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
  3045  		ctx = rctx // use context from middleware stack in children
  3046  		return obj.SubscriptionType(), nil
  3047  	})
  3048  	if err != nil {
  3049  		ec.Error(ctx, err)
  3050  		return graphql.Null
  3051  	}
  3052  	if resTmp == nil {
  3053  		return graphql.Null
  3054  	}
  3055  	res := resTmp.(*introspection.Type)
  3056  	fc.Result = res
  3057  	return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
  3058  }
  3059  
  3060  func (ec *executionContext) ___Schema_directives(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
  3061  	defer func() {
  3062  		if r := recover(); r != nil {
  3063  			ec.Error(ctx, ec.Recover(ctx, r))
  3064  			ret = graphql.Null
  3065  		}
  3066  	}()
  3067  	fc := &graphql.FieldContext{
  3068  		Object:   "__Schema",
  3069  		Field:    field,
  3070  		Args:     nil,
  3071  		IsMethod: true,
  3072  	}
  3073  
  3074  	ctx = graphql.WithFieldContext(ctx, fc)
  3075  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
  3076  		ctx = rctx // use context from middleware stack in children
  3077  		return obj.Directives(), nil
  3078  	})
  3079  	if err != nil {
  3080  		ec.Error(ctx, err)
  3081  		return graphql.Null
  3082  	}
  3083  	if resTmp == nil {
  3084  		if !graphql.HasFieldError(ctx, fc) {
  3085  			ec.Errorf(ctx, "must not be null")
  3086  		}
  3087  		return graphql.Null
  3088  	}
  3089  	res := resTmp.([]introspection.Directive)
  3090  	fc.Result = res
  3091  	return ec.marshalN__Directive2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirectiveᚄ(ctx, field.Selections, res)
  3092  }
  3093  
  3094  func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
  3095  	defer func() {
  3096  		if r := recover(); r != nil {
  3097  			ec.Error(ctx, ec.Recover(ctx, r))
  3098  			ret = graphql.Null
  3099  		}
  3100  	}()
  3101  	fc := &graphql.FieldContext{
  3102  		Object:   "__Type",
  3103  		Field:    field,
  3104  		Args:     nil,
  3105  		IsMethod: true,
  3106  	}
  3107  
  3108  	ctx = graphql.WithFieldContext(ctx, fc)
  3109  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
  3110  		ctx = rctx // use context from middleware stack in children
  3111  		return obj.Kind(), nil
  3112  	})
  3113  	if err != nil {
  3114  		ec.Error(ctx, err)
  3115  		return graphql.Null
  3116  	}
  3117  	if resTmp == nil {
  3118  		if !graphql.HasFieldError(ctx, fc) {
  3119  			ec.Errorf(ctx, "must not be null")
  3120  		}
  3121  		return graphql.Null
  3122  	}
  3123  	res := resTmp.(string)
  3124  	fc.Result = res
  3125  	return ec.marshalN__TypeKind2string(ctx, field.Selections, res)
  3126  }
  3127  
  3128  func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
  3129  	defer func() {
  3130  		if r := recover(); r != nil {
  3131  			ec.Error(ctx, ec.Recover(ctx, r))
  3132  			ret = graphql.Null
  3133  		}
  3134  	}()
  3135  	fc := &graphql.FieldContext{
  3136  		Object:   "__Type",
  3137  		Field:    field,
  3138  		Args:     nil,
  3139  		IsMethod: true,
  3140  	}
  3141  
  3142  	ctx = graphql.WithFieldContext(ctx, fc)
  3143  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
  3144  		ctx = rctx // use context from middleware stack in children
  3145  		return obj.Name(), nil
  3146  	})
  3147  	if err != nil {
  3148  		ec.Error(ctx, err)
  3149  		return graphql.Null
  3150  	}
  3151  	if resTmp == nil {
  3152  		return graphql.Null
  3153  	}
  3154  	res := resTmp.(*string)
  3155  	fc.Result = res
  3156  	return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
  3157  }
  3158  
  3159  func (ec *executionContext) ___Type_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
  3160  	defer func() {
  3161  		if r := recover(); r != nil {
  3162  			ec.Error(ctx, ec.Recover(ctx, r))
  3163  			ret = graphql.Null
  3164  		}
  3165  	}()
  3166  	fc := &graphql.FieldContext{
  3167  		Object:   "__Type",
  3168  		Field:    field,
  3169  		Args:     nil,
  3170  		IsMethod: true,
  3171  	}
  3172  
  3173  	ctx = graphql.WithFieldContext(ctx, fc)
  3174  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
  3175  		ctx = rctx // use context from middleware stack in children
  3176  		return obj.Description(), nil
  3177  	})
  3178  	if err != nil {
  3179  		ec.Error(ctx, err)
  3180  		return graphql.Null
  3181  	}
  3182  	if resTmp == nil {
  3183  		return graphql.Null
  3184  	}
  3185  	res := resTmp.(string)
  3186  	fc.Result = res
  3187  	return ec.marshalOString2string(ctx, field.Selections, res)
  3188  }
  3189  
  3190  func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
  3191  	defer func() {
  3192  		if r := recover(); r != nil {
  3193  			ec.Error(ctx, ec.Recover(ctx, r))
  3194  			ret = graphql.Null
  3195  		}
  3196  	}()
  3197  	fc := &graphql.FieldContext{
  3198  		Object:   "__Type",
  3199  		Field:    field,
  3200  		Args:     nil,
  3201  		IsMethod: true,
  3202  	}
  3203  
  3204  	ctx = graphql.WithFieldContext(ctx, fc)
  3205  	rawArgs := field.ArgumentMap(ec.Variables)
  3206  	args, err := ec.field___Type_fields_args(ctx, rawArgs)
  3207  	if err != nil {
  3208  		ec.Error(ctx, err)
  3209  		return graphql.Null
  3210  	}
  3211  	fc.Args = args
  3212  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
  3213  		ctx = rctx // use context from middleware stack in children
  3214  		return obj.Fields(args["includeDeprecated"].(bool)), nil
  3215  	})
  3216  	if err != nil {
  3217  		ec.Error(ctx, err)
  3218  		return graphql.Null
  3219  	}
  3220  	if resTmp == nil {
  3221  		return graphql.Null
  3222  	}
  3223  	res := resTmp.([]introspection.Field)
  3224  	fc.Result = res
  3225  	return ec.marshalO__Field2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐFieldᚄ(ctx, field.Selections, res)
  3226  }
  3227  
  3228  func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
  3229  	defer func() {
  3230  		if r := recover(); r != nil {
  3231  			ec.Error(ctx, ec.Recover(ctx, r))
  3232  			ret = graphql.Null
  3233  		}
  3234  	}()
  3235  	fc := &graphql.FieldContext{
  3236  		Object:   "__Type",
  3237  		Field:    field,
  3238  		Args:     nil,
  3239  		IsMethod: true,
  3240  	}
  3241  
  3242  	ctx = graphql.WithFieldContext(ctx, fc)
  3243  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
  3244  		ctx = rctx // use context from middleware stack in children
  3245  		return obj.Interfaces(), nil
  3246  	})
  3247  	if err != nil {
  3248  		ec.Error(ctx, err)
  3249  		return graphql.Null
  3250  	}
  3251  	if resTmp == nil {
  3252  		return graphql.Null
  3253  	}
  3254  	res := resTmp.([]introspection.Type)
  3255  	fc.Result = res
  3256  	return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res)
  3257  }
  3258  
  3259  func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
  3260  	defer func() {
  3261  		if r := recover(); r != nil {
  3262  			ec.Error(ctx, ec.Recover(ctx, r))
  3263  			ret = graphql.Null
  3264  		}
  3265  	}()
  3266  	fc := &graphql.FieldContext{
  3267  		Object:   "__Type",
  3268  		Field:    field,
  3269  		Args:     nil,
  3270  		IsMethod: true,
  3271  	}
  3272  
  3273  	ctx = graphql.WithFieldContext(ctx, fc)
  3274  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
  3275  		ctx = rctx // use context from middleware stack in children
  3276  		return obj.PossibleTypes(), nil
  3277  	})
  3278  	if err != nil {
  3279  		ec.Error(ctx, err)
  3280  		return graphql.Null
  3281  	}
  3282  	if resTmp == nil {
  3283  		return graphql.Null
  3284  	}
  3285  	res := resTmp.([]introspection.Type)
  3286  	fc.Result = res
  3287  	return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res)
  3288  }
  3289  
  3290  func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
  3291  	defer func() {
  3292  		if r := recover(); r != nil {
  3293  			ec.Error(ctx, ec.Recover(ctx, r))
  3294  			ret = graphql.Null
  3295  		}
  3296  	}()
  3297  	fc := &graphql.FieldContext{
  3298  		Object:   "__Type",
  3299  		Field:    field,
  3300  		Args:     nil,
  3301  		IsMethod: true,
  3302  	}
  3303  
  3304  	ctx = graphql.WithFieldContext(ctx, fc)
  3305  	rawArgs := field.ArgumentMap(ec.Variables)
  3306  	args, err := ec.field___Type_enumValues_args(ctx, rawArgs)
  3307  	if err != nil {
  3308  		ec.Error(ctx, err)
  3309  		return graphql.Null
  3310  	}
  3311  	fc.Args = args
  3312  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
  3313  		ctx = rctx // use context from middleware stack in children
  3314  		return obj.EnumValues(args["includeDeprecated"].(bool)), nil
  3315  	})
  3316  	if err != nil {
  3317  		ec.Error(ctx, err)
  3318  		return graphql.Null
  3319  	}
  3320  	if resTmp == nil {
  3321  		return graphql.Null
  3322  	}
  3323  	res := resTmp.([]introspection.EnumValue)
  3324  	fc.Result = res
  3325  	return ec.marshalO__EnumValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValueᚄ(ctx, field.Selections, res)
  3326  }
  3327  
  3328  func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
  3329  	defer func() {
  3330  		if r := recover(); r != nil {
  3331  			ec.Error(ctx, ec.Recover(ctx, r))
  3332  			ret = graphql.Null
  3333  		}
  3334  	}()
  3335  	fc := &graphql.FieldContext{
  3336  		Object:   "__Type",
  3337  		Field:    field,
  3338  		Args:     nil,
  3339  		IsMethod: true,
  3340  	}
  3341  
  3342  	ctx = graphql.WithFieldContext(ctx, fc)
  3343  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
  3344  		ctx = rctx // use context from middleware stack in children
  3345  		return obj.InputFields(), nil
  3346  	})
  3347  	if err != nil {
  3348  		ec.Error(ctx, err)
  3349  		return graphql.Null
  3350  	}
  3351  	if resTmp == nil {
  3352  		return graphql.Null
  3353  	}
  3354  	res := resTmp.([]introspection.InputValue)
  3355  	fc.Result = res
  3356  	return ec.marshalO__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res)
  3357  }
  3358  
  3359  func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
  3360  	defer func() {
  3361  		if r := recover(); r != nil {
  3362  			ec.Error(ctx, ec.Recover(ctx, r))
  3363  			ret = graphql.Null
  3364  		}
  3365  	}()
  3366  	fc := &graphql.FieldContext{
  3367  		Object:   "__Type",
  3368  		Field:    field,
  3369  		Args:     nil,
  3370  		IsMethod: true,
  3371  	}
  3372  
  3373  	ctx = graphql.WithFieldContext(ctx, fc)
  3374  	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
  3375  		ctx = rctx // use context from middleware stack in children
  3376  		return obj.OfType(), nil
  3377  	})
  3378  	if err != nil {
  3379  		ec.Error(ctx, err)
  3380  		return graphql.Null
  3381  	}
  3382  	if resTmp == nil {
  3383  		return graphql.Null
  3384  	}
  3385  	res := resTmp.(*introspection.Type)
  3386  	fc.Result = res
  3387  	return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
  3388  }
  3389  
  3390  // endregion **************************** field.gotpl *****************************
  3391  
  3392  // region    **************************** input.gotpl *****************************
  3393  
  3394  func (ec *executionContext) unmarshalInputReviewInput(ctx context.Context, obj interface{}) (models.Review, error) {
  3395  	var it models.Review
  3396  	var asMap = obj.(map[string]interface{})
  3397  
  3398  	for k, v := range asMap {
  3399  		switch k {
  3400  		case "stars":
  3401  			var err error
  3402  			it.Stars, err = ec.unmarshalNInt2int(ctx, v)
  3403  			if err != nil {
  3404  				return it, err
  3405  			}
  3406  		case "commentary":
  3407  			var err error
  3408  			it.Commentary, err = ec.unmarshalOString2ᚖstring(ctx, v)
  3409  			if err != nil {
  3410  				return it, err
  3411  			}
  3412  		case "time":
  3413  			var err error
  3414  			it.Time, err = ec.unmarshalOTime2timeᚐTime(ctx, v)
  3415  			if err != nil {
  3416  				return it, err
  3417  			}
  3418  		}
  3419  	}
  3420  
  3421  	return it, nil
  3422  }
  3423  
  3424  // endregion **************************** input.gotpl *****************************
  3425  
  3426  // region    ************************** interface.gotpl ***************************
  3427  
  3428  func (ec *executionContext) _Character(ctx context.Context, sel ast.SelectionSet, obj models.Character) graphql.Marshaler {
  3429  	switch obj := (obj).(type) {
  3430  	case nil:
  3431  		return graphql.Null
  3432  	case models.Human:
  3433  		return ec._Human(ctx, sel, &obj)
  3434  	case *models.Human:
  3435  		if obj == nil {
  3436  			return graphql.Null
  3437  		}
  3438  		return ec._Human(ctx, sel, obj)
  3439  	case models.Droid:
  3440  		return ec._Droid(ctx, sel, &obj)
  3441  	case *models.Droid:
  3442  		if obj == nil {
  3443  			return graphql.Null
  3444  		}
  3445  		return ec._Droid(ctx, sel, obj)
  3446  	default:
  3447  		panic(fmt.Errorf("unexpected type %T", obj))
  3448  	}
  3449  }
  3450  
  3451  func (ec *executionContext) _SearchResult(ctx context.Context, sel ast.SelectionSet, obj models.SearchResult) graphql.Marshaler {
  3452  	switch obj := (obj).(type) {
  3453  	case nil:
  3454  		return graphql.Null
  3455  	case models.Human:
  3456  		return ec._Human(ctx, sel, &obj)
  3457  	case *models.Human:
  3458  		if obj == nil {
  3459  			return graphql.Null
  3460  		}
  3461  		return ec._Human(ctx, sel, obj)
  3462  	case models.Droid:
  3463  		return ec._Droid(ctx, sel, &obj)
  3464  	case *models.Droid:
  3465  		if obj == nil {
  3466  			return graphql.Null
  3467  		}
  3468  		return ec._Droid(ctx, sel, obj)
  3469  	case models.Starship:
  3470  		return ec._Starship(ctx, sel, &obj)
  3471  	case *models.Starship:
  3472  		if obj == nil {
  3473  			return graphql.Null
  3474  		}
  3475  		return ec._Starship(ctx, sel, obj)
  3476  	default:
  3477  		panic(fmt.Errorf("unexpected type %T", obj))
  3478  	}
  3479  }
  3480  
  3481  // endregion ************************** interface.gotpl ***************************
  3482  
  3483  // region    **************************** object.gotpl ****************************
  3484  
  3485  var droidImplementors = []string{"Droid", "Character", "SearchResult"}
  3486  
  3487  func (ec *executionContext) _Droid(ctx context.Context, sel ast.SelectionSet, obj *models.Droid) graphql.Marshaler {
  3488  	fields := graphql.CollectFields(ec.OperationContext, sel, droidImplementors)
  3489  
  3490  	out := graphql.NewFieldSet(fields)
  3491  	var invalids uint32
  3492  	for i, field := range fields {
  3493  		switch field.Name {
  3494  		case "__typename":
  3495  			out.Values[i] = graphql.MarshalString("Droid")
  3496  		case "id":
  3497  			out.Values[i] = ec._Droid_id(ctx, field, obj)
  3498  			if out.Values[i] == graphql.Null {
  3499  				atomic.AddUint32(&invalids, 1)
  3500  			}
  3501  		case "name":
  3502  			out.Values[i] = ec._Droid_name(ctx, field, obj)
  3503  			if out.Values[i] == graphql.Null {
  3504  				atomic.AddUint32(&invalids, 1)
  3505  			}
  3506  		case "friends":
  3507  			field := field
  3508  			out.Concurrently(i, func() (res graphql.Marshaler) {
  3509  				defer func() {
  3510  					if r := recover(); r != nil {
  3511  						ec.Error(ctx, ec.Recover(ctx, r))
  3512  					}
  3513  				}()
  3514  				res = ec._Droid_friends(ctx, field, obj)
  3515  				return res
  3516  			})
  3517  		case "friendsConnection":
  3518  			field := field
  3519  			out.Concurrently(i, func() (res graphql.Marshaler) {
  3520  				defer func() {
  3521  					if r := recover(); r != nil {
  3522  						ec.Error(ctx, ec.Recover(ctx, r))
  3523  					}
  3524  				}()
  3525  				res = ec._Droid_friendsConnection(ctx, field, obj)
  3526  				if res == graphql.Null {
  3527  					atomic.AddUint32(&invalids, 1)
  3528  				}
  3529  				return res
  3530  			})
  3531  		case "appearsIn":
  3532  			out.Values[i] = ec._Droid_appearsIn(ctx, field, obj)
  3533  			if out.Values[i] == graphql.Null {
  3534  				atomic.AddUint32(&invalids, 1)
  3535  			}
  3536  		case "primaryFunction":
  3537  			out.Values[i] = ec._Droid_primaryFunction(ctx, field, obj)
  3538  		default:
  3539  			panic("unknown field " + strconv.Quote(field.Name))
  3540  		}
  3541  	}
  3542  	out.Dispatch()
  3543  	if invalids > 0 {
  3544  		return graphql.Null
  3545  	}
  3546  	return out
  3547  }
  3548  
  3549  var friendsConnectionImplementors = []string{"FriendsConnection"}
  3550  
  3551  func (ec *executionContext) _FriendsConnection(ctx context.Context, sel ast.SelectionSet, obj *models.FriendsConnection) graphql.Marshaler {
  3552  	fields := graphql.CollectFields(ec.OperationContext, sel, friendsConnectionImplementors)
  3553  
  3554  	out := graphql.NewFieldSet(fields)
  3555  	var invalids uint32
  3556  	for i, field := range fields {
  3557  		switch field.Name {
  3558  		case "__typename":
  3559  			out.Values[i] = graphql.MarshalString("FriendsConnection")
  3560  		case "totalCount":
  3561  			out.Values[i] = ec._FriendsConnection_totalCount(ctx, field, obj)
  3562  			if out.Values[i] == graphql.Null {
  3563  				atomic.AddUint32(&invalids, 1)
  3564  			}
  3565  		case "edges":
  3566  			field := field
  3567  			out.Concurrently(i, func() (res graphql.Marshaler) {
  3568  				defer func() {
  3569  					if r := recover(); r != nil {
  3570  						ec.Error(ctx, ec.Recover(ctx, r))
  3571  					}
  3572  				}()
  3573  				res = ec._FriendsConnection_edges(ctx, field, obj)
  3574  				return res
  3575  			})
  3576  		case "friends":
  3577  			field := field
  3578  			out.Concurrently(i, func() (res graphql.Marshaler) {
  3579  				defer func() {
  3580  					if r := recover(); r != nil {
  3581  						ec.Error(ctx, ec.Recover(ctx, r))
  3582  					}
  3583  				}()
  3584  				res = ec._FriendsConnection_friends(ctx, field, obj)
  3585  				return res
  3586  			})
  3587  		case "pageInfo":
  3588  			out.Values[i] = ec._FriendsConnection_pageInfo(ctx, field, obj)
  3589  			if out.Values[i] == graphql.Null {
  3590  				atomic.AddUint32(&invalids, 1)
  3591  			}
  3592  		default:
  3593  			panic("unknown field " + strconv.Quote(field.Name))
  3594  		}
  3595  	}
  3596  	out.Dispatch()
  3597  	if invalids > 0 {
  3598  		return graphql.Null
  3599  	}
  3600  	return out
  3601  }
  3602  
  3603  var friendsEdgeImplementors = []string{"FriendsEdge"}
  3604  
  3605  func (ec *executionContext) _FriendsEdge(ctx context.Context, sel ast.SelectionSet, obj *models.FriendsEdge) graphql.Marshaler {
  3606  	fields := graphql.CollectFields(ec.OperationContext, sel, friendsEdgeImplementors)
  3607  
  3608  	out := graphql.NewFieldSet(fields)
  3609  	var invalids uint32
  3610  	for i, field := range fields {
  3611  		switch field.Name {
  3612  		case "__typename":
  3613  			out.Values[i] = graphql.MarshalString("FriendsEdge")
  3614  		case "cursor":
  3615  			out.Values[i] = ec._FriendsEdge_cursor(ctx, field, obj)
  3616  			if out.Values[i] == graphql.Null {
  3617  				invalids++
  3618  			}
  3619  		case "node":
  3620  			out.Values[i] = ec._FriendsEdge_node(ctx, field, obj)
  3621  		default:
  3622  			panic("unknown field " + strconv.Quote(field.Name))
  3623  		}
  3624  	}
  3625  	out.Dispatch()
  3626  	if invalids > 0 {
  3627  		return graphql.Null
  3628  	}
  3629  	return out
  3630  }
  3631  
  3632  var humanImplementors = []string{"Human", "Character", "SearchResult"}
  3633  
  3634  func (ec *executionContext) _Human(ctx context.Context, sel ast.SelectionSet, obj *models.Human) graphql.Marshaler {
  3635  	fields := graphql.CollectFields(ec.OperationContext, sel, humanImplementors)
  3636  
  3637  	out := graphql.NewFieldSet(fields)
  3638  	var invalids uint32
  3639  	for i, field := range fields {
  3640  		switch field.Name {
  3641  		case "__typename":
  3642  			out.Values[i] = graphql.MarshalString("Human")
  3643  		case "id":
  3644  			out.Values[i] = ec._Human_id(ctx, field, obj)
  3645  			if out.Values[i] == graphql.Null {
  3646  				atomic.AddUint32(&invalids, 1)
  3647  			}
  3648  		case "name":
  3649  			out.Values[i] = ec._Human_name(ctx, field, obj)
  3650  			if out.Values[i] == graphql.Null {
  3651  				atomic.AddUint32(&invalids, 1)
  3652  			}
  3653  		case "height":
  3654  			out.Values[i] = ec._Human_height(ctx, field, obj)
  3655  			if out.Values[i] == graphql.Null {
  3656  				atomic.AddUint32(&invalids, 1)
  3657  			}
  3658  		case "mass":
  3659  			out.Values[i] = ec._Human_mass(ctx, field, obj)
  3660  		case "friends":
  3661  			field := field
  3662  			out.Concurrently(i, func() (res graphql.Marshaler) {
  3663  				defer func() {
  3664  					if r := recover(); r != nil {
  3665  						ec.Error(ctx, ec.Recover(ctx, r))
  3666  					}
  3667  				}()
  3668  				res = ec._Human_friends(ctx, field, obj)
  3669  				return res
  3670  			})
  3671  		case "friendsConnection":
  3672  			field := field
  3673  			out.Concurrently(i, func() (res graphql.Marshaler) {
  3674  				defer func() {
  3675  					if r := recover(); r != nil {
  3676  						ec.Error(ctx, ec.Recover(ctx, r))
  3677  					}
  3678  				}()
  3679  				res = ec._Human_friendsConnection(ctx, field, obj)
  3680  				if res == graphql.Null {
  3681  					atomic.AddUint32(&invalids, 1)
  3682  				}
  3683  				return res
  3684  			})
  3685  		case "appearsIn":
  3686  			out.Values[i] = ec._Human_appearsIn(ctx, field, obj)
  3687  			if out.Values[i] == graphql.Null {
  3688  				atomic.AddUint32(&invalids, 1)
  3689  			}
  3690  		case "starships":
  3691  			field := field
  3692  			out.Concurrently(i, func() (res graphql.Marshaler) {
  3693  				defer func() {
  3694  					if r := recover(); r != nil {
  3695  						ec.Error(ctx, ec.Recover(ctx, r))
  3696  					}
  3697  				}()
  3698  				res = ec._Human_starships(ctx, field, obj)
  3699  				return res
  3700  			})
  3701  		default:
  3702  			panic("unknown field " + strconv.Quote(field.Name))
  3703  		}
  3704  	}
  3705  	out.Dispatch()
  3706  	if invalids > 0 {
  3707  		return graphql.Null
  3708  	}
  3709  	return out
  3710  }
  3711  
  3712  var mutationImplementors = []string{"Mutation"}
  3713  
  3714  func (ec *executionContext) _Mutation(ctx context.Context, sel ast.SelectionSet) graphql.Marshaler {
  3715  	fields := graphql.CollectFields(ec.OperationContext, sel, mutationImplementors)
  3716  
  3717  	ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{
  3718  		Object: "Mutation",
  3719  	})
  3720  
  3721  	out := graphql.NewFieldSet(fields)
  3722  	var invalids uint32
  3723  	for i, field := range fields {
  3724  		switch field.Name {
  3725  		case "__typename":
  3726  			out.Values[i] = graphql.MarshalString("Mutation")
  3727  		case "createReview":
  3728  			out.Values[i] = ec._Mutation_createReview(ctx, field)
  3729  		default:
  3730  			panic("unknown field " + strconv.Quote(field.Name))
  3731  		}
  3732  	}
  3733  	out.Dispatch()
  3734  	if invalids > 0 {
  3735  		return graphql.Null
  3736  	}
  3737  	return out
  3738  }
  3739  
  3740  var pageInfoImplementors = []string{"PageInfo"}
  3741  
  3742  func (ec *executionContext) _PageInfo(ctx context.Context, sel ast.SelectionSet, obj *models.PageInfo) graphql.Marshaler {
  3743  	fields := graphql.CollectFields(ec.OperationContext, sel, pageInfoImplementors)
  3744  
  3745  	out := graphql.NewFieldSet(fields)
  3746  	var invalids uint32
  3747  	for i, field := range fields {
  3748  		switch field.Name {
  3749  		case "__typename":
  3750  			out.Values[i] = graphql.MarshalString("PageInfo")
  3751  		case "startCursor":
  3752  			out.Values[i] = ec._PageInfo_startCursor(ctx, field, obj)
  3753  			if out.Values[i] == graphql.Null {
  3754  				invalids++
  3755  			}
  3756  		case "endCursor":
  3757  			out.Values[i] = ec._PageInfo_endCursor(ctx, field, obj)
  3758  			if out.Values[i] == graphql.Null {
  3759  				invalids++
  3760  			}
  3761  		case "hasNextPage":
  3762  			out.Values[i] = ec._PageInfo_hasNextPage(ctx, field, obj)
  3763  			if out.Values[i] == graphql.Null {
  3764  				invalids++
  3765  			}
  3766  		default:
  3767  			panic("unknown field " + strconv.Quote(field.Name))
  3768  		}
  3769  	}
  3770  	out.Dispatch()
  3771  	if invalids > 0 {
  3772  		return graphql.Null
  3773  	}
  3774  	return out
  3775  }
  3776  
  3777  var queryImplementors = []string{"Query"}
  3778  
  3779  func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) graphql.Marshaler {
  3780  	fields := graphql.CollectFields(ec.OperationContext, sel, queryImplementors)
  3781  
  3782  	ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{
  3783  		Object: "Query",
  3784  	})
  3785  
  3786  	out := graphql.NewFieldSet(fields)
  3787  	var invalids uint32
  3788  	for i, field := range fields {
  3789  		switch field.Name {
  3790  		case "__typename":
  3791  			out.Values[i] = graphql.MarshalString("Query")
  3792  		case "hero":
  3793  			field := field
  3794  			out.Concurrently(i, func() (res graphql.Marshaler) {
  3795  				defer func() {
  3796  					if r := recover(); r != nil {
  3797  						ec.Error(ctx, ec.Recover(ctx, r))
  3798  					}
  3799  				}()
  3800  				res = ec._Query_hero(ctx, field)
  3801  				return res
  3802  			})
  3803  		case "reviews":
  3804  			field := field
  3805  			out.Concurrently(i, func() (res graphql.Marshaler) {
  3806  				defer func() {
  3807  					if r := recover(); r != nil {
  3808  						ec.Error(ctx, ec.Recover(ctx, r))
  3809  					}
  3810  				}()
  3811  				res = ec._Query_reviews(ctx, field)
  3812  				if res == graphql.Null {
  3813  					atomic.AddUint32(&invalids, 1)
  3814  				}
  3815  				return res
  3816  			})
  3817  		case "search":
  3818  			field := field
  3819  			out.Concurrently(i, func() (res graphql.Marshaler) {
  3820  				defer func() {
  3821  					if r := recover(); r != nil {
  3822  						ec.Error(ctx, ec.Recover(ctx, r))
  3823  					}
  3824  				}()
  3825  				res = ec._Query_search(ctx, field)
  3826  				if res == graphql.Null {
  3827  					atomic.AddUint32(&invalids, 1)
  3828  				}
  3829  				return res
  3830  			})
  3831  		case "character":
  3832  			field := field
  3833  			out.Concurrently(i, func() (res graphql.Marshaler) {
  3834  				defer func() {
  3835  					if r := recover(); r != nil {
  3836  						ec.Error(ctx, ec.Recover(ctx, r))
  3837  					}
  3838  				}()
  3839  				res = ec._Query_character(ctx, field)
  3840  				return res
  3841  			})
  3842  		case "droid":
  3843  			field := field
  3844  			out.Concurrently(i, func() (res graphql.Marshaler) {
  3845  				defer func() {
  3846  					if r := recover(); r != nil {
  3847  						ec.Error(ctx, ec.Recover(ctx, r))
  3848  					}
  3849  				}()
  3850  				res = ec._Query_droid(ctx, field)
  3851  				return res
  3852  			})
  3853  		case "human":
  3854  			field := field
  3855  			out.Concurrently(i, func() (res graphql.Marshaler) {
  3856  				defer func() {
  3857  					if r := recover(); r != nil {
  3858  						ec.Error(ctx, ec.Recover(ctx, r))
  3859  					}
  3860  				}()
  3861  				res = ec._Query_human(ctx, field)
  3862  				return res
  3863  			})
  3864  		case "starship":
  3865  			field := field
  3866  			out.Concurrently(i, func() (res graphql.Marshaler) {
  3867  				defer func() {
  3868  					if r := recover(); r != nil {
  3869  						ec.Error(ctx, ec.Recover(ctx, r))
  3870  					}
  3871  				}()
  3872  				res = ec._Query_starship(ctx, field)
  3873  				return res
  3874  			})
  3875  		case "__type":
  3876  			out.Values[i] = ec._Query___type(ctx, field)
  3877  		case "__schema":
  3878  			out.Values[i] = ec._Query___schema(ctx, field)
  3879  		default:
  3880  			panic("unknown field " + strconv.Quote(field.Name))
  3881  		}
  3882  	}
  3883  	out.Dispatch()
  3884  	if invalids > 0 {
  3885  		return graphql.Null
  3886  	}
  3887  	return out
  3888  }
  3889  
  3890  var reviewImplementors = []string{"Review"}
  3891  
  3892  func (ec *executionContext) _Review(ctx context.Context, sel ast.SelectionSet, obj *models.Review) graphql.Marshaler {
  3893  	fields := graphql.CollectFields(ec.OperationContext, sel, reviewImplementors)
  3894  
  3895  	out := graphql.NewFieldSet(fields)
  3896  	var invalids uint32
  3897  	for i, field := range fields {
  3898  		switch field.Name {
  3899  		case "__typename":
  3900  			out.Values[i] = graphql.MarshalString("Review")
  3901  		case "stars":
  3902  			out.Values[i] = ec._Review_stars(ctx, field, obj)
  3903  			if out.Values[i] == graphql.Null {
  3904  				invalids++
  3905  			}
  3906  		case "commentary":
  3907  			out.Values[i] = ec._Review_commentary(ctx, field, obj)
  3908  		case "time":
  3909  			out.Values[i] = ec._Review_time(ctx, field, obj)
  3910  		default:
  3911  			panic("unknown field " + strconv.Quote(field.Name))
  3912  		}
  3913  	}
  3914  	out.Dispatch()
  3915  	if invalids > 0 {
  3916  		return graphql.Null
  3917  	}
  3918  	return out
  3919  }
  3920  
  3921  var starshipImplementors = []string{"Starship", "SearchResult"}
  3922  
  3923  func (ec *executionContext) _Starship(ctx context.Context, sel ast.SelectionSet, obj *models.Starship) graphql.Marshaler {
  3924  	fields := graphql.CollectFields(ec.OperationContext, sel, starshipImplementors)
  3925  
  3926  	out := graphql.NewFieldSet(fields)
  3927  	var invalids uint32
  3928  	for i, field := range fields {
  3929  		switch field.Name {
  3930  		case "__typename":
  3931  			out.Values[i] = graphql.MarshalString("Starship")
  3932  		case "id":
  3933  			out.Values[i] = ec._Starship_id(ctx, field, obj)
  3934  			if out.Values[i] == graphql.Null {
  3935  				atomic.AddUint32(&invalids, 1)
  3936  			}
  3937  		case "name":
  3938  			out.Values[i] = ec._Starship_name(ctx, field, obj)
  3939  			if out.Values[i] == graphql.Null {
  3940  				atomic.AddUint32(&invalids, 1)
  3941  			}
  3942  		case "length":
  3943  			field := field
  3944  			out.Concurrently(i, func() (res graphql.Marshaler) {
  3945  				defer func() {
  3946  					if r := recover(); r != nil {
  3947  						ec.Error(ctx, ec.Recover(ctx, r))
  3948  					}
  3949  				}()
  3950  				res = ec._Starship_length(ctx, field, obj)
  3951  				if res == graphql.Null {
  3952  					atomic.AddUint32(&invalids, 1)
  3953  				}
  3954  				return res
  3955  			})
  3956  		case "history":
  3957  			out.Values[i] = ec._Starship_history(ctx, field, obj)
  3958  			if out.Values[i] == graphql.Null {
  3959  				atomic.AddUint32(&invalids, 1)
  3960  			}
  3961  		default:
  3962  			panic("unknown field " + strconv.Quote(field.Name))
  3963  		}
  3964  	}
  3965  	out.Dispatch()
  3966  	if invalids > 0 {
  3967  		return graphql.Null
  3968  	}
  3969  	return out
  3970  }
  3971  
  3972  var __DirectiveImplementors = []string{"__Directive"}
  3973  
  3974  func (ec *executionContext) ___Directive(ctx context.Context, sel ast.SelectionSet, obj *introspection.Directive) graphql.Marshaler {
  3975  	fields := graphql.CollectFields(ec.OperationContext, sel, __DirectiveImplementors)
  3976  
  3977  	out := graphql.NewFieldSet(fields)
  3978  	var invalids uint32
  3979  	for i, field := range fields {
  3980  		switch field.Name {
  3981  		case "__typename":
  3982  			out.Values[i] = graphql.MarshalString("__Directive")
  3983  		case "name":
  3984  			out.Values[i] = ec.___Directive_name(ctx, field, obj)
  3985  			if out.Values[i] == graphql.Null {
  3986  				invalids++
  3987  			}
  3988  		case "description":
  3989  			out.Values[i] = ec.___Directive_description(ctx, field, obj)
  3990  		case "locations":
  3991  			out.Values[i] = ec.___Directive_locations(ctx, field, obj)
  3992  			if out.Values[i] == graphql.Null {
  3993  				invalids++
  3994  			}
  3995  		case "args":
  3996  			out.Values[i] = ec.___Directive_args(ctx, field, obj)
  3997  			if out.Values[i] == graphql.Null {
  3998  				invalids++
  3999  			}
  4000  		default:
  4001  			panic("unknown field " + strconv.Quote(field.Name))
  4002  		}
  4003  	}
  4004  	out.Dispatch()
  4005  	if invalids > 0 {
  4006  		return graphql.Null
  4007  	}
  4008  	return out
  4009  }
  4010  
  4011  var __EnumValueImplementors = []string{"__EnumValue"}
  4012  
  4013  func (ec *executionContext) ___EnumValue(ctx context.Context, sel ast.SelectionSet, obj *introspection.EnumValue) graphql.Marshaler {
  4014  	fields := graphql.CollectFields(ec.OperationContext, sel, __EnumValueImplementors)
  4015  
  4016  	out := graphql.NewFieldSet(fields)
  4017  	var invalids uint32
  4018  	for i, field := range fields {
  4019  		switch field.Name {
  4020  		case "__typename":
  4021  			out.Values[i] = graphql.MarshalString("__EnumValue")
  4022  		case "name":
  4023  			out.Values[i] = ec.___EnumValue_name(ctx, field, obj)
  4024  			if out.Values[i] == graphql.Null {
  4025  				invalids++
  4026  			}
  4027  		case "description":
  4028  			out.Values[i] = ec.___EnumValue_description(ctx, field, obj)
  4029  		case "isDeprecated":
  4030  			out.Values[i] = ec.___EnumValue_isDeprecated(ctx, field, obj)
  4031  			if out.Values[i] == graphql.Null {
  4032  				invalids++
  4033  			}
  4034  		case "deprecationReason":
  4035  			out.Values[i] = ec.___EnumValue_deprecationReason(ctx, field, obj)
  4036  		default:
  4037  			panic("unknown field " + strconv.Quote(field.Name))
  4038  		}
  4039  	}
  4040  	out.Dispatch()
  4041  	if invalids > 0 {
  4042  		return graphql.Null
  4043  	}
  4044  	return out
  4045  }
  4046  
  4047  var __FieldImplementors = []string{"__Field"}
  4048  
  4049  func (ec *executionContext) ___Field(ctx context.Context, sel ast.SelectionSet, obj *introspection.Field) graphql.Marshaler {
  4050  	fields := graphql.CollectFields(ec.OperationContext, sel, __FieldImplementors)
  4051  
  4052  	out := graphql.NewFieldSet(fields)
  4053  	var invalids uint32
  4054  	for i, field := range fields {
  4055  		switch field.Name {
  4056  		case "__typename":
  4057  			out.Values[i] = graphql.MarshalString("__Field")
  4058  		case "name":
  4059  			out.Values[i] = ec.___Field_name(ctx, field, obj)
  4060  			if out.Values[i] == graphql.Null {
  4061  				invalids++
  4062  			}
  4063  		case "description":
  4064  			out.Values[i] = ec.___Field_description(ctx, field, obj)
  4065  		case "args":
  4066  			out.Values[i] = ec.___Field_args(ctx, field, obj)
  4067  			if out.Values[i] == graphql.Null {
  4068  				invalids++
  4069  			}
  4070  		case "type":
  4071  			out.Values[i] = ec.___Field_type(ctx, field, obj)
  4072  			if out.Values[i] == graphql.Null {
  4073  				invalids++
  4074  			}
  4075  		case "isDeprecated":
  4076  			out.Values[i] = ec.___Field_isDeprecated(ctx, field, obj)
  4077  			if out.Values[i] == graphql.Null {
  4078  				invalids++
  4079  			}
  4080  		case "deprecationReason":
  4081  			out.Values[i] = ec.___Field_deprecationReason(ctx, field, obj)
  4082  		default:
  4083  			panic("unknown field " + strconv.Quote(field.Name))
  4084  		}
  4085  	}
  4086  	out.Dispatch()
  4087  	if invalids > 0 {
  4088  		return graphql.Null
  4089  	}
  4090  	return out
  4091  }
  4092  
  4093  var __InputValueImplementors = []string{"__InputValue"}
  4094  
  4095  func (ec *executionContext) ___InputValue(ctx context.Context, sel ast.SelectionSet, obj *introspection.InputValue) graphql.Marshaler {
  4096  	fields := graphql.CollectFields(ec.OperationContext, sel, __InputValueImplementors)
  4097  
  4098  	out := graphql.NewFieldSet(fields)
  4099  	var invalids uint32
  4100  	for i, field := range fields {
  4101  		switch field.Name {
  4102  		case "__typename":
  4103  			out.Values[i] = graphql.MarshalString("__InputValue")
  4104  		case "name":
  4105  			out.Values[i] = ec.___InputValue_name(ctx, field, obj)
  4106  			if out.Values[i] == graphql.Null {
  4107  				invalids++
  4108  			}
  4109  		case "description":
  4110  			out.Values[i] = ec.___InputValue_description(ctx, field, obj)
  4111  		case "type":
  4112  			out.Values[i] = ec.___InputValue_type(ctx, field, obj)
  4113  			if out.Values[i] == graphql.Null {
  4114  				invalids++
  4115  			}
  4116  		case "defaultValue":
  4117  			out.Values[i] = ec.___InputValue_defaultValue(ctx, field, obj)
  4118  		default:
  4119  			panic("unknown field " + strconv.Quote(field.Name))
  4120  		}
  4121  	}
  4122  	out.Dispatch()
  4123  	if invalids > 0 {
  4124  		return graphql.Null
  4125  	}
  4126  	return out
  4127  }
  4128  
  4129  var __SchemaImplementors = []string{"__Schema"}
  4130  
  4131  func (ec *executionContext) ___Schema(ctx context.Context, sel ast.SelectionSet, obj *introspection.Schema) graphql.Marshaler {
  4132  	fields := graphql.CollectFields(ec.OperationContext, sel, __SchemaImplementors)
  4133  
  4134  	out := graphql.NewFieldSet(fields)
  4135  	var invalids uint32
  4136  	for i, field := range fields {
  4137  		switch field.Name {
  4138  		case "__typename":
  4139  			out.Values[i] = graphql.MarshalString("__Schema")
  4140  		case "types":
  4141  			out.Values[i] = ec.___Schema_types(ctx, field, obj)
  4142  			if out.Values[i] == graphql.Null {
  4143  				invalids++
  4144  			}
  4145  		case "queryType":
  4146  			out.Values[i] = ec.___Schema_queryType(ctx, field, obj)
  4147  			if out.Values[i] == graphql.Null {
  4148  				invalids++
  4149  			}
  4150  		case "mutationType":
  4151  			out.Values[i] = ec.___Schema_mutationType(ctx, field, obj)
  4152  		case "subscriptionType":
  4153  			out.Values[i] = ec.___Schema_subscriptionType(ctx, field, obj)
  4154  		case "directives":
  4155  			out.Values[i] = ec.___Schema_directives(ctx, field, obj)
  4156  			if out.Values[i] == graphql.Null {
  4157  				invalids++
  4158  			}
  4159  		default:
  4160  			panic("unknown field " + strconv.Quote(field.Name))
  4161  		}
  4162  	}
  4163  	out.Dispatch()
  4164  	if invalids > 0 {
  4165  		return graphql.Null
  4166  	}
  4167  	return out
  4168  }
  4169  
  4170  var __TypeImplementors = []string{"__Type"}
  4171  
  4172  func (ec *executionContext) ___Type(ctx context.Context, sel ast.SelectionSet, obj *introspection.Type) graphql.Marshaler {
  4173  	fields := graphql.CollectFields(ec.OperationContext, sel, __TypeImplementors)
  4174  
  4175  	out := graphql.NewFieldSet(fields)
  4176  	var invalids uint32
  4177  	for i, field := range fields {
  4178  		switch field.Name {
  4179  		case "__typename":
  4180  			out.Values[i] = graphql.MarshalString("__Type")
  4181  		case "kind":
  4182  			out.Values[i] = ec.___Type_kind(ctx, field, obj)
  4183  			if out.Values[i] == graphql.Null {
  4184  				invalids++
  4185  			}
  4186  		case "name":
  4187  			out.Values[i] = ec.___Type_name(ctx, field, obj)
  4188  		case "description":
  4189  			out.Values[i] = ec.___Type_description(ctx, field, obj)
  4190  		case "fields":
  4191  			out.Values[i] = ec.___Type_fields(ctx, field, obj)
  4192  		case "interfaces":
  4193  			out.Values[i] = ec.___Type_interfaces(ctx, field, obj)
  4194  		case "possibleTypes":
  4195  			out.Values[i] = ec.___Type_possibleTypes(ctx, field, obj)
  4196  		case "enumValues":
  4197  			out.Values[i] = ec.___Type_enumValues(ctx, field, obj)
  4198  		case "inputFields":
  4199  			out.Values[i] = ec.___Type_inputFields(ctx, field, obj)
  4200  		case "ofType":
  4201  			out.Values[i] = ec.___Type_ofType(ctx, field, obj)
  4202  		default:
  4203  			panic("unknown field " + strconv.Quote(field.Name))
  4204  		}
  4205  	}
  4206  	out.Dispatch()
  4207  	if invalids > 0 {
  4208  		return graphql.Null
  4209  	}
  4210  	return out
  4211  }
  4212  
  4213  // endregion **************************** object.gotpl ****************************
  4214  
  4215  // region    ***************************** type.gotpl *****************************
  4216  
  4217  func (ec *executionContext) unmarshalNBoolean2bool(ctx context.Context, v interface{}) (bool, error) {
  4218  	return graphql.UnmarshalBoolean(v)
  4219  }
  4220  
  4221  func (ec *executionContext) marshalNBoolean2bool(ctx context.Context, sel ast.SelectionSet, v bool) graphql.Marshaler {
  4222  	res := graphql.MarshalBoolean(v)
  4223  	if res == graphql.Null {
  4224  		if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
  4225  			ec.Errorf(ctx, "must not be null")
  4226  		}
  4227  	}
  4228  	return res
  4229  }
  4230  
  4231  func (ec *executionContext) marshalNCharacter2githubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋstarwarsᚋmodelsᚐCharacter(ctx context.Context, sel ast.SelectionSet, v models.Character) graphql.Marshaler {
  4232  	if v == nil {
  4233  		if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
  4234  			ec.Errorf(ctx, "must not be null")
  4235  		}
  4236  		return graphql.Null
  4237  	}
  4238  	return ec._Character(ctx, sel, v)
  4239  }
  4240  
  4241  func (ec *executionContext) unmarshalNEpisode2githubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋstarwarsᚋmodelsᚐEpisode(ctx context.Context, v interface{}) (models.Episode, error) {
  4242  	var res models.Episode
  4243  	return res, res.UnmarshalGQL(v)
  4244  }
  4245  
  4246  func (ec *executionContext) marshalNEpisode2githubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋstarwarsᚋmodelsᚐEpisode(ctx context.Context, sel ast.SelectionSet, v models.Episode) graphql.Marshaler {
  4247  	return v
  4248  }
  4249  
  4250  func (ec *executionContext) unmarshalNEpisode2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋstarwarsᚋmodelsᚐEpisodeᚄ(ctx context.Context, v interface{}) ([]models.Episode, error) {
  4251  	var vSlice []interface{}
  4252  	if v != nil {
  4253  		if tmp1, ok := v.([]interface{}); ok {
  4254  			vSlice = tmp1
  4255  		} else {
  4256  			vSlice = []interface{}{v}
  4257  		}
  4258  	}
  4259  	var err error
  4260  	res := make([]models.Episode, len(vSlice))
  4261  	for i := range vSlice {
  4262  		res[i], err = ec.unmarshalNEpisode2githubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋstarwarsᚋmodelsᚐEpisode(ctx, vSlice[i])
  4263  		if err != nil {
  4264  			return nil, err
  4265  		}
  4266  	}
  4267  	return res, nil
  4268  }
  4269  
  4270  func (ec *executionContext) marshalNEpisode2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋstarwarsᚋmodelsᚐEpisodeᚄ(ctx context.Context, sel ast.SelectionSet, v []models.Episode) graphql.Marshaler {
  4271  	ret := make(graphql.Array, len(v))
  4272  	var wg sync.WaitGroup
  4273  	isLen1 := len(v) == 1
  4274  	if !isLen1 {
  4275  		wg.Add(len(v))
  4276  	}
  4277  	for i := range v {
  4278  		i := i
  4279  		fc := &graphql.FieldContext{
  4280  			Index:  &i,
  4281  			Result: &v[i],
  4282  		}
  4283  		ctx := graphql.WithFieldContext(ctx, fc)
  4284  		f := func(i int) {
  4285  			defer func() {
  4286  				if r := recover(); r != nil {
  4287  					ec.Error(ctx, ec.Recover(ctx, r))
  4288  					ret = nil
  4289  				}
  4290  			}()
  4291  			if !isLen1 {
  4292  				defer wg.Done()
  4293  			}
  4294  			ret[i] = ec.marshalNEpisode2githubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋstarwarsᚋmodelsᚐEpisode(ctx, sel, v[i])
  4295  		}
  4296  		if isLen1 {
  4297  			f(i)
  4298  		} else {
  4299  			go f(i)
  4300  		}
  4301  
  4302  	}
  4303  	wg.Wait()
  4304  	return ret
  4305  }
  4306  
  4307  func (ec *executionContext) unmarshalNFloat2float64(ctx context.Context, v interface{}) (float64, error) {
  4308  	return graphql.UnmarshalFloat(v)
  4309  }
  4310  
  4311  func (ec *executionContext) marshalNFloat2float64(ctx context.Context, sel ast.SelectionSet, v float64) graphql.Marshaler {
  4312  	res := graphql.MarshalFloat(v)
  4313  	if res == graphql.Null {
  4314  		if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
  4315  			ec.Errorf(ctx, "must not be null")
  4316  		}
  4317  	}
  4318  	return res
  4319  }
  4320  
  4321  func (ec *executionContext) marshalNFriendsConnection2githubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋstarwarsᚋmodelsᚐFriendsConnection(ctx context.Context, sel ast.SelectionSet, v models.FriendsConnection) graphql.Marshaler {
  4322  	return ec._FriendsConnection(ctx, sel, &v)
  4323  }
  4324  
  4325  func (ec *executionContext) marshalNFriendsConnection2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋstarwarsᚋmodelsᚐFriendsConnection(ctx context.Context, sel ast.SelectionSet, v *models.FriendsConnection) graphql.Marshaler {
  4326  	if v == nil {
  4327  		if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
  4328  			ec.Errorf(ctx, "must not be null")
  4329  		}
  4330  		return graphql.Null
  4331  	}
  4332  	return ec._FriendsConnection(ctx, sel, v)
  4333  }
  4334  
  4335  func (ec *executionContext) marshalNFriendsEdge2githubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋstarwarsᚋmodelsᚐFriendsEdge(ctx context.Context, sel ast.SelectionSet, v models.FriendsEdge) graphql.Marshaler {
  4336  	return ec._FriendsEdge(ctx, sel, &v)
  4337  }
  4338  
  4339  func (ec *executionContext) marshalNFriendsEdge2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋstarwarsᚋmodelsᚐFriendsEdge(ctx context.Context, sel ast.SelectionSet, v *models.FriendsEdge) graphql.Marshaler {
  4340  	if v == nil {
  4341  		if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
  4342  			ec.Errorf(ctx, "must not be null")
  4343  		}
  4344  		return graphql.Null
  4345  	}
  4346  	return ec._FriendsEdge(ctx, sel, v)
  4347  }
  4348  
  4349  func (ec *executionContext) unmarshalNID2string(ctx context.Context, v interface{}) (string, error) {
  4350  	return graphql.UnmarshalID(v)
  4351  }
  4352  
  4353  func (ec *executionContext) marshalNID2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler {
  4354  	res := graphql.MarshalID(v)
  4355  	if res == graphql.Null {
  4356  		if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
  4357  			ec.Errorf(ctx, "must not be null")
  4358  		}
  4359  	}
  4360  	return res
  4361  }
  4362  
  4363  func (ec *executionContext) unmarshalNInt2int(ctx context.Context, v interface{}) (int, error) {
  4364  	return graphql.UnmarshalInt(v)
  4365  }
  4366  
  4367  func (ec *executionContext) marshalNInt2int(ctx context.Context, sel ast.SelectionSet, v int) graphql.Marshaler {
  4368  	res := graphql.MarshalInt(v)
  4369  	if res == graphql.Null {
  4370  		if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
  4371  			ec.Errorf(ctx, "must not be null")
  4372  		}
  4373  	}
  4374  	return res
  4375  }
  4376  
  4377  func (ec *executionContext) unmarshalNInt2ᚕintᚄ(ctx context.Context, v interface{}) ([]int, error) {
  4378  	var vSlice []interface{}
  4379  	if v != nil {
  4380  		if tmp1, ok := v.([]interface{}); ok {
  4381  			vSlice = tmp1
  4382  		} else {
  4383  			vSlice = []interface{}{v}
  4384  		}
  4385  	}
  4386  	var err error
  4387  	res := make([]int, len(vSlice))
  4388  	for i := range vSlice {
  4389  		res[i], err = ec.unmarshalNInt2int(ctx, vSlice[i])
  4390  		if err != nil {
  4391  			return nil, err
  4392  		}
  4393  	}
  4394  	return res, nil
  4395  }
  4396  
  4397  func (ec *executionContext) marshalNInt2ᚕintᚄ(ctx context.Context, sel ast.SelectionSet, v []int) graphql.Marshaler {
  4398  	ret := make(graphql.Array, len(v))
  4399  	for i := range v {
  4400  		ret[i] = ec.marshalNInt2int(ctx, sel, v[i])
  4401  	}
  4402  
  4403  	return ret
  4404  }
  4405  
  4406  func (ec *executionContext) unmarshalNInt2ᚕᚕintᚄ(ctx context.Context, v interface{}) ([][]int, error) {
  4407  	var vSlice []interface{}
  4408  	if v != nil {
  4409  		if tmp1, ok := v.([]interface{}); ok {
  4410  			vSlice = tmp1
  4411  		} else {
  4412  			vSlice = []interface{}{v}
  4413  		}
  4414  	}
  4415  	var err error
  4416  	res := make([][]int, len(vSlice))
  4417  	for i := range vSlice {
  4418  		res[i], err = ec.unmarshalNInt2ᚕintᚄ(ctx, vSlice[i])
  4419  		if err != nil {
  4420  			return nil, err
  4421  		}
  4422  	}
  4423  	return res, nil
  4424  }
  4425  
  4426  func (ec *executionContext) marshalNInt2ᚕᚕintᚄ(ctx context.Context, sel ast.SelectionSet, v [][]int) graphql.Marshaler {
  4427  	ret := make(graphql.Array, len(v))
  4428  	for i := range v {
  4429  		ret[i] = ec.marshalNInt2ᚕintᚄ(ctx, sel, v[i])
  4430  	}
  4431  
  4432  	return ret
  4433  }
  4434  
  4435  func (ec *executionContext) marshalNPageInfo2githubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋstarwarsᚋmodelsᚐPageInfo(ctx context.Context, sel ast.SelectionSet, v models.PageInfo) graphql.Marshaler {
  4436  	return ec._PageInfo(ctx, sel, &v)
  4437  }
  4438  
  4439  func (ec *executionContext) marshalNReview2githubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋstarwarsᚋmodelsᚐReview(ctx context.Context, sel ast.SelectionSet, v models.Review) graphql.Marshaler {
  4440  	return ec._Review(ctx, sel, &v)
  4441  }
  4442  
  4443  func (ec *executionContext) marshalNReview2ᚕᚖgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋstarwarsᚋmodelsᚐReviewᚄ(ctx context.Context, sel ast.SelectionSet, v []*models.Review) graphql.Marshaler {
  4444  	ret := make(graphql.Array, len(v))
  4445  	var wg sync.WaitGroup
  4446  	isLen1 := len(v) == 1
  4447  	if !isLen1 {
  4448  		wg.Add(len(v))
  4449  	}
  4450  	for i := range v {
  4451  		i := i
  4452  		fc := &graphql.FieldContext{
  4453  			Index:  &i,
  4454  			Result: &v[i],
  4455  		}
  4456  		ctx := graphql.WithFieldContext(ctx, fc)
  4457  		f := func(i int) {
  4458  			defer func() {
  4459  				if r := recover(); r != nil {
  4460  					ec.Error(ctx, ec.Recover(ctx, r))
  4461  					ret = nil
  4462  				}
  4463  			}()
  4464  			if !isLen1 {
  4465  				defer wg.Done()
  4466  			}
  4467  			ret[i] = ec.marshalNReview2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋstarwarsᚋmodelsᚐReview(ctx, sel, v[i])
  4468  		}
  4469  		if isLen1 {
  4470  			f(i)
  4471  		} else {
  4472  			go f(i)
  4473  		}
  4474  
  4475  	}
  4476  	wg.Wait()
  4477  	return ret
  4478  }
  4479  
  4480  func (ec *executionContext) marshalNReview2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋstarwarsᚋmodelsᚐReview(ctx context.Context, sel ast.SelectionSet, v *models.Review) graphql.Marshaler {
  4481  	if v == nil {
  4482  		if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
  4483  			ec.Errorf(ctx, "must not be null")
  4484  		}
  4485  		return graphql.Null
  4486  	}
  4487  	return ec._Review(ctx, sel, v)
  4488  }
  4489  
  4490  func (ec *executionContext) unmarshalNReviewInput2githubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋstarwarsᚋmodelsᚐReview(ctx context.Context, v interface{}) (models.Review, error) {
  4491  	return ec.unmarshalInputReviewInput(ctx, v)
  4492  }
  4493  
  4494  func (ec *executionContext) marshalNSearchResult2githubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋstarwarsᚋmodelsᚐSearchResult(ctx context.Context, sel ast.SelectionSet, v models.SearchResult) graphql.Marshaler {
  4495  	if v == nil {
  4496  		if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
  4497  			ec.Errorf(ctx, "must not be null")
  4498  		}
  4499  		return graphql.Null
  4500  	}
  4501  	return ec._SearchResult(ctx, sel, v)
  4502  }
  4503  
  4504  func (ec *executionContext) marshalNSearchResult2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋstarwarsᚋmodelsᚐSearchResultᚄ(ctx context.Context, sel ast.SelectionSet, v []models.SearchResult) graphql.Marshaler {
  4505  	ret := make(graphql.Array, len(v))
  4506  	var wg sync.WaitGroup
  4507  	isLen1 := len(v) == 1
  4508  	if !isLen1 {
  4509  		wg.Add(len(v))
  4510  	}
  4511  	for i := range v {
  4512  		i := i
  4513  		fc := &graphql.FieldContext{
  4514  			Index:  &i,
  4515  			Result: &v[i],
  4516  		}
  4517  		ctx := graphql.WithFieldContext(ctx, fc)
  4518  		f := func(i int) {
  4519  			defer func() {
  4520  				if r := recover(); r != nil {
  4521  					ec.Error(ctx, ec.Recover(ctx, r))
  4522  					ret = nil
  4523  				}
  4524  			}()
  4525  			if !isLen1 {
  4526  				defer wg.Done()
  4527  			}
  4528  			ret[i] = ec.marshalNSearchResult2githubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋstarwarsᚋmodelsᚐSearchResult(ctx, sel, v[i])
  4529  		}
  4530  		if isLen1 {
  4531  			f(i)
  4532  		} else {
  4533  			go f(i)
  4534  		}
  4535  
  4536  	}
  4537  	wg.Wait()
  4538  	return ret
  4539  }
  4540  
  4541  func (ec *executionContext) marshalNStarship2githubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋstarwarsᚋmodelsᚐStarship(ctx context.Context, sel ast.SelectionSet, v models.Starship) graphql.Marshaler {
  4542  	return ec._Starship(ctx, sel, &v)
  4543  }
  4544  
  4545  func (ec *executionContext) marshalNStarship2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋstarwarsᚋmodelsᚐStarship(ctx context.Context, sel ast.SelectionSet, v *models.Starship) graphql.Marshaler {
  4546  	if v == nil {
  4547  		if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
  4548  			ec.Errorf(ctx, "must not be null")
  4549  		}
  4550  		return graphql.Null
  4551  	}
  4552  	return ec._Starship(ctx, sel, v)
  4553  }
  4554  
  4555  func (ec *executionContext) unmarshalNString2string(ctx context.Context, v interface{}) (string, error) {
  4556  	return graphql.UnmarshalString(v)
  4557  }
  4558  
  4559  func (ec *executionContext) marshalNString2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler {
  4560  	res := graphql.MarshalString(v)
  4561  	if res == graphql.Null {
  4562  		if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
  4563  			ec.Errorf(ctx, "must not be null")
  4564  		}
  4565  	}
  4566  	return res
  4567  }
  4568  
  4569  func (ec *executionContext) marshalN__Directive2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirective(ctx context.Context, sel ast.SelectionSet, v introspection.Directive) graphql.Marshaler {
  4570  	return ec.___Directive(ctx, sel, &v)
  4571  }
  4572  
  4573  func (ec *executionContext) marshalN__Directive2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirectiveᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Directive) graphql.Marshaler {
  4574  	ret := make(graphql.Array, len(v))
  4575  	var wg sync.WaitGroup
  4576  	isLen1 := len(v) == 1
  4577  	if !isLen1 {
  4578  		wg.Add(len(v))
  4579  	}
  4580  	for i := range v {
  4581  		i := i
  4582  		fc := &graphql.FieldContext{
  4583  			Index:  &i,
  4584  			Result: &v[i],
  4585  		}
  4586  		ctx := graphql.WithFieldContext(ctx, fc)
  4587  		f := func(i int) {
  4588  			defer func() {
  4589  				if r := recover(); r != nil {
  4590  					ec.Error(ctx, ec.Recover(ctx, r))
  4591  					ret = nil
  4592  				}
  4593  			}()
  4594  			if !isLen1 {
  4595  				defer wg.Done()
  4596  			}
  4597  			ret[i] = ec.marshalN__Directive2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirective(ctx, sel, v[i])
  4598  		}
  4599  		if isLen1 {
  4600  			f(i)
  4601  		} else {
  4602  			go f(i)
  4603  		}
  4604  
  4605  	}
  4606  	wg.Wait()
  4607  	return ret
  4608  }
  4609  
  4610  func (ec *executionContext) unmarshalN__DirectiveLocation2string(ctx context.Context, v interface{}) (string, error) {
  4611  	return graphql.UnmarshalString(v)
  4612  }
  4613  
  4614  func (ec *executionContext) marshalN__DirectiveLocation2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler {
  4615  	res := graphql.MarshalString(v)
  4616  	if res == graphql.Null {
  4617  		if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
  4618  			ec.Errorf(ctx, "must not be null")
  4619  		}
  4620  	}
  4621  	return res
  4622  }
  4623  
  4624  func (ec *executionContext) unmarshalN__DirectiveLocation2ᚕstringᚄ(ctx context.Context, v interface{}) ([]string, error) {
  4625  	var vSlice []interface{}
  4626  	if v != nil {
  4627  		if tmp1, ok := v.([]interface{}); ok {
  4628  			vSlice = tmp1
  4629  		} else {
  4630  			vSlice = []interface{}{v}
  4631  		}
  4632  	}
  4633  	var err error
  4634  	res := make([]string, len(vSlice))
  4635  	for i := range vSlice {
  4636  		res[i], err = ec.unmarshalN__DirectiveLocation2string(ctx, vSlice[i])
  4637  		if err != nil {
  4638  			return nil, err
  4639  		}
  4640  	}
  4641  	return res, nil
  4642  }
  4643  
  4644  func (ec *executionContext) marshalN__DirectiveLocation2ᚕstringᚄ(ctx context.Context, sel ast.SelectionSet, v []string) graphql.Marshaler {
  4645  	ret := make(graphql.Array, len(v))
  4646  	var wg sync.WaitGroup
  4647  	isLen1 := len(v) == 1
  4648  	if !isLen1 {
  4649  		wg.Add(len(v))
  4650  	}
  4651  	for i := range v {
  4652  		i := i
  4653  		fc := &graphql.FieldContext{
  4654  			Index:  &i,
  4655  			Result: &v[i],
  4656  		}
  4657  		ctx := graphql.WithFieldContext(ctx, fc)
  4658  		f := func(i int) {
  4659  			defer func() {
  4660  				if r := recover(); r != nil {
  4661  					ec.Error(ctx, ec.Recover(ctx, r))
  4662  					ret = nil
  4663  				}
  4664  			}()
  4665  			if !isLen1 {
  4666  				defer wg.Done()
  4667  			}
  4668  			ret[i] = ec.marshalN__DirectiveLocation2string(ctx, sel, v[i])
  4669  		}
  4670  		if isLen1 {
  4671  			f(i)
  4672  		} else {
  4673  			go f(i)
  4674  		}
  4675  
  4676  	}
  4677  	wg.Wait()
  4678  	return ret
  4679  }
  4680  
  4681  func (ec *executionContext) marshalN__EnumValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValue(ctx context.Context, sel ast.SelectionSet, v introspection.EnumValue) graphql.Marshaler {
  4682  	return ec.___EnumValue(ctx, sel, &v)
  4683  }
  4684  
  4685  func (ec *executionContext) marshalN__Field2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐField(ctx context.Context, sel ast.SelectionSet, v introspection.Field) graphql.Marshaler {
  4686  	return ec.___Field(ctx, sel, &v)
  4687  }
  4688  
  4689  func (ec *executionContext) marshalN__InputValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx context.Context, sel ast.SelectionSet, v introspection.InputValue) graphql.Marshaler {
  4690  	return ec.___InputValue(ctx, sel, &v)
  4691  }
  4692  
  4693  func (ec *executionContext) marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.InputValue) graphql.Marshaler {
  4694  	ret := make(graphql.Array, len(v))
  4695  	var wg sync.WaitGroup
  4696  	isLen1 := len(v) == 1
  4697  	if !isLen1 {
  4698  		wg.Add(len(v))
  4699  	}
  4700  	for i := range v {
  4701  		i := i
  4702  		fc := &graphql.FieldContext{
  4703  			Index:  &i,
  4704  			Result: &v[i],
  4705  		}
  4706  		ctx := graphql.WithFieldContext(ctx, fc)
  4707  		f := func(i int) {
  4708  			defer func() {
  4709  				if r := recover(); r != nil {
  4710  					ec.Error(ctx, ec.Recover(ctx, r))
  4711  					ret = nil
  4712  				}
  4713  			}()
  4714  			if !isLen1 {
  4715  				defer wg.Done()
  4716  			}
  4717  			ret[i] = ec.marshalN__InputValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx, sel, v[i])
  4718  		}
  4719  		if isLen1 {
  4720  			f(i)
  4721  		} else {
  4722  			go f(i)
  4723  		}
  4724  
  4725  	}
  4726  	wg.Wait()
  4727  	return ret
  4728  }
  4729  
  4730  func (ec *executionContext) marshalN__Type2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v introspection.Type) graphql.Marshaler {
  4731  	return ec.___Type(ctx, sel, &v)
  4732  }
  4733  
  4734  func (ec *executionContext) marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Type) graphql.Marshaler {
  4735  	ret := make(graphql.Array, len(v))
  4736  	var wg sync.WaitGroup
  4737  	isLen1 := len(v) == 1
  4738  	if !isLen1 {
  4739  		wg.Add(len(v))
  4740  	}
  4741  	for i := range v {
  4742  		i := i
  4743  		fc := &graphql.FieldContext{
  4744  			Index:  &i,
  4745  			Result: &v[i],
  4746  		}
  4747  		ctx := graphql.WithFieldContext(ctx, fc)
  4748  		f := func(i int) {
  4749  			defer func() {
  4750  				if r := recover(); r != nil {
  4751  					ec.Error(ctx, ec.Recover(ctx, r))
  4752  					ret = nil
  4753  				}
  4754  			}()
  4755  			if !isLen1 {
  4756  				defer wg.Done()
  4757  			}
  4758  			ret[i] = ec.marshalN__Type2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, sel, v[i])
  4759  		}
  4760  		if isLen1 {
  4761  			f(i)
  4762  		} else {
  4763  			go f(i)
  4764  		}
  4765  
  4766  	}
  4767  	wg.Wait()
  4768  	return ret
  4769  }
  4770  
  4771  func (ec *executionContext) marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v *introspection.Type) graphql.Marshaler {
  4772  	if v == nil {
  4773  		if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
  4774  			ec.Errorf(ctx, "must not be null")
  4775  		}
  4776  		return graphql.Null
  4777  	}
  4778  	return ec.___Type(ctx, sel, v)
  4779  }
  4780  
  4781  func (ec *executionContext) unmarshalN__TypeKind2string(ctx context.Context, v interface{}) (string, error) {
  4782  	return graphql.UnmarshalString(v)
  4783  }
  4784  
  4785  func (ec *executionContext) marshalN__TypeKind2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler {
  4786  	res := graphql.MarshalString(v)
  4787  	if res == graphql.Null {
  4788  		if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
  4789  			ec.Errorf(ctx, "must not be null")
  4790  		}
  4791  	}
  4792  	return res
  4793  }
  4794  
  4795  func (ec *executionContext) unmarshalOBoolean2bool(ctx context.Context, v interface{}) (bool, error) {
  4796  	return graphql.UnmarshalBoolean(v)
  4797  }
  4798  
  4799  func (ec *executionContext) marshalOBoolean2bool(ctx context.Context, sel ast.SelectionSet, v bool) graphql.Marshaler {
  4800  	return graphql.MarshalBoolean(v)
  4801  }
  4802  
  4803  func (ec *executionContext) unmarshalOBoolean2ᚖbool(ctx context.Context, v interface{}) (*bool, error) {
  4804  	if v == nil {
  4805  		return nil, nil
  4806  	}
  4807  	res, err := ec.unmarshalOBoolean2bool(ctx, v)
  4808  	return &res, err
  4809  }
  4810  
  4811  func (ec *executionContext) marshalOBoolean2ᚖbool(ctx context.Context, sel ast.SelectionSet, v *bool) graphql.Marshaler {
  4812  	if v == nil {
  4813  		return graphql.Null
  4814  	}
  4815  	return ec.marshalOBoolean2bool(ctx, sel, *v)
  4816  }
  4817  
  4818  func (ec *executionContext) marshalOCharacter2githubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋstarwarsᚋmodelsᚐCharacter(ctx context.Context, sel ast.SelectionSet, v models.Character) graphql.Marshaler {
  4819  	if v == nil {
  4820  		return graphql.Null
  4821  	}
  4822  	return ec._Character(ctx, sel, v)
  4823  }
  4824  
  4825  func (ec *executionContext) marshalOCharacter2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋstarwarsᚋmodelsᚐCharacterᚄ(ctx context.Context, sel ast.SelectionSet, v []models.Character) graphql.Marshaler {
  4826  	if v == nil {
  4827  		return graphql.Null
  4828  	}
  4829  	ret := make(graphql.Array, len(v))
  4830  	var wg sync.WaitGroup
  4831  	isLen1 := len(v) == 1
  4832  	if !isLen1 {
  4833  		wg.Add(len(v))
  4834  	}
  4835  	for i := range v {
  4836  		i := i
  4837  		fc := &graphql.FieldContext{
  4838  			Index:  &i,
  4839  			Result: &v[i],
  4840  		}
  4841  		ctx := graphql.WithFieldContext(ctx, fc)
  4842  		f := func(i int) {
  4843  			defer func() {
  4844  				if r := recover(); r != nil {
  4845  					ec.Error(ctx, ec.Recover(ctx, r))
  4846  					ret = nil
  4847  				}
  4848  			}()
  4849  			if !isLen1 {
  4850  				defer wg.Done()
  4851  			}
  4852  			ret[i] = ec.marshalNCharacter2githubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋstarwarsᚋmodelsᚐCharacter(ctx, sel, v[i])
  4853  		}
  4854  		if isLen1 {
  4855  			f(i)
  4856  		} else {
  4857  			go f(i)
  4858  		}
  4859  
  4860  	}
  4861  	wg.Wait()
  4862  	return ret
  4863  }
  4864  
  4865  func (ec *executionContext) marshalODroid2githubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋstarwarsᚋmodelsᚐDroid(ctx context.Context, sel ast.SelectionSet, v models.Droid) graphql.Marshaler {
  4866  	return ec._Droid(ctx, sel, &v)
  4867  }
  4868  
  4869  func (ec *executionContext) marshalODroid2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋstarwarsᚋmodelsᚐDroid(ctx context.Context, sel ast.SelectionSet, v *models.Droid) graphql.Marshaler {
  4870  	if v == nil {
  4871  		return graphql.Null
  4872  	}
  4873  	return ec._Droid(ctx, sel, v)
  4874  }
  4875  
  4876  func (ec *executionContext) unmarshalOEpisode2githubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋstarwarsᚋmodelsᚐEpisode(ctx context.Context, v interface{}) (models.Episode, error) {
  4877  	var res models.Episode
  4878  	return res, res.UnmarshalGQL(v)
  4879  }
  4880  
  4881  func (ec *executionContext) marshalOEpisode2githubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋstarwarsᚋmodelsᚐEpisode(ctx context.Context, sel ast.SelectionSet, v models.Episode) graphql.Marshaler {
  4882  	return v
  4883  }
  4884  
  4885  func (ec *executionContext) unmarshalOEpisode2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋstarwarsᚋmodelsᚐEpisode(ctx context.Context, v interface{}) (*models.Episode, error) {
  4886  	if v == nil {
  4887  		return nil, nil
  4888  	}
  4889  	res, err := ec.unmarshalOEpisode2githubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋstarwarsᚋmodelsᚐEpisode(ctx, v)
  4890  	return &res, err
  4891  }
  4892  
  4893  func (ec *executionContext) marshalOEpisode2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋstarwarsᚋmodelsᚐEpisode(ctx context.Context, sel ast.SelectionSet, v *models.Episode) graphql.Marshaler {
  4894  	if v == nil {
  4895  		return graphql.Null
  4896  	}
  4897  	return v
  4898  }
  4899  
  4900  func (ec *executionContext) unmarshalOFloat2float64(ctx context.Context, v interface{}) (float64, error) {
  4901  	return graphql.UnmarshalFloat(v)
  4902  }
  4903  
  4904  func (ec *executionContext) marshalOFloat2float64(ctx context.Context, sel ast.SelectionSet, v float64) graphql.Marshaler {
  4905  	return graphql.MarshalFloat(v)
  4906  }
  4907  
  4908  func (ec *executionContext) marshalOFriendsEdge2ᚕᚖgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋstarwarsᚋmodelsᚐFriendsEdgeᚄ(ctx context.Context, sel ast.SelectionSet, v []*models.FriendsEdge) graphql.Marshaler {
  4909  	if v == nil {
  4910  		return graphql.Null
  4911  	}
  4912  	ret := make(graphql.Array, len(v))
  4913  	var wg sync.WaitGroup
  4914  	isLen1 := len(v) == 1
  4915  	if !isLen1 {
  4916  		wg.Add(len(v))
  4917  	}
  4918  	for i := range v {
  4919  		i := i
  4920  		fc := &graphql.FieldContext{
  4921  			Index:  &i,
  4922  			Result: &v[i],
  4923  		}
  4924  		ctx := graphql.WithFieldContext(ctx, fc)
  4925  		f := func(i int) {
  4926  			defer func() {
  4927  				if r := recover(); r != nil {
  4928  					ec.Error(ctx, ec.Recover(ctx, r))
  4929  					ret = nil
  4930  				}
  4931  			}()
  4932  			if !isLen1 {
  4933  				defer wg.Done()
  4934  			}
  4935  			ret[i] = ec.marshalNFriendsEdge2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋstarwarsᚋmodelsᚐFriendsEdge(ctx, sel, v[i])
  4936  		}
  4937  		if isLen1 {
  4938  			f(i)
  4939  		} else {
  4940  			go f(i)
  4941  		}
  4942  
  4943  	}
  4944  	wg.Wait()
  4945  	return ret
  4946  }
  4947  
  4948  func (ec *executionContext) marshalOHuman2githubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋstarwarsᚋmodelsᚐHuman(ctx context.Context, sel ast.SelectionSet, v models.Human) graphql.Marshaler {
  4949  	return ec._Human(ctx, sel, &v)
  4950  }
  4951  
  4952  func (ec *executionContext) marshalOHuman2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋstarwarsᚋmodelsᚐHuman(ctx context.Context, sel ast.SelectionSet, v *models.Human) graphql.Marshaler {
  4953  	if v == nil {
  4954  		return graphql.Null
  4955  	}
  4956  	return ec._Human(ctx, sel, v)
  4957  }
  4958  
  4959  func (ec *executionContext) unmarshalOID2string(ctx context.Context, v interface{}) (string, error) {
  4960  	return graphql.UnmarshalID(v)
  4961  }
  4962  
  4963  func (ec *executionContext) marshalOID2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler {
  4964  	return graphql.MarshalID(v)
  4965  }
  4966  
  4967  func (ec *executionContext) unmarshalOID2ᚖstring(ctx context.Context, v interface{}) (*string, error) {
  4968  	if v == nil {
  4969  		return nil, nil
  4970  	}
  4971  	res, err := ec.unmarshalOID2string(ctx, v)
  4972  	return &res, err
  4973  }
  4974  
  4975  func (ec *executionContext) marshalOID2ᚖstring(ctx context.Context, sel ast.SelectionSet, v *string) graphql.Marshaler {
  4976  	if v == nil {
  4977  		return graphql.Null
  4978  	}
  4979  	return ec.marshalOID2string(ctx, sel, *v)
  4980  }
  4981  
  4982  func (ec *executionContext) unmarshalOInt2int(ctx context.Context, v interface{}) (int, error) {
  4983  	return graphql.UnmarshalInt(v)
  4984  }
  4985  
  4986  func (ec *executionContext) marshalOInt2int(ctx context.Context, sel ast.SelectionSet, v int) graphql.Marshaler {
  4987  	return graphql.MarshalInt(v)
  4988  }
  4989  
  4990  func (ec *executionContext) unmarshalOInt2ᚖint(ctx context.Context, v interface{}) (*int, error) {
  4991  	if v == nil {
  4992  		return nil, nil
  4993  	}
  4994  	res, err := ec.unmarshalOInt2int(ctx, v)
  4995  	return &res, err
  4996  }
  4997  
  4998  func (ec *executionContext) marshalOInt2ᚖint(ctx context.Context, sel ast.SelectionSet, v *int) graphql.Marshaler {
  4999  	if v == nil {
  5000  		return graphql.Null
  5001  	}
  5002  	return ec.marshalOInt2int(ctx, sel, *v)
  5003  }
  5004  
  5005  func (ec *executionContext) unmarshalOLengthUnit2githubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋstarwarsᚋmodelsᚐLengthUnit(ctx context.Context, v interface{}) (models.LengthUnit, error) {
  5006  	var res models.LengthUnit
  5007  	return res, res.UnmarshalGQL(v)
  5008  }
  5009  
  5010  func (ec *executionContext) marshalOLengthUnit2githubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋstarwarsᚋmodelsᚐLengthUnit(ctx context.Context, sel ast.SelectionSet, v models.LengthUnit) graphql.Marshaler {
  5011  	return v
  5012  }
  5013  
  5014  func (ec *executionContext) unmarshalOLengthUnit2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋstarwarsᚋmodelsᚐLengthUnit(ctx context.Context, v interface{}) (*models.LengthUnit, error) {
  5015  	if v == nil {
  5016  		return nil, nil
  5017  	}
  5018  	res, err := ec.unmarshalOLengthUnit2githubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋstarwarsᚋmodelsᚐLengthUnit(ctx, v)
  5019  	return &res, err
  5020  }
  5021  
  5022  func (ec *executionContext) marshalOLengthUnit2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋstarwarsᚋmodelsᚐLengthUnit(ctx context.Context, sel ast.SelectionSet, v *models.LengthUnit) graphql.Marshaler {
  5023  	if v == nil {
  5024  		return graphql.Null
  5025  	}
  5026  	return v
  5027  }
  5028  
  5029  func (ec *executionContext) marshalOReview2githubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋstarwarsᚋmodelsᚐReview(ctx context.Context, sel ast.SelectionSet, v models.Review) graphql.Marshaler {
  5030  	return ec._Review(ctx, sel, &v)
  5031  }
  5032  
  5033  func (ec *executionContext) marshalOReview2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋstarwarsᚋmodelsᚐReview(ctx context.Context, sel ast.SelectionSet, v *models.Review) graphql.Marshaler {
  5034  	if v == nil {
  5035  		return graphql.Null
  5036  	}
  5037  	return ec._Review(ctx, sel, v)
  5038  }
  5039  
  5040  func (ec *executionContext) marshalOStarship2githubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋstarwarsᚋmodelsᚐStarship(ctx context.Context, sel ast.SelectionSet, v models.Starship) graphql.Marshaler {
  5041  	return ec._Starship(ctx, sel, &v)
  5042  }
  5043  
  5044  func (ec *executionContext) marshalOStarship2ᚕᚖgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋstarwarsᚋmodelsᚐStarshipᚄ(ctx context.Context, sel ast.SelectionSet, v []*models.Starship) graphql.Marshaler {
  5045  	if v == nil {
  5046  		return graphql.Null
  5047  	}
  5048  	ret := make(graphql.Array, len(v))
  5049  	var wg sync.WaitGroup
  5050  	isLen1 := len(v) == 1
  5051  	if !isLen1 {
  5052  		wg.Add(len(v))
  5053  	}
  5054  	for i := range v {
  5055  		i := i
  5056  		fc := &graphql.FieldContext{
  5057  			Index:  &i,
  5058  			Result: &v[i],
  5059  		}
  5060  		ctx := graphql.WithFieldContext(ctx, fc)
  5061  		f := func(i int) {
  5062  			defer func() {
  5063  				if r := recover(); r != nil {
  5064  					ec.Error(ctx, ec.Recover(ctx, r))
  5065  					ret = nil
  5066  				}
  5067  			}()
  5068  			if !isLen1 {
  5069  				defer wg.Done()
  5070  			}
  5071  			ret[i] = ec.marshalNStarship2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋstarwarsᚋmodelsᚐStarship(ctx, sel, v[i])
  5072  		}
  5073  		if isLen1 {
  5074  			f(i)
  5075  		} else {
  5076  			go f(i)
  5077  		}
  5078  
  5079  	}
  5080  	wg.Wait()
  5081  	return ret
  5082  }
  5083  
  5084  func (ec *executionContext) marshalOStarship2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋstarwarsᚋmodelsᚐStarship(ctx context.Context, sel ast.SelectionSet, v *models.Starship) graphql.Marshaler {
  5085  	if v == nil {
  5086  		return graphql.Null
  5087  	}
  5088  	return ec._Starship(ctx, sel, v)
  5089  }
  5090  
  5091  func (ec *executionContext) unmarshalOString2string(ctx context.Context, v interface{}) (string, error) {
  5092  	return graphql.UnmarshalString(v)
  5093  }
  5094  
  5095  func (ec *executionContext) marshalOString2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler {
  5096  	return graphql.MarshalString(v)
  5097  }
  5098  
  5099  func (ec *executionContext) unmarshalOString2ᚖstring(ctx context.Context, v interface{}) (*string, error) {
  5100  	if v == nil {
  5101  		return nil, nil
  5102  	}
  5103  	res, err := ec.unmarshalOString2string(ctx, v)
  5104  	return &res, err
  5105  }
  5106  
  5107  func (ec *executionContext) marshalOString2ᚖstring(ctx context.Context, sel ast.SelectionSet, v *string) graphql.Marshaler {
  5108  	if v == nil {
  5109  		return graphql.Null
  5110  	}
  5111  	return ec.marshalOString2string(ctx, sel, *v)
  5112  }
  5113  
  5114  func (ec *executionContext) unmarshalOTime2timeᚐTime(ctx context.Context, v interface{}) (time.Time, error) {
  5115  	return graphql.UnmarshalTime(v)
  5116  }
  5117  
  5118  func (ec *executionContext) marshalOTime2timeᚐTime(ctx context.Context, sel ast.SelectionSet, v time.Time) graphql.Marshaler {
  5119  	return graphql.MarshalTime(v)
  5120  }
  5121  
  5122  func (ec *executionContext) unmarshalOTime2ᚖtimeᚐTime(ctx context.Context, v interface{}) (*time.Time, error) {
  5123  	if v == nil {
  5124  		return nil, nil
  5125  	}
  5126  	res, err := ec.unmarshalOTime2timeᚐTime(ctx, v)
  5127  	return &res, err
  5128  }
  5129  
  5130  func (ec *executionContext) marshalOTime2ᚖtimeᚐTime(ctx context.Context, sel ast.SelectionSet, v *time.Time) graphql.Marshaler {
  5131  	if v == nil {
  5132  		return graphql.Null
  5133  	}
  5134  	return ec.marshalOTime2timeᚐTime(ctx, sel, *v)
  5135  }
  5136  
  5137  func (ec *executionContext) marshalO__EnumValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValueᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.EnumValue) graphql.Marshaler {
  5138  	if v == nil {
  5139  		return graphql.Null
  5140  	}
  5141  	ret := make(graphql.Array, len(v))
  5142  	var wg sync.WaitGroup
  5143  	isLen1 := len(v) == 1
  5144  	if !isLen1 {
  5145  		wg.Add(len(v))
  5146  	}
  5147  	for i := range v {
  5148  		i := i
  5149  		fc := &graphql.FieldContext{
  5150  			Index:  &i,
  5151  			Result: &v[i],
  5152  		}
  5153  		ctx := graphql.WithFieldContext(ctx, fc)
  5154  		f := func(i int) {
  5155  			defer func() {
  5156  				if r := recover(); r != nil {
  5157  					ec.Error(ctx, ec.Recover(ctx, r))
  5158  					ret = nil
  5159  				}
  5160  			}()
  5161  			if !isLen1 {
  5162  				defer wg.Done()
  5163  			}
  5164  			ret[i] = ec.marshalN__EnumValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValue(ctx, sel, v[i])
  5165  		}
  5166  		if isLen1 {
  5167  			f(i)
  5168  		} else {
  5169  			go f(i)
  5170  		}
  5171  
  5172  	}
  5173  	wg.Wait()
  5174  	return ret
  5175  }
  5176  
  5177  func (ec *executionContext) marshalO__Field2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐFieldᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Field) graphql.Marshaler {
  5178  	if v == nil {
  5179  		return graphql.Null
  5180  	}
  5181  	ret := make(graphql.Array, len(v))
  5182  	var wg sync.WaitGroup
  5183  	isLen1 := len(v) == 1
  5184  	if !isLen1 {
  5185  		wg.Add(len(v))
  5186  	}
  5187  	for i := range v {
  5188  		i := i
  5189  		fc := &graphql.FieldContext{
  5190  			Index:  &i,
  5191  			Result: &v[i],
  5192  		}
  5193  		ctx := graphql.WithFieldContext(ctx, fc)
  5194  		f := func(i int) {
  5195  			defer func() {
  5196  				if r := recover(); r != nil {
  5197  					ec.Error(ctx, ec.Recover(ctx, r))
  5198  					ret = nil
  5199  				}
  5200  			}()
  5201  			if !isLen1 {
  5202  				defer wg.Done()
  5203  			}
  5204  			ret[i] = ec.marshalN__Field2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐField(ctx, sel, v[i])
  5205  		}
  5206  		if isLen1 {
  5207  			f(i)
  5208  		} else {
  5209  			go f(i)
  5210  		}
  5211  
  5212  	}
  5213  	wg.Wait()
  5214  	return ret
  5215  }
  5216  
  5217  func (ec *executionContext) marshalO__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.InputValue) graphql.Marshaler {
  5218  	if v == nil {
  5219  		return graphql.Null
  5220  	}
  5221  	ret := make(graphql.Array, len(v))
  5222  	var wg sync.WaitGroup
  5223  	isLen1 := len(v) == 1
  5224  	if !isLen1 {
  5225  		wg.Add(len(v))
  5226  	}
  5227  	for i := range v {
  5228  		i := i
  5229  		fc := &graphql.FieldContext{
  5230  			Index:  &i,
  5231  			Result: &v[i],
  5232  		}
  5233  		ctx := graphql.WithFieldContext(ctx, fc)
  5234  		f := func(i int) {
  5235  			defer func() {
  5236  				if r := recover(); r != nil {
  5237  					ec.Error(ctx, ec.Recover(ctx, r))
  5238  					ret = nil
  5239  				}
  5240  			}()
  5241  			if !isLen1 {
  5242  				defer wg.Done()
  5243  			}
  5244  			ret[i] = ec.marshalN__InputValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx, sel, v[i])
  5245  		}
  5246  		if isLen1 {
  5247  			f(i)
  5248  		} else {
  5249  			go f(i)
  5250  		}
  5251  
  5252  	}
  5253  	wg.Wait()
  5254  	return ret
  5255  }
  5256  
  5257  func (ec *executionContext) marshalO__Schema2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐSchema(ctx context.Context, sel ast.SelectionSet, v introspection.Schema) graphql.Marshaler {
  5258  	return ec.___Schema(ctx, sel, &v)
  5259  }
  5260  
  5261  func (ec *executionContext) marshalO__Schema2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐSchema(ctx context.Context, sel ast.SelectionSet, v *introspection.Schema) graphql.Marshaler {
  5262  	if v == nil {
  5263  		return graphql.Null
  5264  	}
  5265  	return ec.___Schema(ctx, sel, v)
  5266  }
  5267  
  5268  func (ec *executionContext) marshalO__Type2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v introspection.Type) graphql.Marshaler {
  5269  	return ec.___Type(ctx, sel, &v)
  5270  }
  5271  
  5272  func (ec *executionContext) marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Type) graphql.Marshaler {
  5273  	if v == nil {
  5274  		return graphql.Null
  5275  	}
  5276  	ret := make(graphql.Array, len(v))
  5277  	var wg sync.WaitGroup
  5278  	isLen1 := len(v) == 1
  5279  	if !isLen1 {
  5280  		wg.Add(len(v))
  5281  	}
  5282  	for i := range v {
  5283  		i := i
  5284  		fc := &graphql.FieldContext{
  5285  			Index:  &i,
  5286  			Result: &v[i],
  5287  		}
  5288  		ctx := graphql.WithFieldContext(ctx, fc)
  5289  		f := func(i int) {
  5290  			defer func() {
  5291  				if r := recover(); r != nil {
  5292  					ec.Error(ctx, ec.Recover(ctx, r))
  5293  					ret = nil
  5294  				}
  5295  			}()
  5296  			if !isLen1 {
  5297  				defer wg.Done()
  5298  			}
  5299  			ret[i] = ec.marshalN__Type2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, sel, v[i])
  5300  		}
  5301  		if isLen1 {
  5302  			f(i)
  5303  		} else {
  5304  			go f(i)
  5305  		}
  5306  
  5307  	}
  5308  	wg.Wait()
  5309  	return ret
  5310  }
  5311  
  5312  func (ec *executionContext) marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v *introspection.Type) graphql.Marshaler {
  5313  	if v == nil {
  5314  		return graphql.Null
  5315  	}
  5316  	return ec.___Type(ctx, sel, v)
  5317  }
  5318  
  5319  // endregion ***************************** type.gotpl *****************************