github.com/operandinc/gqlgen@v0.16.1/codegen/testserver/followschema/root_.generated.go (about)

     1  // Code generated by github.com/operandinc/gqlgen, DO NOT EDIT.
     2  
     3  package followschema
     4  
     5  import (
     6  	"bytes"
     7  	"context"
     8  	"errors"
     9  
    10  	"github.com/operandinc/gqlgen/graphql"
    11  	"github.com/operandinc/gqlgen/graphql/introspection"
    12  	gqlparser "github.com/vektah/gqlparser/v2"
    13  	"github.com/vektah/gqlparser/v2/ast"
    14  )
    15  
    16  // NewExecutableSchema creates an ExecutableSchema from the ResolverRoot interface.
    17  func NewExecutableSchema(cfg Config) graphql.ExecutableSchema {
    18  	return &executableSchema{
    19  		resolvers:  cfg.Resolvers,
    20  		directives: cfg.Directives,
    21  		complexity: cfg.Complexity,
    22  	}
    23  }
    24  
    25  type Config struct {
    26  	Resolvers  ResolverRoot
    27  	Directives DirectiveRoot
    28  	Complexity ComplexityRoot
    29  }
    30  
    31  type ResolverRoot interface {
    32  	BackedByInterface() BackedByInterfaceResolver
    33  	Errors() ErrorsResolver
    34  	ForcedResolver() ForcedResolverResolver
    35  	ModelMethods() ModelMethodsResolver
    36  	Mutation() MutationResolver
    37  	OverlappingFields() OverlappingFieldsResolver
    38  	Panics() PanicsResolver
    39  	Primitive() PrimitiveResolver
    40  	PrimitiveString() PrimitiveStringResolver
    41  	Query() QueryResolver
    42  	Subscription() SubscriptionResolver
    43  	User() UserResolver
    44  	WrappedMap() WrappedMapResolver
    45  	WrappedSlice() WrappedSliceResolver
    46  }
    47  
    48  type DirectiveRoot struct {
    49  	Custom        func(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error)
    50  	Directive1    func(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error)
    51  	Directive2    func(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error)
    52  	Directive3    func(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error)
    53  	Length        func(ctx context.Context, obj interface{}, next graphql.Resolver, min int, max *int, message *string) (res interface{}, err error)
    54  	Logged        func(ctx context.Context, obj interface{}, next graphql.Resolver, id string) (res interface{}, err error)
    55  	MakeNil       func(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error)
    56  	MakeTypedNil  func(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error)
    57  	Order1        func(ctx context.Context, obj interface{}, next graphql.Resolver, location string) (res interface{}, err error)
    58  	Order2        func(ctx context.Context, obj interface{}, next graphql.Resolver, location string) (res interface{}, err error)
    59  	Range         func(ctx context.Context, obj interface{}, next graphql.Resolver, min *int, max *int) (res interface{}, err error)
    60  	ToNull        func(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error)
    61  	Unimplemented func(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error)
    62  }
    63  
    64  type ComplexityRoot struct {
    65  	A struct {
    66  		ID func(childComplexity int) int
    67  	}
    68  
    69  	AIt struct {
    70  		ID func(childComplexity int) int
    71  	}
    72  
    73  	AbIt struct {
    74  		ID func(childComplexity int) int
    75  	}
    76  
    77  	Autobind struct {
    78  		IdInt func(childComplexity int) int
    79  		IdStr func(childComplexity int) int
    80  		Int   func(childComplexity int) int
    81  		Int32 func(childComplexity int) int
    82  		Int64 func(childComplexity int) int
    83  	}
    84  
    85  	B struct {
    86  		ID func(childComplexity int) int
    87  	}
    88  
    89  	BackedByInterface struct {
    90  		ID                      func(childComplexity int) int
    91  		ThisShouldBind          func(childComplexity int) int
    92  		ThisShouldBindWithError func(childComplexity int) int
    93  	}
    94  
    95  	Cat struct {
    96  		CatBreed func(childComplexity int) int
    97  		Species  func(childComplexity int) int
    98  	}
    99  
   100  	CheckIssue896 struct {
   101  		ID func(childComplexity int) int
   102  	}
   103  
   104  	Circle struct {
   105  		Area        func(childComplexity int) int
   106  		Coordinates func(childComplexity int) int
   107  		Radius      func(childComplexity int) int
   108  	}
   109  
   110  	ConcreteNodeA struct {
   111  		Child func(childComplexity int) int
   112  		ID    func(childComplexity int) int
   113  		Name  func(childComplexity int) int
   114  	}
   115  
   116  	ConcreteNodeInterface struct {
   117  		Child func(childComplexity int) int
   118  		ID    func(childComplexity int) int
   119  	}
   120  
   121  	Content_Post struct {
   122  		Foo func(childComplexity int) int
   123  	}
   124  
   125  	Content_User struct {
   126  		Foo func(childComplexity int) int
   127  	}
   128  
   129  	Coordinates struct {
   130  		X func(childComplexity int) int
   131  		Y func(childComplexity int) int
   132  	}
   133  
   134  	DefaultParametersMirror struct {
   135  		FalsyBoolean  func(childComplexity int) int
   136  		TruthyBoolean func(childComplexity int) int
   137  	}
   138  
   139  	Dog struct {
   140  		DogBreed func(childComplexity int) int
   141  		Species  func(childComplexity int) int
   142  	}
   143  
   144  	EmbeddedCase1 struct {
   145  		ExportedEmbeddedPointerExportedMethod func(childComplexity int) int
   146  	}
   147  
   148  	EmbeddedCase2 struct {
   149  		UnexportedEmbeddedPointerExportedMethod func(childComplexity int) int
   150  	}
   151  
   152  	EmbeddedCase3 struct {
   153  		UnexportedEmbeddedInterfaceExportedMethod func(childComplexity int) int
   154  	}
   155  
   156  	EmbeddedDefaultScalar struct {
   157  		Value func(childComplexity int) int
   158  	}
   159  
   160  	EmbeddedPointer struct {
   161  		ID    func(childComplexity int) int
   162  		Title func(childComplexity int) int
   163  	}
   164  
   165  	Error struct {
   166  		ErrorOnNonRequiredField func(childComplexity int) int
   167  		ErrorOnRequiredField    func(childComplexity int) int
   168  		ID                      func(childComplexity int) int
   169  		NilOnRequiredField      func(childComplexity int) int
   170  	}
   171  
   172  	Errors struct {
   173  		A func(childComplexity int) int
   174  		B func(childComplexity int) int
   175  		C func(childComplexity int) int
   176  		D func(childComplexity int) int
   177  		E func(childComplexity int) int
   178  	}
   179  
   180  	ForcedResolver struct {
   181  		Field func(childComplexity int) int
   182  	}
   183  
   184  	InnerObject struct {
   185  		ID func(childComplexity int) int
   186  	}
   187  
   188  	InvalidIdentifier struct {
   189  		ID func(childComplexity int) int
   190  	}
   191  
   192  	It struct {
   193  		ID func(childComplexity int) int
   194  	}
   195  
   196  	LoopA struct {
   197  		B func(childComplexity int) int
   198  	}
   199  
   200  	LoopB struct {
   201  		A func(childComplexity int) int
   202  	}
   203  
   204  	Map struct {
   205  		ID func(childComplexity int) int
   206  	}
   207  
   208  	MapStringInterfaceType struct {
   209  		A func(childComplexity int) int
   210  		B func(childComplexity int) int
   211  	}
   212  
   213  	ModelMethods struct {
   214  		NoContext     func(childComplexity int) int
   215  		ResolverField func(childComplexity int) int
   216  		WithContext   func(childComplexity int) int
   217  	}
   218  
   219  	Mutation struct {
   220  		DefaultInput    func(childComplexity int, input DefaultInput) int
   221  		UpdatePtrToPtr  func(childComplexity int, input UpdatePtrToPtrOuter) int
   222  		UpdateSomething func(childComplexity int, input SpecialInput) int
   223  	}
   224  
   225  	ObjectDirectives struct {
   226  		NullableText func(childComplexity int) int
   227  		Order        func(childComplexity int) int
   228  		Text         func(childComplexity int) int
   229  	}
   230  
   231  	ObjectDirectivesWithCustomGoModel struct {
   232  		NullableText func(childComplexity int) int
   233  	}
   234  
   235  	OuterObject struct {
   236  		Inner func(childComplexity int) int
   237  	}
   238  
   239  	OverlappingFields struct {
   240  		Foo    func(childComplexity int) int
   241  		NewFoo func(childComplexity int) int
   242  		OldFoo func(childComplexity int) int
   243  	}
   244  
   245  	Panics struct {
   246  		ArgUnmarshal       func(childComplexity int, u []MarshalPanic) int
   247  		FieldFuncMarshal   func(childComplexity int, u []MarshalPanic) int
   248  		FieldScalarMarshal func(childComplexity int) int
   249  	}
   250  
   251  	Primitive struct {
   252  		Squared func(childComplexity int) int
   253  		Value   func(childComplexity int) int
   254  	}
   255  
   256  	PrimitiveString struct {
   257  		Doubled func(childComplexity int) int
   258  		Len     func(childComplexity int) int
   259  		Value   func(childComplexity int) int
   260  	}
   261  
   262  	PtrToPtrInner struct {
   263  		Key   func(childComplexity int) int
   264  		Value func(childComplexity int) int
   265  	}
   266  
   267  	PtrToPtrOuter struct {
   268  		Inner       func(childComplexity int) int
   269  		Name        func(childComplexity int) int
   270  		StupidInner func(childComplexity int) int
   271  	}
   272  
   273  	PtrToSliceContainer struct {
   274  		PtrToSlice func(childComplexity int) int
   275  	}
   276  
   277  	Query struct {
   278  		Animal                           func(childComplexity int) int
   279  		Autobind                         func(childComplexity int) int
   280  		Collision                        func(childComplexity int) int
   281  		DefaultParameters                func(childComplexity int, falsyBoolean *bool, truthyBoolean *bool) int
   282  		DefaultScalar                    func(childComplexity int, arg string) int
   283  		DeprecatedField                  func(childComplexity int) int
   284  		DirectiveArg                     func(childComplexity int, arg string) int
   285  		DirectiveDouble                  func(childComplexity int) int
   286  		DirectiveField                   func(childComplexity int) int
   287  		DirectiveFieldDef                func(childComplexity int, ret string) int
   288  		DirectiveInput                   func(childComplexity int, arg InputDirectives) int
   289  		DirectiveInputNullable           func(childComplexity int, arg *InputDirectives) int
   290  		DirectiveInputType               func(childComplexity int, arg InnerInput) int
   291  		DirectiveNullableArg             func(childComplexity int, arg *int, arg2 *int, arg3 *string) int
   292  		DirectiveObject                  func(childComplexity int) int
   293  		DirectiveObjectWithCustomGoModel func(childComplexity int) int
   294  		DirectiveUnimplemented           func(childComplexity int) int
   295  		EmbeddedCase1                    func(childComplexity int) int
   296  		EmbeddedCase2                    func(childComplexity int) int
   297  		EmbeddedCase3                    func(childComplexity int) int
   298  		EnumInInput                      func(childComplexity int, input *InputWithEnumValue) int
   299  		ErrorBubble                      func(childComplexity int) int
   300  		ErrorBubbleList                  func(childComplexity int) int
   301  		ErrorList                        func(childComplexity int) int
   302  		Errors                           func(childComplexity int) int
   303  		Fallback                         func(childComplexity int, arg FallbackToStringEncoding) int
   304  		Infinity                         func(childComplexity int) int
   305  		InputNullableSlice               func(childComplexity int, arg []string) int
   306  		InputSlice                       func(childComplexity int, arg []string) int
   307  		InvalidIdentifier                func(childComplexity int) int
   308  		Issue896a                        func(childComplexity int) int
   309  		MapInput                         func(childComplexity int, input map[string]interface{}) int
   310  		MapNestedStringInterface         func(childComplexity int, in *NestedMapInput) int
   311  		MapStringInterface               func(childComplexity int, in map[string]interface{}) int
   312  		ModelMethods                     func(childComplexity int) int
   313  		NestedInputs                     func(childComplexity int, input [][]*OuterInput) int
   314  		NestedOutputs                    func(childComplexity int) int
   315  		NoShape                          func(childComplexity int) int
   316  		NoShapeTypedNil                  func(childComplexity int) int
   317  		Node                             func(childComplexity int) int
   318  		NotAnInterface                   func(childComplexity int) int
   319  		NullableArg                      func(childComplexity int, arg *int) int
   320  		OptionalUnion                    func(childComplexity int) int
   321  		Overlapping                      func(childComplexity int) int
   322  		Panics                           func(childComplexity int) int
   323  		PrimitiveObject                  func(childComplexity int) int
   324  		PrimitiveStringObject            func(childComplexity int) int
   325  		PtrToSliceContainer              func(childComplexity int) int
   326  		Recursive                        func(childComplexity int, input *RecursiveInputSlice) int
   327  		ScalarSlice                      func(childComplexity int) int
   328  		ShapeUnion                       func(childComplexity int) int
   329  		Shapes                           func(childComplexity int) int
   330  		Slices                           func(childComplexity int) int
   331  		StringFromContextFunction        func(childComplexity int) int
   332  		StringFromContextInterface       func(childComplexity int) int
   333  		User                             func(childComplexity int, id int) int
   334  		VOkCaseNil                       func(childComplexity int) int
   335  		VOkCaseValue                     func(childComplexity int) int
   336  		Valid                            func(childComplexity int) int
   337  		ValidType                        func(childComplexity int) int
   338  		WrappedMap                       func(childComplexity int) int
   339  		WrappedScalar                    func(childComplexity int) int
   340  		WrappedSlice                     func(childComplexity int) int
   341  		WrappedStruct                    func(childComplexity int) int
   342  	}
   343  
   344  	Rectangle struct {
   345  		Area        func(childComplexity int) int
   346  		Coordinates func(childComplexity int) int
   347  		Length      func(childComplexity int) int
   348  		Width       func(childComplexity int) int
   349  	}
   350  
   351  	Slices struct {
   352  		Test1 func(childComplexity int) int
   353  		Test2 func(childComplexity int) int
   354  		Test3 func(childComplexity int) int
   355  		Test4 func(childComplexity int) int
   356  	}
   357  
   358  	Subscription struct {
   359  		DirectiveArg           func(childComplexity int, arg string) int
   360  		DirectiveDouble        func(childComplexity int) int
   361  		DirectiveNullableArg   func(childComplexity int, arg *int, arg2 *int, arg3 *string) int
   362  		DirectiveUnimplemented func(childComplexity int) int
   363  		InitPayload            func(childComplexity int) int
   364  		Issue896b              func(childComplexity int) int
   365  		Updated                func(childComplexity int) int
   366  	}
   367  
   368  	User struct {
   369  		Created func(childComplexity int) int
   370  		Friends func(childComplexity int) int
   371  		ID      func(childComplexity int) int
   372  		Updated func(childComplexity int) int
   373  	}
   374  
   375  	VOkCaseNil struct {
   376  		Value func(childComplexity int) int
   377  	}
   378  
   379  	VOkCaseValue struct {
   380  		Value func(childComplexity int) int
   381  	}
   382  
   383  	ValidType struct {
   384  		DifferentCase      func(childComplexity int) int
   385  		DifferentCaseOld   func(childComplexity int) int
   386  		ValidArgs          func(childComplexity int, breakArg string, defaultArg string, funcArg string, interfaceArg string, selectArg string, caseArg string, deferArg string, goArg string, mapArg string, structArg string, chanArg string, elseArg string, gotoArg string, packageArg string, switchArg string, constArg string, fallthroughArg string, ifArg string, rangeArg string, typeArg string, continueArg string, forArg string, importArg string, returnArg string, varArg string, _ string) int
   387  		ValidInputKeywords func(childComplexity int, input *ValidInput) int
   388  	}
   389  
   390  	WrappedMap struct {
   391  		Get func(childComplexity int, key string) int
   392  	}
   393  
   394  	WrappedSlice struct {
   395  		Get func(childComplexity int, idx int) int
   396  	}
   397  
   398  	WrappedStruct struct {
   399  		Desc func(childComplexity int) int
   400  		Name func(childComplexity int) int
   401  	}
   402  
   403  	XXIt struct {
   404  		ID func(childComplexity int) int
   405  	}
   406  
   407  	XxIt struct {
   408  		ID func(childComplexity int) int
   409  	}
   410  
   411  	AsdfIt struct {
   412  		ID func(childComplexity int) int
   413  	}
   414  
   415  	IIt struct {
   416  		ID func(childComplexity int) int
   417  	}
   418  }
   419  
   420  type executableSchema struct {
   421  	resolvers  ResolverRoot
   422  	directives DirectiveRoot
   423  	complexity ComplexityRoot
   424  }
   425  
   426  func (e *executableSchema) Schema() *ast.Schema {
   427  	return parsedSchema
   428  }
   429  
   430  func (e *executableSchema) Complexity(typeName, field string, childComplexity int, rawArgs map[string]interface{}) (int, bool) {
   431  	ec := executionContext{nil, e}
   432  	_ = ec
   433  	switch typeName + "." + field {
   434  
   435  	case "A.id":
   436  		if e.complexity.A.ID == nil {
   437  			break
   438  		}
   439  
   440  		return e.complexity.A.ID(childComplexity), true
   441  
   442  	case "AIt.id":
   443  		if e.complexity.AIt.ID == nil {
   444  			break
   445  		}
   446  
   447  		return e.complexity.AIt.ID(childComplexity), true
   448  
   449  	case "AbIt.id":
   450  		if e.complexity.AbIt.ID == nil {
   451  			break
   452  		}
   453  
   454  		return e.complexity.AbIt.ID(childComplexity), true
   455  
   456  	case "Autobind.idInt":
   457  		if e.complexity.Autobind.IdInt == nil {
   458  			break
   459  		}
   460  
   461  		return e.complexity.Autobind.IdInt(childComplexity), true
   462  
   463  	case "Autobind.idStr":
   464  		if e.complexity.Autobind.IdStr == nil {
   465  			break
   466  		}
   467  
   468  		return e.complexity.Autobind.IdStr(childComplexity), true
   469  
   470  	case "Autobind.int":
   471  		if e.complexity.Autobind.Int == nil {
   472  			break
   473  		}
   474  
   475  		return e.complexity.Autobind.Int(childComplexity), true
   476  
   477  	case "Autobind.int32":
   478  		if e.complexity.Autobind.Int32 == nil {
   479  			break
   480  		}
   481  
   482  		return e.complexity.Autobind.Int32(childComplexity), true
   483  
   484  	case "Autobind.int64":
   485  		if e.complexity.Autobind.Int64 == nil {
   486  			break
   487  		}
   488  
   489  		return e.complexity.Autobind.Int64(childComplexity), true
   490  
   491  	case "B.id":
   492  		if e.complexity.B.ID == nil {
   493  			break
   494  		}
   495  
   496  		return e.complexity.B.ID(childComplexity), true
   497  
   498  	case "BackedByInterface.id":
   499  		if e.complexity.BackedByInterface.ID == nil {
   500  			break
   501  		}
   502  
   503  		return e.complexity.BackedByInterface.ID(childComplexity), true
   504  
   505  	case "BackedByInterface.thisShouldBind":
   506  		if e.complexity.BackedByInterface.ThisShouldBind == nil {
   507  			break
   508  		}
   509  
   510  		return e.complexity.BackedByInterface.ThisShouldBind(childComplexity), true
   511  
   512  	case "BackedByInterface.thisShouldBindWithError":
   513  		if e.complexity.BackedByInterface.ThisShouldBindWithError == nil {
   514  			break
   515  		}
   516  
   517  		return e.complexity.BackedByInterface.ThisShouldBindWithError(childComplexity), true
   518  
   519  	case "Cat.catBreed":
   520  		if e.complexity.Cat.CatBreed == nil {
   521  			break
   522  		}
   523  
   524  		return e.complexity.Cat.CatBreed(childComplexity), true
   525  
   526  	case "Cat.species":
   527  		if e.complexity.Cat.Species == nil {
   528  			break
   529  		}
   530  
   531  		return e.complexity.Cat.Species(childComplexity), true
   532  
   533  	case "CheckIssue896.id":
   534  		if e.complexity.CheckIssue896.ID == nil {
   535  			break
   536  		}
   537  
   538  		return e.complexity.CheckIssue896.ID(childComplexity), true
   539  
   540  	case "Circle.area":
   541  		if e.complexity.Circle.Area == nil {
   542  			break
   543  		}
   544  
   545  		return e.complexity.Circle.Area(childComplexity), true
   546  
   547  	case "Circle.coordinates":
   548  		if e.complexity.Circle.Coordinates == nil {
   549  			break
   550  		}
   551  
   552  		return e.complexity.Circle.Coordinates(childComplexity), true
   553  
   554  	case "Circle.radius":
   555  		if e.complexity.Circle.Radius == nil {
   556  			break
   557  		}
   558  
   559  		return e.complexity.Circle.Radius(childComplexity), true
   560  
   561  	case "ConcreteNodeA.child":
   562  		if e.complexity.ConcreteNodeA.Child == nil {
   563  			break
   564  		}
   565  
   566  		return e.complexity.ConcreteNodeA.Child(childComplexity), true
   567  
   568  	case "ConcreteNodeA.id":
   569  		if e.complexity.ConcreteNodeA.ID == nil {
   570  			break
   571  		}
   572  
   573  		return e.complexity.ConcreteNodeA.ID(childComplexity), true
   574  
   575  	case "ConcreteNodeA.name":
   576  		if e.complexity.ConcreteNodeA.Name == nil {
   577  			break
   578  		}
   579  
   580  		return e.complexity.ConcreteNodeA.Name(childComplexity), true
   581  
   582  	case "ConcreteNodeInterface.child":
   583  		if e.complexity.ConcreteNodeInterface.Child == nil {
   584  			break
   585  		}
   586  
   587  		return e.complexity.ConcreteNodeInterface.Child(childComplexity), true
   588  
   589  	case "ConcreteNodeInterface.id":
   590  		if e.complexity.ConcreteNodeInterface.ID == nil {
   591  			break
   592  		}
   593  
   594  		return e.complexity.ConcreteNodeInterface.ID(childComplexity), true
   595  
   596  	case "Content_Post.foo":
   597  		if e.complexity.Content_Post.Foo == nil {
   598  			break
   599  		}
   600  
   601  		return e.complexity.Content_Post.Foo(childComplexity), true
   602  
   603  	case "Content_User.foo":
   604  		if e.complexity.Content_User.Foo == nil {
   605  			break
   606  		}
   607  
   608  		return e.complexity.Content_User.Foo(childComplexity), true
   609  
   610  	case "Coordinates.x":
   611  		if e.complexity.Coordinates.X == nil {
   612  			break
   613  		}
   614  
   615  		return e.complexity.Coordinates.X(childComplexity), true
   616  
   617  	case "Coordinates.y":
   618  		if e.complexity.Coordinates.Y == nil {
   619  			break
   620  		}
   621  
   622  		return e.complexity.Coordinates.Y(childComplexity), true
   623  
   624  	case "DefaultParametersMirror.falsyBoolean":
   625  		if e.complexity.DefaultParametersMirror.FalsyBoolean == nil {
   626  			break
   627  		}
   628  
   629  		return e.complexity.DefaultParametersMirror.FalsyBoolean(childComplexity), true
   630  
   631  	case "DefaultParametersMirror.truthyBoolean":
   632  		if e.complexity.DefaultParametersMirror.TruthyBoolean == nil {
   633  			break
   634  		}
   635  
   636  		return e.complexity.DefaultParametersMirror.TruthyBoolean(childComplexity), true
   637  
   638  	case "Dog.dogBreed":
   639  		if e.complexity.Dog.DogBreed == nil {
   640  			break
   641  		}
   642  
   643  		return e.complexity.Dog.DogBreed(childComplexity), true
   644  
   645  	case "Dog.species":
   646  		if e.complexity.Dog.Species == nil {
   647  			break
   648  		}
   649  
   650  		return e.complexity.Dog.Species(childComplexity), true
   651  
   652  	case "EmbeddedCase1.exportedEmbeddedPointerExportedMethod":
   653  		if e.complexity.EmbeddedCase1.ExportedEmbeddedPointerExportedMethod == nil {
   654  			break
   655  		}
   656  
   657  		return e.complexity.EmbeddedCase1.ExportedEmbeddedPointerExportedMethod(childComplexity), true
   658  
   659  	case "EmbeddedCase2.unexportedEmbeddedPointerExportedMethod":
   660  		if e.complexity.EmbeddedCase2.UnexportedEmbeddedPointerExportedMethod == nil {
   661  			break
   662  		}
   663  
   664  		return e.complexity.EmbeddedCase2.UnexportedEmbeddedPointerExportedMethod(childComplexity), true
   665  
   666  	case "EmbeddedCase3.unexportedEmbeddedInterfaceExportedMethod":
   667  		if e.complexity.EmbeddedCase3.UnexportedEmbeddedInterfaceExportedMethod == nil {
   668  			break
   669  		}
   670  
   671  		return e.complexity.EmbeddedCase3.UnexportedEmbeddedInterfaceExportedMethod(childComplexity), true
   672  
   673  	case "EmbeddedDefaultScalar.value":
   674  		if e.complexity.EmbeddedDefaultScalar.Value == nil {
   675  			break
   676  		}
   677  
   678  		return e.complexity.EmbeddedDefaultScalar.Value(childComplexity), true
   679  
   680  	case "EmbeddedPointer.ID":
   681  		if e.complexity.EmbeddedPointer.ID == nil {
   682  			break
   683  		}
   684  
   685  		return e.complexity.EmbeddedPointer.ID(childComplexity), true
   686  
   687  	case "EmbeddedPointer.Title":
   688  		if e.complexity.EmbeddedPointer.Title == nil {
   689  			break
   690  		}
   691  
   692  		return e.complexity.EmbeddedPointer.Title(childComplexity), true
   693  
   694  	case "Error.errorOnNonRequiredField":
   695  		if e.complexity.Error.ErrorOnNonRequiredField == nil {
   696  			break
   697  		}
   698  
   699  		return e.complexity.Error.ErrorOnNonRequiredField(childComplexity), true
   700  
   701  	case "Error.errorOnRequiredField":
   702  		if e.complexity.Error.ErrorOnRequiredField == nil {
   703  			break
   704  		}
   705  
   706  		return e.complexity.Error.ErrorOnRequiredField(childComplexity), true
   707  
   708  	case "Error.id":
   709  		if e.complexity.Error.ID == nil {
   710  			break
   711  		}
   712  
   713  		return e.complexity.Error.ID(childComplexity), true
   714  
   715  	case "Error.nilOnRequiredField":
   716  		if e.complexity.Error.NilOnRequiredField == nil {
   717  			break
   718  		}
   719  
   720  		return e.complexity.Error.NilOnRequiredField(childComplexity), true
   721  
   722  	case "Errors.a":
   723  		if e.complexity.Errors.A == nil {
   724  			break
   725  		}
   726  
   727  		return e.complexity.Errors.A(childComplexity), true
   728  
   729  	case "Errors.b":
   730  		if e.complexity.Errors.B == nil {
   731  			break
   732  		}
   733  
   734  		return e.complexity.Errors.B(childComplexity), true
   735  
   736  	case "Errors.c":
   737  		if e.complexity.Errors.C == nil {
   738  			break
   739  		}
   740  
   741  		return e.complexity.Errors.C(childComplexity), true
   742  
   743  	case "Errors.d":
   744  		if e.complexity.Errors.D == nil {
   745  			break
   746  		}
   747  
   748  		return e.complexity.Errors.D(childComplexity), true
   749  
   750  	case "Errors.e":
   751  		if e.complexity.Errors.E == nil {
   752  			break
   753  		}
   754  
   755  		return e.complexity.Errors.E(childComplexity), true
   756  
   757  	case "ForcedResolver.field":
   758  		if e.complexity.ForcedResolver.Field == nil {
   759  			break
   760  		}
   761  
   762  		return e.complexity.ForcedResolver.Field(childComplexity), true
   763  
   764  	case "InnerObject.id":
   765  		if e.complexity.InnerObject.ID == nil {
   766  			break
   767  		}
   768  
   769  		return e.complexity.InnerObject.ID(childComplexity), true
   770  
   771  	case "InvalidIdentifier.id":
   772  		if e.complexity.InvalidIdentifier.ID == nil {
   773  			break
   774  		}
   775  
   776  		return e.complexity.InvalidIdentifier.ID(childComplexity), true
   777  
   778  	case "It.id":
   779  		if e.complexity.It.ID == nil {
   780  			break
   781  		}
   782  
   783  		return e.complexity.It.ID(childComplexity), true
   784  
   785  	case "LoopA.b":
   786  		if e.complexity.LoopA.B == nil {
   787  			break
   788  		}
   789  
   790  		return e.complexity.LoopA.B(childComplexity), true
   791  
   792  	case "LoopB.a":
   793  		if e.complexity.LoopB.A == nil {
   794  			break
   795  		}
   796  
   797  		return e.complexity.LoopB.A(childComplexity), true
   798  
   799  	case "Map.id":
   800  		if e.complexity.Map.ID == nil {
   801  			break
   802  		}
   803  
   804  		return e.complexity.Map.ID(childComplexity), true
   805  
   806  	case "MapStringInterfaceType.a":
   807  		if e.complexity.MapStringInterfaceType.A == nil {
   808  			break
   809  		}
   810  
   811  		return e.complexity.MapStringInterfaceType.A(childComplexity), true
   812  
   813  	case "MapStringInterfaceType.b":
   814  		if e.complexity.MapStringInterfaceType.B == nil {
   815  			break
   816  		}
   817  
   818  		return e.complexity.MapStringInterfaceType.B(childComplexity), true
   819  
   820  	case "ModelMethods.noContext":
   821  		if e.complexity.ModelMethods.NoContext == nil {
   822  			break
   823  		}
   824  
   825  		return e.complexity.ModelMethods.NoContext(childComplexity), true
   826  
   827  	case "ModelMethods.resolverField":
   828  		if e.complexity.ModelMethods.ResolverField == nil {
   829  			break
   830  		}
   831  
   832  		return e.complexity.ModelMethods.ResolverField(childComplexity), true
   833  
   834  	case "ModelMethods.withContext":
   835  		if e.complexity.ModelMethods.WithContext == nil {
   836  			break
   837  		}
   838  
   839  		return e.complexity.ModelMethods.WithContext(childComplexity), true
   840  
   841  	case "Mutation.defaultInput":
   842  		if e.complexity.Mutation.DefaultInput == nil {
   843  			break
   844  		}
   845  
   846  		args, err := ec.field_Mutation_defaultInput_args(context.TODO(), rawArgs)
   847  		if err != nil {
   848  			return 0, false
   849  		}
   850  
   851  		return e.complexity.Mutation.DefaultInput(childComplexity, args["input"].(DefaultInput)), true
   852  
   853  	case "Mutation.updatePtrToPtr":
   854  		if e.complexity.Mutation.UpdatePtrToPtr == nil {
   855  			break
   856  		}
   857  
   858  		args, err := ec.field_Mutation_updatePtrToPtr_args(context.TODO(), rawArgs)
   859  		if err != nil {
   860  			return 0, false
   861  		}
   862  
   863  		return e.complexity.Mutation.UpdatePtrToPtr(childComplexity, args["input"].(UpdatePtrToPtrOuter)), true
   864  
   865  	case "Mutation.updateSomething":
   866  		if e.complexity.Mutation.UpdateSomething == nil {
   867  			break
   868  		}
   869  
   870  		args, err := ec.field_Mutation_updateSomething_args(context.TODO(), rawArgs)
   871  		if err != nil {
   872  			return 0, false
   873  		}
   874  
   875  		return e.complexity.Mutation.UpdateSomething(childComplexity, args["input"].(SpecialInput)), true
   876  
   877  	case "ObjectDirectives.nullableText":
   878  		if e.complexity.ObjectDirectives.NullableText == nil {
   879  			break
   880  		}
   881  
   882  		return e.complexity.ObjectDirectives.NullableText(childComplexity), true
   883  
   884  	case "ObjectDirectives.order":
   885  		if e.complexity.ObjectDirectives.Order == nil {
   886  			break
   887  		}
   888  
   889  		return e.complexity.ObjectDirectives.Order(childComplexity), true
   890  
   891  	case "ObjectDirectives.text":
   892  		if e.complexity.ObjectDirectives.Text == nil {
   893  			break
   894  		}
   895  
   896  		return e.complexity.ObjectDirectives.Text(childComplexity), true
   897  
   898  	case "ObjectDirectivesWithCustomGoModel.nullableText":
   899  		if e.complexity.ObjectDirectivesWithCustomGoModel.NullableText == nil {
   900  			break
   901  		}
   902  
   903  		return e.complexity.ObjectDirectivesWithCustomGoModel.NullableText(childComplexity), true
   904  
   905  	case "OuterObject.inner":
   906  		if e.complexity.OuterObject.Inner == nil {
   907  			break
   908  		}
   909  
   910  		return e.complexity.OuterObject.Inner(childComplexity), true
   911  
   912  	case "OverlappingFields.oneFoo", "OverlappingFields.twoFoo":
   913  		if e.complexity.OverlappingFields.Foo == nil {
   914  			break
   915  		}
   916  
   917  		return e.complexity.OverlappingFields.Foo(childComplexity), true
   918  
   919  	case "OverlappingFields.newFoo", "OverlappingFields.new_foo":
   920  		if e.complexity.OverlappingFields.NewFoo == nil {
   921  			break
   922  		}
   923  
   924  		return e.complexity.OverlappingFields.NewFoo(childComplexity), true
   925  
   926  	case "OverlappingFields.oldFoo":
   927  		if e.complexity.OverlappingFields.OldFoo == nil {
   928  			break
   929  		}
   930  
   931  		return e.complexity.OverlappingFields.OldFoo(childComplexity), true
   932  
   933  	case "Panics.argUnmarshal":
   934  		if e.complexity.Panics.ArgUnmarshal == nil {
   935  			break
   936  		}
   937  
   938  		args, err := ec.field_Panics_argUnmarshal_args(context.TODO(), rawArgs)
   939  		if err != nil {
   940  			return 0, false
   941  		}
   942  
   943  		return e.complexity.Panics.ArgUnmarshal(childComplexity, args["u"].([]MarshalPanic)), true
   944  
   945  	case "Panics.fieldFuncMarshal":
   946  		if e.complexity.Panics.FieldFuncMarshal == nil {
   947  			break
   948  		}
   949  
   950  		args, err := ec.field_Panics_fieldFuncMarshal_args(context.TODO(), rawArgs)
   951  		if err != nil {
   952  			return 0, false
   953  		}
   954  
   955  		return e.complexity.Panics.FieldFuncMarshal(childComplexity, args["u"].([]MarshalPanic)), true
   956  
   957  	case "Panics.fieldScalarMarshal":
   958  		if e.complexity.Panics.FieldScalarMarshal == nil {
   959  			break
   960  		}
   961  
   962  		return e.complexity.Panics.FieldScalarMarshal(childComplexity), true
   963  
   964  	case "Primitive.squared":
   965  		if e.complexity.Primitive.Squared == nil {
   966  			break
   967  		}
   968  
   969  		return e.complexity.Primitive.Squared(childComplexity), true
   970  
   971  	case "Primitive.value":
   972  		if e.complexity.Primitive.Value == nil {
   973  			break
   974  		}
   975  
   976  		return e.complexity.Primitive.Value(childComplexity), true
   977  
   978  	case "PrimitiveString.doubled":
   979  		if e.complexity.PrimitiveString.Doubled == nil {
   980  			break
   981  		}
   982  
   983  		return e.complexity.PrimitiveString.Doubled(childComplexity), true
   984  
   985  	case "PrimitiveString.len":
   986  		if e.complexity.PrimitiveString.Len == nil {
   987  			break
   988  		}
   989  
   990  		return e.complexity.PrimitiveString.Len(childComplexity), true
   991  
   992  	case "PrimitiveString.value":
   993  		if e.complexity.PrimitiveString.Value == nil {
   994  			break
   995  		}
   996  
   997  		return e.complexity.PrimitiveString.Value(childComplexity), true
   998  
   999  	case "PtrToPtrInner.key":
  1000  		if e.complexity.PtrToPtrInner.Key == nil {
  1001  			break
  1002  		}
  1003  
  1004  		return e.complexity.PtrToPtrInner.Key(childComplexity), true
  1005  
  1006  	case "PtrToPtrInner.value":
  1007  		if e.complexity.PtrToPtrInner.Value == nil {
  1008  			break
  1009  		}
  1010  
  1011  		return e.complexity.PtrToPtrInner.Value(childComplexity), true
  1012  
  1013  	case "PtrToPtrOuter.inner":
  1014  		if e.complexity.PtrToPtrOuter.Inner == nil {
  1015  			break
  1016  		}
  1017  
  1018  		return e.complexity.PtrToPtrOuter.Inner(childComplexity), true
  1019  
  1020  	case "PtrToPtrOuter.name":
  1021  		if e.complexity.PtrToPtrOuter.Name == nil {
  1022  			break
  1023  		}
  1024  
  1025  		return e.complexity.PtrToPtrOuter.Name(childComplexity), true
  1026  
  1027  	case "PtrToPtrOuter.stupidInner":
  1028  		if e.complexity.PtrToPtrOuter.StupidInner == nil {
  1029  			break
  1030  		}
  1031  
  1032  		return e.complexity.PtrToPtrOuter.StupidInner(childComplexity), true
  1033  
  1034  	case "PtrToSliceContainer.ptrToSlice":
  1035  		if e.complexity.PtrToSliceContainer.PtrToSlice == nil {
  1036  			break
  1037  		}
  1038  
  1039  		return e.complexity.PtrToSliceContainer.PtrToSlice(childComplexity), true
  1040  
  1041  	case "Query.animal":
  1042  		if e.complexity.Query.Animal == nil {
  1043  			break
  1044  		}
  1045  
  1046  		return e.complexity.Query.Animal(childComplexity), true
  1047  
  1048  	case "Query.autobind":
  1049  		if e.complexity.Query.Autobind == nil {
  1050  			break
  1051  		}
  1052  
  1053  		return e.complexity.Query.Autobind(childComplexity), true
  1054  
  1055  	case "Query.collision":
  1056  		if e.complexity.Query.Collision == nil {
  1057  			break
  1058  		}
  1059  
  1060  		return e.complexity.Query.Collision(childComplexity), true
  1061  
  1062  	case "Query.defaultParameters":
  1063  		if e.complexity.Query.DefaultParameters == nil {
  1064  			break
  1065  		}
  1066  
  1067  		args, err := ec.field_Query_defaultParameters_args(context.TODO(), rawArgs)
  1068  		if err != nil {
  1069  			return 0, false
  1070  		}
  1071  
  1072  		return e.complexity.Query.DefaultParameters(childComplexity, args["falsyBoolean"].(*bool), args["truthyBoolean"].(*bool)), true
  1073  
  1074  	case "Query.defaultScalar":
  1075  		if e.complexity.Query.DefaultScalar == nil {
  1076  			break
  1077  		}
  1078  
  1079  		args, err := ec.field_Query_defaultScalar_args(context.TODO(), rawArgs)
  1080  		if err != nil {
  1081  			return 0, false
  1082  		}
  1083  
  1084  		return e.complexity.Query.DefaultScalar(childComplexity, args["arg"].(string)), true
  1085  
  1086  	case "Query.deprecatedField":
  1087  		if e.complexity.Query.DeprecatedField == nil {
  1088  			break
  1089  		}
  1090  
  1091  		return e.complexity.Query.DeprecatedField(childComplexity), true
  1092  
  1093  	case "Query.directiveArg":
  1094  		if e.complexity.Query.DirectiveArg == nil {
  1095  			break
  1096  		}
  1097  
  1098  		args, err := ec.field_Query_directiveArg_args(context.TODO(), rawArgs)
  1099  		if err != nil {
  1100  			return 0, false
  1101  		}
  1102  
  1103  		return e.complexity.Query.DirectiveArg(childComplexity, args["arg"].(string)), true
  1104  
  1105  	case "Query.directiveDouble":
  1106  		if e.complexity.Query.DirectiveDouble == nil {
  1107  			break
  1108  		}
  1109  
  1110  		return e.complexity.Query.DirectiveDouble(childComplexity), true
  1111  
  1112  	case "Query.directiveField":
  1113  		if e.complexity.Query.DirectiveField == nil {
  1114  			break
  1115  		}
  1116  
  1117  		return e.complexity.Query.DirectiveField(childComplexity), true
  1118  
  1119  	case "Query.directiveFieldDef":
  1120  		if e.complexity.Query.DirectiveFieldDef == nil {
  1121  			break
  1122  		}
  1123  
  1124  		args, err := ec.field_Query_directiveFieldDef_args(context.TODO(), rawArgs)
  1125  		if err != nil {
  1126  			return 0, false
  1127  		}
  1128  
  1129  		return e.complexity.Query.DirectiveFieldDef(childComplexity, args["ret"].(string)), true
  1130  
  1131  	case "Query.directiveInput":
  1132  		if e.complexity.Query.DirectiveInput == nil {
  1133  			break
  1134  		}
  1135  
  1136  		args, err := ec.field_Query_directiveInput_args(context.TODO(), rawArgs)
  1137  		if err != nil {
  1138  			return 0, false
  1139  		}
  1140  
  1141  		return e.complexity.Query.DirectiveInput(childComplexity, args["arg"].(InputDirectives)), true
  1142  
  1143  	case "Query.directiveInputNullable":
  1144  		if e.complexity.Query.DirectiveInputNullable == nil {
  1145  			break
  1146  		}
  1147  
  1148  		args, err := ec.field_Query_directiveInputNullable_args(context.TODO(), rawArgs)
  1149  		if err != nil {
  1150  			return 0, false
  1151  		}
  1152  
  1153  		return e.complexity.Query.DirectiveInputNullable(childComplexity, args["arg"].(*InputDirectives)), true
  1154  
  1155  	case "Query.directiveInputType":
  1156  		if e.complexity.Query.DirectiveInputType == nil {
  1157  			break
  1158  		}
  1159  
  1160  		args, err := ec.field_Query_directiveInputType_args(context.TODO(), rawArgs)
  1161  		if err != nil {
  1162  			return 0, false
  1163  		}
  1164  
  1165  		return e.complexity.Query.DirectiveInputType(childComplexity, args["arg"].(InnerInput)), true
  1166  
  1167  	case "Query.directiveNullableArg":
  1168  		if e.complexity.Query.DirectiveNullableArg == nil {
  1169  			break
  1170  		}
  1171  
  1172  		args, err := ec.field_Query_directiveNullableArg_args(context.TODO(), rawArgs)
  1173  		if err != nil {
  1174  			return 0, false
  1175  		}
  1176  
  1177  		return e.complexity.Query.DirectiveNullableArg(childComplexity, args["arg"].(*int), args["arg2"].(*int), args["arg3"].(*string)), true
  1178  
  1179  	case "Query.directiveObject":
  1180  		if e.complexity.Query.DirectiveObject == nil {
  1181  			break
  1182  		}
  1183  
  1184  		return e.complexity.Query.DirectiveObject(childComplexity), true
  1185  
  1186  	case "Query.directiveObjectWithCustomGoModel":
  1187  		if e.complexity.Query.DirectiveObjectWithCustomGoModel == nil {
  1188  			break
  1189  		}
  1190  
  1191  		return e.complexity.Query.DirectiveObjectWithCustomGoModel(childComplexity), true
  1192  
  1193  	case "Query.directiveUnimplemented":
  1194  		if e.complexity.Query.DirectiveUnimplemented == nil {
  1195  			break
  1196  		}
  1197  
  1198  		return e.complexity.Query.DirectiveUnimplemented(childComplexity), true
  1199  
  1200  	case "Query.embeddedCase1":
  1201  		if e.complexity.Query.EmbeddedCase1 == nil {
  1202  			break
  1203  		}
  1204  
  1205  		return e.complexity.Query.EmbeddedCase1(childComplexity), true
  1206  
  1207  	case "Query.embeddedCase2":
  1208  		if e.complexity.Query.EmbeddedCase2 == nil {
  1209  			break
  1210  		}
  1211  
  1212  		return e.complexity.Query.EmbeddedCase2(childComplexity), true
  1213  
  1214  	case "Query.embeddedCase3":
  1215  		if e.complexity.Query.EmbeddedCase3 == nil {
  1216  			break
  1217  		}
  1218  
  1219  		return e.complexity.Query.EmbeddedCase3(childComplexity), true
  1220  
  1221  	case "Query.enumInInput":
  1222  		if e.complexity.Query.EnumInInput == nil {
  1223  			break
  1224  		}
  1225  
  1226  		args, err := ec.field_Query_enumInInput_args(context.TODO(), rawArgs)
  1227  		if err != nil {
  1228  			return 0, false
  1229  		}
  1230  
  1231  		return e.complexity.Query.EnumInInput(childComplexity, args["input"].(*InputWithEnumValue)), true
  1232  
  1233  	case "Query.errorBubble":
  1234  		if e.complexity.Query.ErrorBubble == nil {
  1235  			break
  1236  		}
  1237  
  1238  		return e.complexity.Query.ErrorBubble(childComplexity), true
  1239  
  1240  	case "Query.errorBubbleList":
  1241  		if e.complexity.Query.ErrorBubbleList == nil {
  1242  			break
  1243  		}
  1244  
  1245  		return e.complexity.Query.ErrorBubbleList(childComplexity), true
  1246  
  1247  	case "Query.errorList":
  1248  		if e.complexity.Query.ErrorList == nil {
  1249  			break
  1250  		}
  1251  
  1252  		return e.complexity.Query.ErrorList(childComplexity), true
  1253  
  1254  	case "Query.errors":
  1255  		if e.complexity.Query.Errors == nil {
  1256  			break
  1257  		}
  1258  
  1259  		return e.complexity.Query.Errors(childComplexity), true
  1260  
  1261  	case "Query.fallback":
  1262  		if e.complexity.Query.Fallback == nil {
  1263  			break
  1264  		}
  1265  
  1266  		args, err := ec.field_Query_fallback_args(context.TODO(), rawArgs)
  1267  		if err != nil {
  1268  			return 0, false
  1269  		}
  1270  
  1271  		return e.complexity.Query.Fallback(childComplexity, args["arg"].(FallbackToStringEncoding)), true
  1272  
  1273  	case "Query.infinity":
  1274  		if e.complexity.Query.Infinity == nil {
  1275  			break
  1276  		}
  1277  
  1278  		return e.complexity.Query.Infinity(childComplexity), true
  1279  
  1280  	case "Query.inputNullableSlice":
  1281  		if e.complexity.Query.InputNullableSlice == nil {
  1282  			break
  1283  		}
  1284  
  1285  		args, err := ec.field_Query_inputNullableSlice_args(context.TODO(), rawArgs)
  1286  		if err != nil {
  1287  			return 0, false
  1288  		}
  1289  
  1290  		return e.complexity.Query.InputNullableSlice(childComplexity, args["arg"].([]string)), true
  1291  
  1292  	case "Query.inputSlice":
  1293  		if e.complexity.Query.InputSlice == nil {
  1294  			break
  1295  		}
  1296  
  1297  		args, err := ec.field_Query_inputSlice_args(context.TODO(), rawArgs)
  1298  		if err != nil {
  1299  			return 0, false
  1300  		}
  1301  
  1302  		return e.complexity.Query.InputSlice(childComplexity, args["arg"].([]string)), true
  1303  
  1304  	case "Query.invalidIdentifier":
  1305  		if e.complexity.Query.InvalidIdentifier == nil {
  1306  			break
  1307  		}
  1308  
  1309  		return e.complexity.Query.InvalidIdentifier(childComplexity), true
  1310  
  1311  	case "Query.issue896a":
  1312  		if e.complexity.Query.Issue896a == nil {
  1313  			break
  1314  		}
  1315  
  1316  		return e.complexity.Query.Issue896a(childComplexity), true
  1317  
  1318  	case "Query.mapInput":
  1319  		if e.complexity.Query.MapInput == nil {
  1320  			break
  1321  		}
  1322  
  1323  		args, err := ec.field_Query_mapInput_args(context.TODO(), rawArgs)
  1324  		if err != nil {
  1325  			return 0, false
  1326  		}
  1327  
  1328  		return e.complexity.Query.MapInput(childComplexity, args["input"].(map[string]interface{})), true
  1329  
  1330  	case "Query.mapNestedStringInterface":
  1331  		if e.complexity.Query.MapNestedStringInterface == nil {
  1332  			break
  1333  		}
  1334  
  1335  		args, err := ec.field_Query_mapNestedStringInterface_args(context.TODO(), rawArgs)
  1336  		if err != nil {
  1337  			return 0, false
  1338  		}
  1339  
  1340  		return e.complexity.Query.MapNestedStringInterface(childComplexity, args["in"].(*NestedMapInput)), true
  1341  
  1342  	case "Query.mapStringInterface":
  1343  		if e.complexity.Query.MapStringInterface == nil {
  1344  			break
  1345  		}
  1346  
  1347  		args, err := ec.field_Query_mapStringInterface_args(context.TODO(), rawArgs)
  1348  		if err != nil {
  1349  			return 0, false
  1350  		}
  1351  
  1352  		return e.complexity.Query.MapStringInterface(childComplexity, args["in"].(map[string]interface{})), true
  1353  
  1354  	case "Query.modelMethods":
  1355  		if e.complexity.Query.ModelMethods == nil {
  1356  			break
  1357  		}
  1358  
  1359  		return e.complexity.Query.ModelMethods(childComplexity), true
  1360  
  1361  	case "Query.nestedInputs":
  1362  		if e.complexity.Query.NestedInputs == nil {
  1363  			break
  1364  		}
  1365  
  1366  		args, err := ec.field_Query_nestedInputs_args(context.TODO(), rawArgs)
  1367  		if err != nil {
  1368  			return 0, false
  1369  		}
  1370  
  1371  		return e.complexity.Query.NestedInputs(childComplexity, args["input"].([][]*OuterInput)), true
  1372  
  1373  	case "Query.nestedOutputs":
  1374  		if e.complexity.Query.NestedOutputs == nil {
  1375  			break
  1376  		}
  1377  
  1378  		return e.complexity.Query.NestedOutputs(childComplexity), true
  1379  
  1380  	case "Query.noShape":
  1381  		if e.complexity.Query.NoShape == nil {
  1382  			break
  1383  		}
  1384  
  1385  		return e.complexity.Query.NoShape(childComplexity), true
  1386  
  1387  	case "Query.noShapeTypedNil":
  1388  		if e.complexity.Query.NoShapeTypedNil == nil {
  1389  			break
  1390  		}
  1391  
  1392  		return e.complexity.Query.NoShapeTypedNil(childComplexity), true
  1393  
  1394  	case "Query.node":
  1395  		if e.complexity.Query.Node == nil {
  1396  			break
  1397  		}
  1398  
  1399  		return e.complexity.Query.Node(childComplexity), true
  1400  
  1401  	case "Query.notAnInterface":
  1402  		if e.complexity.Query.NotAnInterface == nil {
  1403  			break
  1404  		}
  1405  
  1406  		return e.complexity.Query.NotAnInterface(childComplexity), true
  1407  
  1408  	case "Query.nullableArg":
  1409  		if e.complexity.Query.NullableArg == nil {
  1410  			break
  1411  		}
  1412  
  1413  		args, err := ec.field_Query_nullableArg_args(context.TODO(), rawArgs)
  1414  		if err != nil {
  1415  			return 0, false
  1416  		}
  1417  
  1418  		return e.complexity.Query.NullableArg(childComplexity, args["arg"].(*int)), true
  1419  
  1420  	case "Query.optionalUnion":
  1421  		if e.complexity.Query.OptionalUnion == nil {
  1422  			break
  1423  		}
  1424  
  1425  		return e.complexity.Query.OptionalUnion(childComplexity), true
  1426  
  1427  	case "Query.overlapping":
  1428  		if e.complexity.Query.Overlapping == nil {
  1429  			break
  1430  		}
  1431  
  1432  		return e.complexity.Query.Overlapping(childComplexity), true
  1433  
  1434  	case "Query.panics":
  1435  		if e.complexity.Query.Panics == nil {
  1436  			break
  1437  		}
  1438  
  1439  		return e.complexity.Query.Panics(childComplexity), true
  1440  
  1441  	case "Query.primitiveObject":
  1442  		if e.complexity.Query.PrimitiveObject == nil {
  1443  			break
  1444  		}
  1445  
  1446  		return e.complexity.Query.PrimitiveObject(childComplexity), true
  1447  
  1448  	case "Query.primitiveStringObject":
  1449  		if e.complexity.Query.PrimitiveStringObject == nil {
  1450  			break
  1451  		}
  1452  
  1453  		return e.complexity.Query.PrimitiveStringObject(childComplexity), true
  1454  
  1455  	case "Query.ptrToSliceContainer":
  1456  		if e.complexity.Query.PtrToSliceContainer == nil {
  1457  			break
  1458  		}
  1459  
  1460  		return e.complexity.Query.PtrToSliceContainer(childComplexity), true
  1461  
  1462  	case "Query.recursive":
  1463  		if e.complexity.Query.Recursive == nil {
  1464  			break
  1465  		}
  1466  
  1467  		args, err := ec.field_Query_recursive_args(context.TODO(), rawArgs)
  1468  		if err != nil {
  1469  			return 0, false
  1470  		}
  1471  
  1472  		return e.complexity.Query.Recursive(childComplexity, args["input"].(*RecursiveInputSlice)), true
  1473  
  1474  	case "Query.scalarSlice":
  1475  		if e.complexity.Query.ScalarSlice == nil {
  1476  			break
  1477  		}
  1478  
  1479  		return e.complexity.Query.ScalarSlice(childComplexity), true
  1480  
  1481  	case "Query.shapeUnion":
  1482  		if e.complexity.Query.ShapeUnion == nil {
  1483  			break
  1484  		}
  1485  
  1486  		return e.complexity.Query.ShapeUnion(childComplexity), true
  1487  
  1488  	case "Query.shapes":
  1489  		if e.complexity.Query.Shapes == nil {
  1490  			break
  1491  		}
  1492  
  1493  		return e.complexity.Query.Shapes(childComplexity), true
  1494  
  1495  	case "Query.slices":
  1496  		if e.complexity.Query.Slices == nil {
  1497  			break
  1498  		}
  1499  
  1500  		return e.complexity.Query.Slices(childComplexity), true
  1501  
  1502  	case "Query.stringFromContextFunction":
  1503  		if e.complexity.Query.StringFromContextFunction == nil {
  1504  			break
  1505  		}
  1506  
  1507  		return e.complexity.Query.StringFromContextFunction(childComplexity), true
  1508  
  1509  	case "Query.stringFromContextInterface":
  1510  		if e.complexity.Query.StringFromContextInterface == nil {
  1511  			break
  1512  		}
  1513  
  1514  		return e.complexity.Query.StringFromContextInterface(childComplexity), true
  1515  
  1516  	case "Query.user":
  1517  		if e.complexity.Query.User == nil {
  1518  			break
  1519  		}
  1520  
  1521  		args, err := ec.field_Query_user_args(context.TODO(), rawArgs)
  1522  		if err != nil {
  1523  			return 0, false
  1524  		}
  1525  
  1526  		return e.complexity.Query.User(childComplexity, args["id"].(int)), true
  1527  
  1528  	case "Query.vOkCaseNil":
  1529  		if e.complexity.Query.VOkCaseNil == nil {
  1530  			break
  1531  		}
  1532  
  1533  		return e.complexity.Query.VOkCaseNil(childComplexity), true
  1534  
  1535  	case "Query.vOkCaseValue":
  1536  		if e.complexity.Query.VOkCaseValue == nil {
  1537  			break
  1538  		}
  1539  
  1540  		return e.complexity.Query.VOkCaseValue(childComplexity), true
  1541  
  1542  	case "Query.valid":
  1543  		if e.complexity.Query.Valid == nil {
  1544  			break
  1545  		}
  1546  
  1547  		return e.complexity.Query.Valid(childComplexity), true
  1548  
  1549  	case "Query.validType":
  1550  		if e.complexity.Query.ValidType == nil {
  1551  			break
  1552  		}
  1553  
  1554  		return e.complexity.Query.ValidType(childComplexity), true
  1555  
  1556  	case "Query.wrappedMap":
  1557  		if e.complexity.Query.WrappedMap == nil {
  1558  			break
  1559  		}
  1560  
  1561  		return e.complexity.Query.WrappedMap(childComplexity), true
  1562  
  1563  	case "Query.wrappedScalar":
  1564  		if e.complexity.Query.WrappedScalar == nil {
  1565  			break
  1566  		}
  1567  
  1568  		return e.complexity.Query.WrappedScalar(childComplexity), true
  1569  
  1570  	case "Query.wrappedSlice":
  1571  		if e.complexity.Query.WrappedSlice == nil {
  1572  			break
  1573  		}
  1574  
  1575  		return e.complexity.Query.WrappedSlice(childComplexity), true
  1576  
  1577  	case "Query.wrappedStruct":
  1578  		if e.complexity.Query.WrappedStruct == nil {
  1579  			break
  1580  		}
  1581  
  1582  		return e.complexity.Query.WrappedStruct(childComplexity), true
  1583  
  1584  	case "Rectangle.area":
  1585  		if e.complexity.Rectangle.Area == nil {
  1586  			break
  1587  		}
  1588  
  1589  		return e.complexity.Rectangle.Area(childComplexity), true
  1590  
  1591  	case "Rectangle.coordinates":
  1592  		if e.complexity.Rectangle.Coordinates == nil {
  1593  			break
  1594  		}
  1595  
  1596  		return e.complexity.Rectangle.Coordinates(childComplexity), true
  1597  
  1598  	case "Rectangle.length":
  1599  		if e.complexity.Rectangle.Length == nil {
  1600  			break
  1601  		}
  1602  
  1603  		return e.complexity.Rectangle.Length(childComplexity), true
  1604  
  1605  	case "Rectangle.width":
  1606  		if e.complexity.Rectangle.Width == nil {
  1607  			break
  1608  		}
  1609  
  1610  		return e.complexity.Rectangle.Width(childComplexity), true
  1611  
  1612  	case "Slices.test1":
  1613  		if e.complexity.Slices.Test1 == nil {
  1614  			break
  1615  		}
  1616  
  1617  		return e.complexity.Slices.Test1(childComplexity), true
  1618  
  1619  	case "Slices.test2":
  1620  		if e.complexity.Slices.Test2 == nil {
  1621  			break
  1622  		}
  1623  
  1624  		return e.complexity.Slices.Test2(childComplexity), true
  1625  
  1626  	case "Slices.test3":
  1627  		if e.complexity.Slices.Test3 == nil {
  1628  			break
  1629  		}
  1630  
  1631  		return e.complexity.Slices.Test3(childComplexity), true
  1632  
  1633  	case "Slices.test4":
  1634  		if e.complexity.Slices.Test4 == nil {
  1635  			break
  1636  		}
  1637  
  1638  		return e.complexity.Slices.Test4(childComplexity), true
  1639  
  1640  	case "Subscription.directiveArg":
  1641  		if e.complexity.Subscription.DirectiveArg == nil {
  1642  			break
  1643  		}
  1644  
  1645  		args, err := ec.field_Subscription_directiveArg_args(context.TODO(), rawArgs)
  1646  		if err != nil {
  1647  			return 0, false
  1648  		}
  1649  
  1650  		return e.complexity.Subscription.DirectiveArg(childComplexity, args["arg"].(string)), true
  1651  
  1652  	case "Subscription.directiveDouble":
  1653  		if e.complexity.Subscription.DirectiveDouble == nil {
  1654  			break
  1655  		}
  1656  
  1657  		return e.complexity.Subscription.DirectiveDouble(childComplexity), true
  1658  
  1659  	case "Subscription.directiveNullableArg":
  1660  		if e.complexity.Subscription.DirectiveNullableArg == nil {
  1661  			break
  1662  		}
  1663  
  1664  		args, err := ec.field_Subscription_directiveNullableArg_args(context.TODO(), rawArgs)
  1665  		if err != nil {
  1666  			return 0, false
  1667  		}
  1668  
  1669  		return e.complexity.Subscription.DirectiveNullableArg(childComplexity, args["arg"].(*int), args["arg2"].(*int), args["arg3"].(*string)), true
  1670  
  1671  	case "Subscription.directiveUnimplemented":
  1672  		if e.complexity.Subscription.DirectiveUnimplemented == nil {
  1673  			break
  1674  		}
  1675  
  1676  		return e.complexity.Subscription.DirectiveUnimplemented(childComplexity), true
  1677  
  1678  	case "Subscription.initPayload":
  1679  		if e.complexity.Subscription.InitPayload == nil {
  1680  			break
  1681  		}
  1682  
  1683  		return e.complexity.Subscription.InitPayload(childComplexity), true
  1684  
  1685  	case "Subscription.issue896b":
  1686  		if e.complexity.Subscription.Issue896b == nil {
  1687  			break
  1688  		}
  1689  
  1690  		return e.complexity.Subscription.Issue896b(childComplexity), true
  1691  
  1692  	case "Subscription.updated":
  1693  		if e.complexity.Subscription.Updated == nil {
  1694  			break
  1695  		}
  1696  
  1697  		return e.complexity.Subscription.Updated(childComplexity), true
  1698  
  1699  	case "User.created":
  1700  		if e.complexity.User.Created == nil {
  1701  			break
  1702  		}
  1703  
  1704  		return e.complexity.User.Created(childComplexity), true
  1705  
  1706  	case "User.friends":
  1707  		if e.complexity.User.Friends == nil {
  1708  			break
  1709  		}
  1710  
  1711  		return e.complexity.User.Friends(childComplexity), true
  1712  
  1713  	case "User.id":
  1714  		if e.complexity.User.ID == nil {
  1715  			break
  1716  		}
  1717  
  1718  		return e.complexity.User.ID(childComplexity), true
  1719  
  1720  	case "User.updated":
  1721  		if e.complexity.User.Updated == nil {
  1722  			break
  1723  		}
  1724  
  1725  		return e.complexity.User.Updated(childComplexity), true
  1726  
  1727  	case "VOkCaseNil.value":
  1728  		if e.complexity.VOkCaseNil.Value == nil {
  1729  			break
  1730  		}
  1731  
  1732  		return e.complexity.VOkCaseNil.Value(childComplexity), true
  1733  
  1734  	case "VOkCaseValue.value":
  1735  		if e.complexity.VOkCaseValue.Value == nil {
  1736  			break
  1737  		}
  1738  
  1739  		return e.complexity.VOkCaseValue.Value(childComplexity), true
  1740  
  1741  	case "ValidType.differentCase":
  1742  		if e.complexity.ValidType.DifferentCase == nil {
  1743  			break
  1744  		}
  1745  
  1746  		return e.complexity.ValidType.DifferentCase(childComplexity), true
  1747  
  1748  	case "ValidType.different_case":
  1749  		if e.complexity.ValidType.DifferentCaseOld == nil {
  1750  			break
  1751  		}
  1752  
  1753  		return e.complexity.ValidType.DifferentCaseOld(childComplexity), true
  1754  
  1755  	case "ValidType.validArgs":
  1756  		if e.complexity.ValidType.ValidArgs == nil {
  1757  			break
  1758  		}
  1759  
  1760  		args, err := ec.field_ValidType_validArgs_args(context.TODO(), rawArgs)
  1761  		if err != nil {
  1762  			return 0, false
  1763  		}
  1764  
  1765  		return e.complexity.ValidType.ValidArgs(childComplexity, args["break"].(string), args["default"].(string), args["func"].(string), args["interface"].(string), args["select"].(string), args["case"].(string), args["defer"].(string), args["go"].(string), args["map"].(string), args["struct"].(string), args["chan"].(string), args["else"].(string), args["goto"].(string), args["package"].(string), args["switch"].(string), args["const"].(string), args["fallthrough"].(string), args["if"].(string), args["range"].(string), args["type"].(string), args["continue"].(string), args["for"].(string), args["import"].(string), args["return"].(string), args["var"].(string), args["_"].(string)), true
  1766  
  1767  	case "ValidType.validInputKeywords":
  1768  		if e.complexity.ValidType.ValidInputKeywords == nil {
  1769  			break
  1770  		}
  1771  
  1772  		args, err := ec.field_ValidType_validInputKeywords_args(context.TODO(), rawArgs)
  1773  		if err != nil {
  1774  			return 0, false
  1775  		}
  1776  
  1777  		return e.complexity.ValidType.ValidInputKeywords(childComplexity, args["input"].(*ValidInput)), true
  1778  
  1779  	case "WrappedMap.get":
  1780  		if e.complexity.WrappedMap.Get == nil {
  1781  			break
  1782  		}
  1783  
  1784  		args, err := ec.field_WrappedMap_get_args(context.TODO(), rawArgs)
  1785  		if err != nil {
  1786  			return 0, false
  1787  		}
  1788  
  1789  		return e.complexity.WrappedMap.Get(childComplexity, args["key"].(string)), true
  1790  
  1791  	case "WrappedSlice.get":
  1792  		if e.complexity.WrappedSlice.Get == nil {
  1793  			break
  1794  		}
  1795  
  1796  		args, err := ec.field_WrappedSlice_get_args(context.TODO(), rawArgs)
  1797  		if err != nil {
  1798  			return 0, false
  1799  		}
  1800  
  1801  		return e.complexity.WrappedSlice.Get(childComplexity, args["idx"].(int)), true
  1802  
  1803  	case "WrappedStruct.desc":
  1804  		if e.complexity.WrappedStruct.Desc == nil {
  1805  			break
  1806  		}
  1807  
  1808  		return e.complexity.WrappedStruct.Desc(childComplexity), true
  1809  
  1810  	case "WrappedStruct.name":
  1811  		if e.complexity.WrappedStruct.Name == nil {
  1812  			break
  1813  		}
  1814  
  1815  		return e.complexity.WrappedStruct.Name(childComplexity), true
  1816  
  1817  	case "XXIt.id":
  1818  		if e.complexity.XXIt.ID == nil {
  1819  			break
  1820  		}
  1821  
  1822  		return e.complexity.XXIt.ID(childComplexity), true
  1823  
  1824  	case "XxIt.id":
  1825  		if e.complexity.XxIt.ID == nil {
  1826  			break
  1827  		}
  1828  
  1829  		return e.complexity.XxIt.ID(childComplexity), true
  1830  
  1831  	case "asdfIt.id":
  1832  		if e.complexity.AsdfIt.ID == nil {
  1833  			break
  1834  		}
  1835  
  1836  		return e.complexity.AsdfIt.ID(childComplexity), true
  1837  
  1838  	case "iIt.id":
  1839  		if e.complexity.IIt.ID == nil {
  1840  			break
  1841  		}
  1842  
  1843  		return e.complexity.IIt.ID(childComplexity), true
  1844  
  1845  	}
  1846  	return 0, false
  1847  }
  1848  
  1849  func (e *executableSchema) Exec(ctx context.Context) graphql.ResponseHandler {
  1850  	rc := graphql.GetOperationContext(ctx)
  1851  	ec := executionContext{rc, e}
  1852  	first := true
  1853  
  1854  	switch rc.Operation.Operation {
  1855  	case ast.Query:
  1856  		return func(ctx context.Context) *graphql.Response {
  1857  			if !first {
  1858  				return nil
  1859  			}
  1860  			first = false
  1861  			data := ec._Query(ctx, rc.Operation.SelectionSet)
  1862  			var buf bytes.Buffer
  1863  			data.MarshalGQL(&buf)
  1864  
  1865  			return &graphql.Response{
  1866  				Data: buf.Bytes(),
  1867  			}
  1868  		}
  1869  	case ast.Mutation:
  1870  		return func(ctx context.Context) *graphql.Response {
  1871  			if !first {
  1872  				return nil
  1873  			}
  1874  			first = false
  1875  			data := ec._Mutation(ctx, rc.Operation.SelectionSet)
  1876  			var buf bytes.Buffer
  1877  			data.MarshalGQL(&buf)
  1878  
  1879  			return &graphql.Response{
  1880  				Data: buf.Bytes(),
  1881  			}
  1882  		}
  1883  	case ast.Subscription:
  1884  		next := ec._Subscription(ctx, rc.Operation.SelectionSet)
  1885  
  1886  		var buf bytes.Buffer
  1887  		return func(ctx context.Context) *graphql.Response {
  1888  			buf.Reset()
  1889  			data := next()
  1890  
  1891  			if data == nil {
  1892  				return nil
  1893  			}
  1894  			data.MarshalGQL(&buf)
  1895  
  1896  			return &graphql.Response{
  1897  				Data: buf.Bytes(),
  1898  			}
  1899  		}
  1900  
  1901  	default:
  1902  		return graphql.OneShot(graphql.ErrorResponse(ctx, "unsupported GraphQL operation"))
  1903  	}
  1904  }
  1905  
  1906  type executionContext struct {
  1907  	*graphql.OperationContext
  1908  	*executableSchema
  1909  }
  1910  
  1911  func (ec *executionContext) introspectSchema() (*introspection.Schema, error) {
  1912  	if ec.DisableIntrospection {
  1913  		return nil, errors.New("introspection disabled")
  1914  	}
  1915  	return introspection.WrapSchema(parsedSchema), nil
  1916  }
  1917  
  1918  func (ec *executionContext) introspectType(name string) (*introspection.Type, error) {
  1919  	if ec.DisableIntrospection {
  1920  		return nil, errors.New("introspection disabled")
  1921  	}
  1922  	return introspection.WrapTypeFromDef(parsedSchema, parsedSchema.Types[name]), nil
  1923  }
  1924  
  1925  var sources = []*ast.Source{
  1926  	{Name: "builtinscalar.graphql", Input: `
  1927  """
  1928  Since gqlgen defines default implementation for a Map scalar, this tests that the builtin is _not_
  1929  added to the TypeMap
  1930  """
  1931  type Map {
  1932      id: ID!
  1933  }
  1934  `, BuiltIn: false},
  1935  	{Name: "complexity.graphql", Input: `extend type Query {
  1936      overlapping: OverlappingFields
  1937  }
  1938  
  1939  type OverlappingFields {
  1940    oneFoo: Int! @goField(name: "foo")
  1941    twoFoo: Int! @goField(name: "foo")
  1942    oldFoo: Int! @goField(name: "foo", forceResolver: true)
  1943    newFoo: Int!
  1944    new_foo: Int!
  1945  }
  1946  `, BuiltIn: false},
  1947  	{Name: "defaults.graphql", Input: `extend type Query {
  1948      defaultParameters(
  1949          falsyBoolean: Boolean = false
  1950          truthyBoolean: Boolean = true
  1951      ): DefaultParametersMirror!
  1952  }
  1953  
  1954  extend type Mutation {
  1955      defaultInput(input: DefaultInput!): DefaultParametersMirror!
  1956  }
  1957  
  1958  input DefaultInput {
  1959      falsyBoolean: Boolean = false
  1960      truthyBoolean: Boolean = true
  1961  }
  1962  
  1963  type DefaultParametersMirror {
  1964      falsyBoolean: Boolean
  1965      truthyBoolean: Boolean
  1966  }
  1967  `, BuiltIn: false},
  1968  	{Name: "directive.graphql", Input: `directive @length(min: Int!, max: Int, message: String) on ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION | FIELD_DEFINITION
  1969  directive @range(min: Int = 0, max: Int) on ARGUMENT_DEFINITION
  1970  directive @custom on ARGUMENT_DEFINITION
  1971  directive @logged(id: UUID!) on FIELD
  1972  directive @toNull on ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION | FIELD_DEFINITION
  1973  directive @directive1 on FIELD_DEFINITION
  1974  directive @directive2 on FIELD_DEFINITION
  1975  directive @directive3 on INPUT_OBJECT
  1976  directive @unimplemented on FIELD_DEFINITION
  1977  directive @order1(location: String!) repeatable on FIELD_DEFINITION | OBJECT
  1978  directive @order2(location: String!) on OBJECT
  1979  
  1980  extend type Query {
  1981      directiveArg(arg: String! @length(min:1, max: 255, message: "invalid length")): String
  1982      directiveNullableArg(arg: Int @range(min:0), arg2: Int @range, arg3: String @toNull): String
  1983      directiveInputNullable(arg: InputDirectives): String
  1984      directiveInput(arg: InputDirectives!): String
  1985      directiveInputType(arg: InnerInput! @custom): String
  1986      directiveObject: ObjectDirectives @order1(location: "Query_field")
  1987      directiveObjectWithCustomGoModel: ObjectDirectivesWithCustomGoModel
  1988      directiveFieldDef(ret: String!): String! @length(min: 1, message: "not valid")
  1989      directiveField: String
  1990      directiveDouble: String @directive1 @directive2
  1991      directiveUnimplemented: String @unimplemented
  1992  }
  1993  
  1994  extend type Subscription {
  1995      directiveArg(arg: String! @length(min:1, max: 255, message: "invalid length")): String
  1996      directiveNullableArg(arg: Int @range(min:0), arg2: Int @range, arg3: String @toNull): String
  1997      directiveDouble: String @directive1 @directive2
  1998      directiveUnimplemented: String @unimplemented
  1999  }
  2000  
  2001  input InputDirectives @directive3 {
  2002      text: String! @length(min: 0, max: 7, message: "not valid")
  2003      nullableText: String @toNull
  2004      inner: InnerDirectives!
  2005      innerNullable: InnerDirectives
  2006      thirdParty: ThirdParty @length(min: 0, max: 7)
  2007  }
  2008  
  2009  input InnerDirectives {
  2010      message: String! @length(min: 1, message: "not valid")
  2011  }
  2012  
  2013  type ObjectDirectives @order1(location: "order1_1") @order1(location: "order1_2") @order2(location: "order2_1") {
  2014      text: String! @length(min: 0, max: 7, message: "not valid")
  2015      nullableText: String @toNull
  2016      order: [String!]!
  2017  }
  2018  
  2019  type ObjectDirectivesWithCustomGoModel {
  2020      nullableText: String @toNull
  2021  }
  2022  `, BuiltIn: false},
  2023  	{Name: "embedded.graphql", Input: `extend type Query {
  2024      embeddedCase1: EmbeddedCase1
  2025      embeddedCase2: EmbeddedCase2
  2026      embeddedCase3: EmbeddedCase3
  2027  }
  2028  
  2029  type EmbeddedCase1 @goModel(model:"followschema.EmbeddedCase1") {
  2030      exportedEmbeddedPointerExportedMethod: String!
  2031  }
  2032  
  2033  type EmbeddedCase2 @goModel(model:"followschema.EmbeddedCase2") {
  2034      unexportedEmbeddedPointerExportedMethod: String!
  2035  }
  2036  
  2037  type EmbeddedCase3 @goModel(model:"followschema.EmbeddedCase3") {
  2038      unexportedEmbeddedInterfaceExportedMethod: String!
  2039  }
  2040  `, BuiltIn: false},
  2041  	{Name: "enum.graphql", Input: `enum EnumTest {
  2042      OK
  2043      NG
  2044  }
  2045  
  2046  input InputWithEnumValue {
  2047      enum: EnumTest!
  2048  }
  2049  
  2050  extend type Query {
  2051      enumInInput(input: InputWithEnumValue): EnumTest!
  2052  }
  2053  `, BuiltIn: false},
  2054  	{Name: "interfaces.graphql", Input: `extend type Query {
  2055      shapes: [Shape]
  2056      noShape: Shape @makeNil
  2057      node: Node!
  2058      noShapeTypedNil: Shape @makeTypedNil
  2059      animal: Animal @makeTypedNil
  2060      notAnInterface: BackedByInterface
  2061  }
  2062  
  2063  interface Animal {
  2064      species: String!
  2065  }
  2066  
  2067  type BackedByInterface {
  2068      id: String!
  2069      thisShouldBind: String!
  2070      thisShouldBindWithError: String!
  2071  }
  2072  
  2073  type Dog implements Animal {
  2074      species: String!
  2075      dogBreed: String!
  2076  }
  2077  
  2078  type Cat implements Animal {
  2079      species: String!
  2080      catBreed: String!
  2081  }
  2082  
  2083  type Coordinates {
  2084      x: Float!
  2085      y: Float!
  2086  }
  2087  interface Shape {
  2088      area: Float
  2089      coordinates: Coordinates
  2090  }
  2091  
  2092  type Circle implements Shape {
  2093      radius: Float
  2094      area: Float
  2095      coordinates: Coordinates
  2096  }
  2097  type Rectangle implements Shape {
  2098      length: Float
  2099      width: Float
  2100      area: Float
  2101      coordinates: Coordinates
  2102  }
  2103  union ShapeUnion @goModel(model: "followschema.ShapeUnion") = Circle | Rectangle
  2104  
  2105  directive @makeNil on FIELD_DEFINITION
  2106  directive @makeTypedNil on FIELD_DEFINITION
  2107  
  2108  interface Node {
  2109      id: ID!
  2110      child: Node!
  2111  }
  2112  
  2113  type ConcreteNodeA implements Node {
  2114      id: ID!
  2115      child: Node!
  2116      name: String!
  2117  }
  2118  
  2119  " Implements the Node interface with another interface "
  2120  type ConcreteNodeInterface implements Node {
  2121      id: ID!
  2122      child: Node!
  2123  }
  2124  `, BuiltIn: false},
  2125  	{Name: "issue896.graphql", Input: `# This example should build stable output. If the file content starts
  2126  # alternating nondeterministically between two outputs, then see
  2127  # https://github.com/operandinc/gqlgen/issues/896.
  2128  
  2129  extend schema {
  2130    query: Query
  2131    subscription: Subscription
  2132  }
  2133  
  2134  type CheckIssue896 {id: Int}
  2135  
  2136  extend type Query {
  2137    issue896a: [CheckIssue896!] # Note the "!" or lack thereof.
  2138  }
  2139  
  2140  extend type Subscription {
  2141    issue896b: [CheckIssue896] # Note the "!" or lack thereof.
  2142  }
  2143  `, BuiltIn: false},
  2144  	{Name: "loops.graphql", Input: `type LoopA {
  2145      b: LoopB!
  2146  }
  2147  
  2148  type LoopB {
  2149      a: LoopA!
  2150  }
  2151  `, BuiltIn: false},
  2152  	{Name: "maps.graphql", Input: `extend type Query {
  2153      mapStringInterface(in: MapStringInterfaceInput): MapStringInterfaceType
  2154      mapNestedStringInterface(in: NestedMapInput): MapStringInterfaceType
  2155  }
  2156  
  2157  type MapStringInterfaceType @goModel(model: "map[string]interface{}") {
  2158      a: String
  2159      b: Int
  2160  }
  2161  
  2162  input MapStringInterfaceInput @goModel(model: "map[string]interface{}") {
  2163      a: String
  2164      b: Int
  2165  }
  2166  
  2167  input NestedMapInput {
  2168      map: MapStringInterfaceInput
  2169  }
  2170  `, BuiltIn: false},
  2171  	{Name: "mutation_with_custom_scalar.graphql", Input: `extend type Mutation {
  2172      updateSomething(input: SpecialInput!): String!
  2173  }
  2174  
  2175  scalar Email
  2176  
  2177  input SpecialInput {
  2178      nesting: NestedInput!
  2179  }
  2180  
  2181  input NestedInput {
  2182      field: Email!
  2183  }
  2184  `, BuiltIn: false},
  2185  	{Name: "nulls.graphql", Input: `extend type Query {
  2186      errorBubble: Error
  2187      errorBubbleList: [Error!]
  2188      errorList: [Error]
  2189      errors: Errors
  2190      valid: String!
  2191  }
  2192  
  2193  type Errors {
  2194      a: Error!
  2195      b: Error!
  2196      c: Error!
  2197      d: Error!
  2198      e: Error!
  2199  }
  2200  
  2201  type Error {
  2202      id: ID!
  2203      errorOnNonRequiredField: String
  2204      errorOnRequiredField: String!
  2205      nilOnRequiredField: String!
  2206  }
  2207  `, BuiltIn: false},
  2208  	{Name: "panics.graphql", Input: `extend type Query {
  2209      panics: Panics
  2210  }
  2211  
  2212  type Panics {
  2213      fieldScalarMarshal: [MarshalPanic!]!
  2214      fieldFuncMarshal(u: [MarshalPanic!]!): [MarshalPanic!]!
  2215      argUnmarshal(u: [MarshalPanic!]!): Boolean!
  2216  
  2217  }
  2218  
  2219  scalar MarshalPanic
  2220  `, BuiltIn: false},
  2221  	{Name: "primitive_objects.graphql", Input: `extend type Query {
  2222      primitiveObject: [Primitive!]!
  2223      primitiveStringObject: [PrimitiveString!]!
  2224  }
  2225  
  2226  type Primitive {
  2227      value: Int!
  2228      squared: Int!
  2229  }
  2230  
  2231  type PrimitiveString {
  2232      value: String!
  2233      doubled: String!
  2234      len: Int!
  2235  }
  2236  `, BuiltIn: false},
  2237  	{Name: "ptr_to_ptr_input.graphql", Input: `type PtrToPtrOuter {
  2238      name: String!
  2239      inner: PtrToPtrInner
  2240      stupidInner: PtrToPtrInner
  2241  }
  2242  
  2243  type PtrToPtrInner {
  2244      key: String!
  2245      value: String!
  2246  }
  2247  
  2248  input UpdatePtrToPtrOuter {
  2249      name: String
  2250      inner: UpdatePtrToPtrInner
  2251      stupidInner: UpdatePtrToPtrInner
  2252  }
  2253  
  2254  input UpdatePtrToPtrInner {
  2255      key: String
  2256      value: String
  2257  }
  2258  
  2259  extend type Mutation {
  2260      updatePtrToPtr(input: UpdatePtrToPtrOuter!): PtrToPtrOuter!
  2261  }
  2262  `, BuiltIn: false},
  2263  	{Name: "ptr_to_slice.graphql", Input: `type PtrToSliceContainer {
  2264      ptrToSlice: [String!]
  2265  }
  2266  
  2267  extend type Query {
  2268      ptrToSliceContainer: PtrToSliceContainer!
  2269  }
  2270  `, BuiltIn: false},
  2271  	{Name: "scalar_context.graphql", Input: `extend type Query {
  2272      infinity: Float!
  2273      stringFromContextInterface: StringFromContextInterface!
  2274      stringFromContextFunction: StringFromContextFunction!
  2275  }
  2276  
  2277  scalar StringFromContextInterface
  2278  scalar StringFromContextFunction
  2279  `, BuiltIn: false},
  2280  	{Name: "scalar_default.graphql", Input: `extend type Query {
  2281      defaultScalar(arg: DefaultScalarImplementation! = "default"): DefaultScalarImplementation!
  2282  }
  2283  
  2284  """ This doesnt have an implementation in the typemap, so it should act like a string """
  2285  scalar DefaultScalarImplementation
  2286  
  2287  type EmbeddedDefaultScalar {
  2288      value: DefaultScalarImplementation
  2289  }
  2290  `, BuiltIn: false},
  2291  	{Name: "schema.graphql", Input: `directive @goModel(
  2292      model: String
  2293      models: [String!]
  2294  ) on OBJECT | INPUT_OBJECT | SCALAR | ENUM | INTERFACE | UNION
  2295  directive @goField(
  2296      forceResolver: Boolean
  2297      name: String
  2298  ) on INPUT_FIELD_DEFINITION | FIELD_DEFINITION
  2299  
  2300  type Query {
  2301      invalidIdentifier: InvalidIdentifier
  2302      collision: It
  2303      mapInput(input: Changes): Boolean
  2304      recursive(input: RecursiveInputSlice): Boolean
  2305      nestedInputs(input: [[OuterInput]] = [[{ inner: { id: 1 } }]]): Boolean
  2306      nestedOutputs: [[OuterObject]]
  2307      modelMethods: ModelMethods
  2308      user(id: Int!): User!
  2309      nullableArg(arg: Int = 123): String
  2310      inputSlice(arg: [String!]!): Boolean!
  2311      inputNullableSlice(arg: [String!]): Boolean!
  2312      shapeUnion: ShapeUnion!
  2313      autobind: Autobind
  2314      deprecatedField: String! @deprecated(reason: "test deprecated directive")
  2315  }
  2316  
  2317  type Subscription {
  2318      updated: String!
  2319      initPayload: String!
  2320  }
  2321  
  2322  type User {
  2323      id: Int!
  2324      friends: [User!]! @goField(forceResolver: true)
  2325      created: Time!
  2326      updated: Time
  2327  }
  2328  
  2329  type Autobind {
  2330      int: Int!
  2331      int32: Int!
  2332      int64: Int!
  2333  
  2334      idStr: ID!
  2335      idInt: ID!
  2336  }
  2337  
  2338  type ModelMethods {
  2339      resolverField: Boolean!
  2340      noContext: Boolean!
  2341      withContext: Boolean!
  2342  }
  2343  
  2344  type InvalidIdentifier {
  2345      id: Int!
  2346  }
  2347  
  2348  type It {
  2349      id: ID!
  2350  }
  2351  
  2352  input Changes @goModel(model: "map[string]interface{}") {
  2353      a: Int
  2354      b: Int
  2355  }
  2356  
  2357  input RecursiveInputSlice {
  2358      self: [RecursiveInputSlice!]
  2359  }
  2360  
  2361  input InnerInput {
  2362      id: Int!
  2363  }
  2364  
  2365  input OuterInput {
  2366      inner: InnerInput!
  2367  }
  2368  
  2369  scalar ThirdParty @goModel(model:"followschema.ThirdParty")
  2370  
  2371  type OuterObject {
  2372      inner: InnerObject!
  2373  }
  2374  
  2375  type InnerObject {
  2376      id: Int!
  2377  }
  2378  
  2379  type ForcedResolver {
  2380      field: Circle @goField(forceResolver: true)
  2381  }
  2382  
  2383  type EmbeddedPointer @goModel(model:"followschema.EmbeddedPointerModel") {
  2384      ID: String
  2385      Title: String
  2386  }
  2387  
  2388  scalar UUID
  2389  
  2390  enum Status {
  2391      OK
  2392      ERROR
  2393  }
  2394  
  2395  scalar Time
  2396  `, BuiltIn: false},
  2397  	{Name: "slices.graphql", Input: `extend type Query {
  2398      slices: Slices
  2399      scalarSlice: Bytes!
  2400  }
  2401  
  2402  type Slices {
  2403      test1: [String]
  2404      test2: [String!]
  2405      test3: [String]!
  2406      test4: [String!]!
  2407  }
  2408  
  2409  scalar Bytes
  2410  `, BuiltIn: false},
  2411  	{Name: "typefallback.graphql", Input: `extend type Query {
  2412      fallback(arg: FallbackToStringEncoding!): FallbackToStringEncoding!
  2413  }
  2414  
  2415  enum FallbackToStringEncoding {
  2416      A
  2417      B
  2418      C
  2419  }
  2420  `, BuiltIn: false},
  2421  	{Name: "useptr.graphql", Input: `type A {
  2422      id: ID!
  2423  }
  2424  
  2425  type B {
  2426      id: ID!
  2427  }
  2428  
  2429  union TestUnion = A | B
  2430  
  2431  extend type Query {
  2432      optionalUnion: TestUnion
  2433  }
  2434  `, BuiltIn: false},
  2435  	{Name: "v-ok.graphql", Input: `extend type Query {
  2436      vOkCaseValue: VOkCaseValue
  2437      vOkCaseNil: VOkCaseNil
  2438  }
  2439  
  2440  type VOkCaseValue @goModel(model:"followschema.VOkCaseValue") {
  2441    value: String
  2442  }
  2443  
  2444  type VOkCaseNil @goModel(model:"followschema.VOkCaseNil") {
  2445    value: String
  2446  }
  2447  `, BuiltIn: false},
  2448  	{Name: "validtypes.graphql", Input: `extend type Query {
  2449      validType: ValidType
  2450  }
  2451  
  2452  """ These things are all valid, but without care generate invalid go code """
  2453  type ValidType {
  2454      differentCase: String!
  2455      different_case: String! @goField(name:"DifferentCaseOld")
  2456      validInputKeywords(input: ValidInput): Boolean!
  2457      validArgs(
  2458          break:       String!,
  2459          default:     String!,
  2460          func:        String!,
  2461          interface:   String!,
  2462          select:      String!,
  2463          case:        String!,
  2464          defer:       String!,
  2465          go:          String!,
  2466          map:         String!,
  2467          struct:      String!,
  2468          chan:        String!,
  2469          else:        String!,
  2470          goto:        String!,
  2471          package:     String!,
  2472          switch:      String!,
  2473          const:       String!,
  2474          fallthrough: String!,
  2475          if:          String!,
  2476          range:       String!,
  2477          type:        String!,
  2478          continue:    String!,
  2479          for:         String!,
  2480          import:      String!,
  2481          return:      String!,
  2482          var:         String!,
  2483          _:           String!,
  2484      ): Boolean!
  2485  }
  2486  
  2487  input ValidInput {
  2488      break:       String!
  2489      default:     String!
  2490      func:        String!
  2491      interface:   String!
  2492      select:      String!
  2493      case:        String!
  2494      defer:       String!
  2495      go:          String!
  2496      map:         String!
  2497      struct:      String!
  2498      chan:        String!
  2499      else:        String!
  2500      goto:        String!
  2501      package:     String!
  2502      switch:      String!
  2503      const:       String!
  2504      fallthrough: String!
  2505      if:          String!
  2506      range:       String!
  2507      type:        String!
  2508      continue:    String!
  2509      for:         String!
  2510      import:      String!
  2511      return:      String!
  2512      var:         String!
  2513      _:           String! @goField(name: "Underscore")
  2514  }
  2515  
  2516  # see https://github.com/operandinc/gqlgen/issues/694
  2517  type Content_User {
  2518    foo: String
  2519  }
  2520  
  2521  type Content_Post {
  2522    foo: String
  2523  }
  2524  
  2525  union Content_Child = Content_User | Content_Post
  2526  `, BuiltIn: false},
  2527  	{Name: "weird_type_cases.graphql", Input: `# regression test for https://github.com/operandinc/gqlgen/issues/583
  2528  
  2529  type asdfIt { id: ID! }
  2530  type iIt { id: ID! }
  2531  type AIt { id: ID! }
  2532  type XXIt { id: ID! }
  2533  type AbIt { id: ID! }
  2534  type XxIt { id: ID! }
  2535  `, BuiltIn: false},
  2536  	{Name: "wrapped_type.graphql", Input: `# regression test for https://github.com/operandinc/gqlgen/issues/721
  2537  
  2538  extend type Query {
  2539      wrappedStruct: WrappedStruct!
  2540      wrappedScalar: WrappedScalar!
  2541      wrappedMap: WrappedMap!
  2542      wrappedSlice: WrappedSlice!
  2543  }
  2544  
  2545  type WrappedStruct { name: WrappedScalar!, desc: WrappedScalar }
  2546  scalar WrappedScalar
  2547  type WrappedMap { get(key: String!): String! }
  2548  type WrappedSlice { get(idx: Int!): String! }
  2549  `, BuiltIn: false},
  2550  }
  2551  var parsedSchema = gqlparser.MustLoadSchema(sources...)