From e57464fef03faff2664fa249de8f9c0e821ed910 Mon Sep 17 00:00:00 2001 From: vvakame Date: Wed, 22 Aug 2018 18:47:23 +0900 Subject: [PATCH] refactor ResolverContext#indicies and suppress lint error --- codegen/object.go | 5 +- codegen/templates/data.go | 2 +- codegen/templates/field.gotpl | 5 +- codegen/testserver/generated.go | 124 +++++++++++++++++----- example/chat/generated.go | 101 +++++++++++++----- example/config/generated.go | 98 ++++++++++++++---- example/dataloader/generated.go | 129 +++++++++++++++++------ example/scalars/generated.go | 101 ++++++++++++++---- example/selection/generated.go | 118 +++++++++++++++------ example/starwars/generated.go | 177 ++++++++++++++++++++++++-------- example/todo/generated.go | 98 ++++++++++++++---- graphql/context.go | 28 +---- integration/generated.go | 110 +++++++++++++++----- 13 files changed, 824 insertions(+), 272 deletions(-) diff --git a/codegen/object.go b/codegen/object.go index b064c7cb1ea..bb2bea8167e 100644 --- a/codegen/object.go +++ b/codegen/object.go @@ -216,8 +216,9 @@ func (f *Field) doWriteJson(val string, remainingMods []string, astType *ast.Typ return tpl(`{{.arr}} := graphql.Array{} for {{.index}} := range {{.val}} { {{.arr}} = append({{.arr}}, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex({{.index}}) + rctx := &graphql.ResolverContext{ + Index: &{{.index}}, + } ctx = graphql.WithResolverContext(ctx, rctx) {{ .next }} }(ctx)) diff --git a/codegen/templates/data.go b/codegen/templates/data.go index 6ec13d88c23..ebb1a2f57ef 100644 --- a/codegen/templates/data.go +++ b/codegen/templates/data.go @@ -2,7 +2,7 @@ package templates var data = map[string]string{ "args.gotpl": "\t{{- if . }}args := map[string]interface{}{} {{end}}\n\t{{- range $i, $arg := . }}\n\t\tvar arg{{$i}} {{$arg.Signature }}\n\t\tif tmp, ok := rawArgs[{{$arg.GQLName|quote}}]; ok {\n\t\t\tvar err error\n\t\t\t{{$arg.Unmarshal (print \"arg\" $i) \"tmp\" }}\n\t\t\tif err != nil {\n\t\t\t\tec.Error(ctx, err)\n\t\t\t\t{{- if $arg.Stream }}\n\t\t\t\t\treturn nil\n\t\t\t\t{{- else }}\n\t\t\t\t\treturn graphql.Null\n\t\t\t\t{{- end }}\n\t\t\t}\n\t\t}\n\t\targs[{{$arg.GQLName|quote}}] = arg{{$i}}\n\t{{- end -}}\n", - "field.gotpl": "{{ $field := . }}\n{{ $object := $field.Object }}\n\n{{- if $object.Stream }}\n\tfunc (ec *executionContext) _{{$object.GQLType}}_{{$field.GQLName}}(ctx context.Context, field graphql.CollectedField) func() graphql.Marshaler {\n\t\t{{- if $field.Args }}\n\t\t\trawArgs := field.ArgumentMap(ec.Variables)\n\t\t\t{{ template \"args.gotpl\" $field.Args }}\n\t\t{{- end }}\n\t\tctx = graphql.WithResolverContext(ctx, &graphql.ResolverContext{Field: field})\n\t\tresults, err := ec.resolvers.{{ $field.ShortInvocation }}\n\t\tif err != nil {\n\t\t\tec.Error(ctx, err)\n\t\t\treturn nil\n\t\t}\n\t\treturn func() graphql.Marshaler {\n\t\t\tres, ok := <-results\n\t\t\tif !ok {\n\t\t\t\treturn nil\n\t\t\t}\n\t\t\tvar out graphql.OrderedMap\n\t\t\tout.Add(field.Alias, func() graphql.Marshaler { {{ $field.WriteJson }} }())\n\t\t\treturn &out\n\t\t}\n\t}\n{{ else }}\n\tfunc (ec *executionContext) _{{$object.GQLType}}_{{$field.GQLName}}(ctx context.Context, field graphql.CollectedField, {{if not $object.Root}}obj *{{$object.FullName}}{{end}}) graphql.Marshaler {\n\t\t{{- if $field.Args }}\n\t\t\trawArgs := field.ArgumentMap(ec.Variables)\n\t\t\t{{ template \"args.gotpl\" $field.Args }}\n\t\t{{- end }}\n\t\trctx := &graphql.ResolverContext{\n\t\t\tObject: {{$object.GQLType|quote}},\n\t\t\tArgs: {{if $field.Args }}args{{else}}nil{{end}},\n\t\t\tField: field,\n\t\t}\n\t\tctx = graphql.WithResolverContext(ctx, rctx)\n\t\tresTmp := ec.FieldMiddleware(ctx, func(ctx context.Context) (interface{}, error) {\n\t\t\t{{- if $field.IsResolver }}\n\t\t\t\treturn ec.resolvers.{{ $field.ShortInvocation }}\n\t\t\t{{- else if $field.IsMethod }}\n\t\t\t\t{{- if $field.NoErr }}\n\t\t\t\t\treturn {{$field.GoReceiverName}}.{{$field.GoFieldName}}({{ $field.CallArgs }}), nil\n\t\t\t\t{{- else }}\n\t\t\t\t\treturn {{$field.GoReceiverName}}.{{$field.GoFieldName}}({{ $field.CallArgs }})\n\t\t\t\t{{- end }}\n\t\t\t{{- else if $field.IsVariable }}\n\t\t\t\treturn {{$field.GoReceiverName}}.{{$field.GoFieldName}}, nil\n\t\t\t{{- end }}\n\t\t})\n\t\tif resTmp == nil {\n\t\t\t{{- if $field.ASTType.NonNull }}\n\t\t\t\tif !ec.HasError(rctx) {\n\t\t\t\t\tec.Errorf(ctx, \"must not be null\")\n\t\t\t\t}\n\t\t\t{{- end }}\n\t\t\treturn graphql.Null\n\t\t}\n\t\tres := resTmp.({{$field.Signature}})\n\t\t{{ $field.WriteJson }}\n\t}\n{{ end }}\n", + "field.gotpl": "{{ $field := . }}\n{{ $object := $field.Object }}\n\n{{- if $object.Stream }}\n\tfunc (ec *executionContext) _{{$object.GQLType}}_{{$field.GQLName}}(ctx context.Context, field graphql.CollectedField) func() graphql.Marshaler {\n\t\t{{- if $field.Args }}\n\t\t\trawArgs := field.ArgumentMap(ec.Variables)\n\t\t\t{{ template \"args.gotpl\" $field.Args }}\n\t\t{{- end }}\n\t\tctx = graphql.WithResolverContext(ctx, &graphql.ResolverContext{\n\t\t\tField: field,\n\t\t})\n\t\tresults, err := ec.resolvers.{{ $field.ShortInvocation }}\n\t\tif err != nil {\n\t\t\tec.Error(ctx, err)\n\t\t\treturn nil\n\t\t}\n\t\treturn func() graphql.Marshaler {\n\t\t\tres, ok := <-results\n\t\t\tif !ok {\n\t\t\t\treturn nil\n\t\t\t}\n\t\t\tvar out graphql.OrderedMap\n\t\t\tout.Add(field.Alias, func() graphql.Marshaler { {{ $field.WriteJson }} }())\n\t\t\treturn &out\n\t\t}\n\t}\n{{ else }}\n\t// nolint: megacheck, ineffassign\n\tfunc (ec *executionContext) _{{$object.GQLType}}_{{$field.GQLName}}(ctx context.Context, field graphql.CollectedField, {{if not $object.Root}}obj *{{$object.FullName}}{{end}}) graphql.Marshaler {\n\t\t{{- if $field.Args }}\n\t\t\trawArgs := field.ArgumentMap(ec.Variables)\n\t\t\t{{ template \"args.gotpl\" $field.Args }}\n\t\t{{- end }}\n\t\trctx := &graphql.ResolverContext{\n\t\t\tObject: {{$object.GQLType|quote}},\n\t\t\tArgs: {{if $field.Args }}args{{else}}nil{{end}},\n\t\t\tField: field,\n\t\t}\n\t\tctx = graphql.WithResolverContext(ctx, rctx)\n\t\tresTmp := ec.FieldMiddleware(ctx, func(ctx context.Context) (interface{}, error) {\n\t\t\t{{- if $field.IsResolver }}\n\t\t\t\treturn ec.resolvers.{{ $field.ShortInvocation }}\n\t\t\t{{- else if $field.IsMethod }}\n\t\t\t\t{{- if $field.NoErr }}\n\t\t\t\t\treturn {{$field.GoReceiverName}}.{{$field.GoFieldName}}({{ $field.CallArgs }}), nil\n\t\t\t\t{{- else }}\n\t\t\t\t\treturn {{$field.GoReceiverName}}.{{$field.GoFieldName}}({{ $field.CallArgs }})\n\t\t\t\t{{- end }}\n\t\t\t{{- else if $field.IsVariable }}\n\t\t\t\treturn {{$field.GoReceiverName}}.{{$field.GoFieldName}}, nil\n\t\t\t{{- end }}\n\t\t})\n\t\tif resTmp == nil {\n\t\t\t{{- if $field.ASTType.NonNull }}\n\t\t\t\tif !ec.HasError(rctx) {\n\t\t\t\t\tec.Errorf(ctx, \"must not be null\")\n\t\t\t\t}\n\t\t\t{{- end }}\n\t\t\treturn graphql.Null\n\t\t}\n\t\tres := resTmp.({{$field.Signature}})\n\t\t{{ $field.WriteJson }}\n\t}\n{{ end }}\n", "generated.gotpl": "// Code generated by github.com/99designs/gqlgen, DO NOT EDIT.\n\npackage {{ .PackageName }}\n\nimport (\n{{- range $import := .Imports }}\n\t{{- $import.Write }}\n{{ end }}\n)\n\n// NewExecutableSchema creates an ExecutableSchema from the ResolverRoot interface.\nfunc NewExecutableSchema(cfg Config) graphql.ExecutableSchema {\n\treturn &executableSchema{\n\t\tresolvers: cfg.Resolvers,\n\t\tdirectives: cfg.Directives,\n\t}\n}\n\ntype Config struct {\n\tResolvers ResolverRoot\n\tDirectives DirectiveRoot\n}\n\ntype ResolverRoot interface {\n{{- range $object := .Objects -}}\n\t{{ if $object.HasResolvers -}}\n\t\t{{$object.GQLType}}() {{$object.GQLType}}Resolver\n\t{{ end }}\n{{- end }}\n}\n\ntype DirectiveRoot struct {\n{{ range $directive := .Directives }}\n\t{{ $directive.Declaration }}\n{{ end }}\n}\n\n{{- range $object := .Objects -}}\n\t{{ if $object.HasResolvers }}\n\t\ttype {{$object.GQLType}}Resolver interface {\n\t\t{{ range $field := $object.Fields -}}\n\t\t\t{{ $field.ShortResolverDeclaration }}\n\t\t{{ end }}\n\t\t}\n\t{{- end }}\n{{- end }}\n\ntype executableSchema struct {\n\tresolvers ResolverRoot\n\tdirectives DirectiveRoot\n}\n\nfunc (e *executableSchema) Schema() *ast.Schema {\n\treturn parsedSchema\n}\n\nfunc (e *executableSchema) Query(ctx context.Context, op *ast.OperationDefinition) *graphql.Response {\n\t{{- if .QueryRoot }}\n\t\tec := executionContext{graphql.GetRequestContext(ctx), e}\n\n\t\tbuf := ec.RequestMiddleware(ctx, func(ctx context.Context) []byte {\n\t\t\tdata := ec._{{.QueryRoot.GQLType}}(ctx, op.SelectionSet)\n\t\t\tvar buf bytes.Buffer\n\t\t\tdata.MarshalGQL(&buf)\n\t\t\treturn buf.Bytes()\n\t\t})\n\n\t\treturn &graphql.Response{\n\t\t\tData: buf,\n\t\t\tErrors: ec.Errors,\n\t\t}\n\t{{- else }}\n\t\treturn graphql.ErrorResponse(ctx, \"queries are not supported\")\n\t{{- end }}\n}\n\nfunc (e *executableSchema) Mutation(ctx context.Context, op *ast.OperationDefinition) *graphql.Response {\n\t{{- if .MutationRoot }}\n\t\tec := executionContext{graphql.GetRequestContext(ctx), e}\n\n\t\tbuf := ec.RequestMiddleware(ctx, func(ctx context.Context) []byte {\n\t\t\tdata := ec._{{.MutationRoot.GQLType}}(ctx, op.SelectionSet)\n\t\t\tvar buf bytes.Buffer\n\t\t\tdata.MarshalGQL(&buf)\n\t\t\treturn buf.Bytes()\n\t\t})\n\n\t\treturn &graphql.Response{\n\t\t\tData: buf,\n\t\t\tErrors: ec.Errors,\n\t\t}\n\t{{- else }}\n\t\treturn graphql.ErrorResponse(ctx, \"mutations are not supported\")\n\t{{- end }}\n}\n\nfunc (e *executableSchema) Subscription(ctx context.Context, op *ast.OperationDefinition) func() *graphql.Response {\n\t{{- if .SubscriptionRoot }}\n\t\tec := executionContext{graphql.GetRequestContext(ctx), e}\n\n\t\tnext := ec._{{.SubscriptionRoot.GQLType}}(ctx, op.SelectionSet)\n\t\tif ec.Errors != nil {\n\t\t\treturn graphql.OneShot(&graphql.Response{Data: []byte(\"null\"), Errors: ec.Errors})\n\t\t}\n\n\t\tvar buf bytes.Buffer\n\t\treturn func() *graphql.Response {\n\t\t\tbuf := ec.RequestMiddleware(ctx, func(ctx context.Context) []byte {\n\t\t\t\tbuf.Reset()\n\t\t\t\tdata := next()\n\n\t\t\t\tif data == nil {\n\t\t\t\t\treturn nil\n\t\t\t\t}\n\t\t\t\tdata.MarshalGQL(&buf)\n\t\t\t\treturn buf.Bytes()\n\t\t\t})\n\n\t\t\treturn &graphql.Response{\n\t\t\t\tData: buf,\n\t\t\t\tErrors: ec.Errors,\n\t\t\t}\n\t\t}\n\t{{- else }}\n\t\treturn graphql.OneShot(graphql.ErrorResponse(ctx, \"subscriptions are not supported\"))\n\t{{- end }}\n}\n\ntype executionContext struct {\n\t*graphql.RequestContext\n\t*executableSchema\n}\n\n{{- range $object := .Objects }}\n\t{{ template \"object.gotpl\" $object }}\n\n\t{{- range $field := $object.Fields }}\n\t\t{{ template \"field.gotpl\" $field }}\n\t{{ end }}\n{{- end}}\n\n{{- range $interface := .Interfaces }}\n\t{{ template \"interface.gotpl\" $interface }}\n{{- end }}\n\n{{- range $input := .Inputs }}\n\t{{ template \"input.gotpl\" $input }}\n{{- end }}\n\nfunc (ec *executionContext) FieldMiddleware(ctx context.Context, next graphql.Resolver) (ret interface{}) {\n\tdefer func() {\n\t\tif r := recover(); r != nil {\n\t\t\tec.Error(ctx, ec.Recover(ctx, r))\n\t\t\tret = nil\n\t\t}\n\t}()\n\t{{- if .Directives }}\n\trctx := graphql.GetResolverContext(ctx)\n\tfor _, d := range rctx.Field.Definition.Directives {\n\t\tswitch d.Name {\n\t\t{{- range $directive := .Directives }}\n\t\tcase \"{{$directive.Name}}\":\n\t\t\tif ec.directives.{{$directive.Name|ucFirst}} != nil {\n\t\t\t\t{{- if $directive.Args }}\n\t\t\t\t\trawArgs := d.ArgumentMap(ec.Variables)\n\t\t\t\t\t{{ template \"args.gotpl\" $directive.Args }}\n\t\t\t\t{{- end }}\n\t\t\t\tn := next\n\t\t\t\tnext = func(ctx context.Context) (interface{}, error) {\n\t\t\t\t\treturn ec.directives.{{$directive.Name|ucFirst}}({{$directive.CallArgs}})\n\t\t\t\t}\n\t\t\t}\n\t\t{{- end }}\n\t\t}\n\t}\n\t{{- end }}\n\tres, err := ec.ResolverMiddleware(ctx, next)\n\tif err != nil {\n\t\tec.Error(ctx, err)\n\t\treturn nil\n\t}\n\treturn res\n}\n\nfunc (ec *executionContext) introspectSchema() *introspection.Schema {\n\treturn introspection.WrapSchema(parsedSchema)\n}\n\nfunc (ec *executionContext) introspectType(name string) *introspection.Type {\n\treturn introspection.WrapTypeFromDef(parsedSchema, parsedSchema.Types[name])\n}\n\nvar parsedSchema = gqlparser.MustLoadSchema(\n\t&ast.Source{Name: {{.SchemaFilename|quote}}, Input: {{.SchemaRaw|rawQuote}}},\n)\n", "input.gotpl": "\t{{- if .IsMarshaled }}\n\tfunc Unmarshal{{ .GQLType }}(v interface{}) ({{.FullName}}, error) {\n\t\tvar it {{.FullName}}\n\t\tvar asMap = v.(map[string]interface{})\n\t\t{{ range $field := .Fields}}\n\t\t\t{{- if $field.Default}}\n\t\t\t\tif _, present := asMap[{{$field.GQLName|quote}}] ; !present {\n\t\t\t\t\tasMap[{{$field.GQLName|quote}}] = {{ $field.Default | dump }}\n\t\t\t\t}\n\t\t\t{{- end}}\n\t\t{{- end }}\n\n\t\tfor k, v := range asMap {\n\t\t\tswitch k {\n\t\t\t{{- range $field := .Fields }}\n\t\t\tcase {{$field.GQLName|quote}}:\n\t\t\t\tvar err error\n\t\t\t\t{{ $field.Unmarshal (print \"it.\" $field.GoFieldName) \"v\" }}\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn it, err\n\t\t\t\t}\n\t\t\t{{- end }}\n\t\t\t}\n\t\t}\n\n\t\treturn it, nil\n\t}\n\t{{- end }}\n", "interface.gotpl": "{{- $interface := . }}\n\nfunc (ec *executionContext) _{{$interface.GQLType}}(ctx context.Context, sel ast.SelectionSet, obj *{{$interface.FullName}}) graphql.Marshaler {\n\tswitch obj := (*obj).(type) {\n\tcase nil:\n\t\treturn graphql.Null\n\t{{- range $implementor := $interface.Implementors }}\n\t\t{{- if $implementor.ValueReceiver }}\n\t\t\tcase {{$implementor.FullName}}:\n\t\t\t\treturn ec._{{$implementor.GQLType}}(ctx, sel, &obj)\n\t\t{{- end}}\n\t\tcase *{{$implementor.FullName}}:\n\t\t\treturn ec._{{$implementor.GQLType}}(ctx, sel, obj)\n\t{{- end }}\n\tdefault:\n\t\tpanic(fmt.Errorf(\"unexpected type %T\", obj))\n\t}\n}\n", diff --git a/codegen/templates/field.gotpl b/codegen/templates/field.gotpl index bfc2f1592ff..1137273bd62 100644 --- a/codegen/templates/field.gotpl +++ b/codegen/templates/field.gotpl @@ -7,7 +7,9 @@ rawArgs := field.ArgumentMap(ec.Variables) {{ template "args.gotpl" $field.Args }} {{- end }} - ctx = graphql.WithResolverContext(ctx, &graphql.ResolverContext{Field: field}) + ctx = graphql.WithResolverContext(ctx, &graphql.ResolverContext{ + Field: field, + }) results, err := ec.resolvers.{{ $field.ShortInvocation }} if err != nil { ec.Error(ctx, err) @@ -24,6 +26,7 @@ } } {{ else }} + // nolint: megacheck, ineffassign func (ec *executionContext) _{{$object.GQLType}}_{{$field.GQLName}}(ctx context.Context, field graphql.CollectedField, {{if not $object.Root}}obj *{{$object.FullName}}{{end}}) graphql.Marshaler { {{- if $field.Args }} rawArgs := field.ArgumentMap(ec.Variables) diff --git a/codegen/testserver/generated.go b/codegen/testserver/generated.go index 6a7dfe5bff9..8f3a9fef388 100644 --- a/codegen/testserver/generated.go +++ b/codegen/testserver/generated.go @@ -123,6 +123,7 @@ func (ec *executionContext) _Circle(ctx context.Context, sel ast.SelectionSet, o return out } +// nolint: megacheck, ineffassign func (ec *executionContext) _Circle_radius(ctx context.Context, field graphql.CollectedField, obj *Circle) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "Circle", @@ -140,6 +141,7 @@ func (ec *executionContext) _Circle_radius(ctx context.Context, field graphql.Co return graphql.MarshalFloat(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) _Circle_area(ctx context.Context, field graphql.CollectedField, obj *Circle) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "Circle", @@ -201,6 +203,7 @@ func (ec *executionContext) _Error(ctx context.Context, sel ast.SelectionSet, ob return out } +// nolint: megacheck, ineffassign func (ec *executionContext) _Error_id(ctx context.Context, field graphql.CollectedField, obj *Error) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "Error", @@ -221,6 +224,7 @@ func (ec *executionContext) _Error_id(ctx context.Context, field graphql.Collect return graphql.MarshalID(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) _Error_errorOnNonRequiredField(ctx context.Context, field graphql.CollectedField, obj *Error) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "Error", @@ -238,6 +242,7 @@ func (ec *executionContext) _Error_errorOnNonRequiredField(ctx context.Context, return graphql.MarshalString(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) _Error_errorOnRequiredField(ctx context.Context, field graphql.CollectedField, obj *Error) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "Error", @@ -258,6 +263,7 @@ func (ec *executionContext) _Error_errorOnRequiredField(ctx context.Context, fie return graphql.MarshalString(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) _Error_nilOnRequiredField(ctx context.Context, field graphql.CollectedField, obj *Error) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "Error", @@ -319,6 +325,7 @@ func (ec *executionContext) _ForcedResolver(ctx context.Context, sel ast.Selecti return out } +// nolint: megacheck, ineffassign func (ec *executionContext) _ForcedResolver_field(ctx context.Context, field graphql.CollectedField, obj *ForcedResolver) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "ForcedResolver", @@ -372,6 +379,7 @@ func (ec *executionContext) _InnerObject(ctx context.Context, sel ast.SelectionS return out } +// nolint: megacheck, ineffassign func (ec *executionContext) _InnerObject_id(ctx context.Context, field graphql.CollectedField, obj *InnerObject) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "InnerObject", @@ -424,6 +432,7 @@ func (ec *executionContext) _InvalidIdentifier(ctx context.Context, sel ast.Sele return out } +// nolint: megacheck, ineffassign func (ec *executionContext) _InvalidIdentifier_id(ctx context.Context, field graphql.CollectedField, obj *invalid_packagename.InvalidIdentifier) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "InvalidIdentifier", @@ -476,6 +485,7 @@ func (ec *executionContext) _It(ctx context.Context, sel ast.SelectionSet, obj * return out } +// nolint: megacheck, ineffassign func (ec *executionContext) _It_id(ctx context.Context, field graphql.CollectedField, obj *introspection1.It) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "It", @@ -528,6 +538,7 @@ func (ec *executionContext) _OuterObject(ctx context.Context, sel ast.SelectionS return out } +// nolint: megacheck, ineffassign func (ec *executionContext) _OuterObject_inner(ctx context.Context, field graphql.CollectedField, obj *OuterObject) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "OuterObject", @@ -657,6 +668,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr return out } +// nolint: megacheck, ineffassign func (ec *executionContext) _Query_invalidIdentifier(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "Query", @@ -678,6 +690,7 @@ func (ec *executionContext) _Query_invalidIdentifier(ctx context.Context, field return ec._InvalidIdentifier(ctx, field.Selections, res) } +// nolint: megacheck, ineffassign func (ec *executionContext) _Query_collision(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "Query", @@ -699,6 +712,7 @@ func (ec *executionContext) _Query_collision(ctx context.Context, field graphql. return ec._It(ctx, field.Selections, res) } +// nolint: megacheck, ineffassign func (ec *executionContext) _Query_mapInput(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { rawArgs := field.ArgumentMap(ec.Variables) args := map[string]interface{}{} @@ -737,6 +751,7 @@ func (ec *executionContext) _Query_mapInput(ctx context.Context, field graphql.C return graphql.MarshalBoolean(*res) } +// nolint: megacheck, ineffassign func (ec *executionContext) _Query_recursive(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { rawArgs := field.ArgumentMap(ec.Variables) args := map[string]interface{}{} @@ -775,6 +790,7 @@ func (ec *executionContext) _Query_recursive(ctx context.Context, field graphql. return graphql.MarshalBoolean(*res) } +// nolint: megacheck, ineffassign func (ec *executionContext) _Query_nestedInputs(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { rawArgs := field.ArgumentMap(ec.Variables) args := map[string]interface{}{} @@ -834,6 +850,7 @@ func (ec *executionContext) _Query_nestedInputs(ctx context.Context, field graph return graphql.MarshalBoolean(*res) } +// nolint: megacheck, ineffassign func (ec *executionContext) _Query_nestedOutputs(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "Query", @@ -851,14 +868,16 @@ func (ec *executionContext) _Query_nestedOutputs(ctx context.Context, field grap arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) arr2 := graphql.Array{} for idx2 := range res[idx1] { arr2 = append(arr2, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx2) + rctx := &graphql.ResolverContext{ + Index: &idx2, + } ctx = graphql.WithResolverContext(ctx, rctx) if res[idx1][idx2] == nil { @@ -873,6 +892,7 @@ func (ec *executionContext) _Query_nestedOutputs(ctx context.Context, field grap return arr1 } +// nolint: megacheck, ineffassign func (ec *executionContext) _Query_keywords(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { rawArgs := field.ArgumentMap(ec.Variables) args := map[string]interface{}{} @@ -910,6 +930,7 @@ func (ec *executionContext) _Query_keywords(ctx context.Context, field graphql.C return graphql.MarshalBoolean(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) _Query_shapes(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "Query", @@ -927,8 +948,9 @@ func (ec *executionContext) _Query_shapes(ctx context.Context, field graphql.Col arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) if res[idx1] == nil { @@ -940,6 +962,7 @@ func (ec *executionContext) _Query_shapes(ctx context.Context, field graphql.Col return arr1 } +// nolint: megacheck, ineffassign func (ec *executionContext) _Query_errorBubble(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "Query", @@ -961,6 +984,7 @@ func (ec *executionContext) _Query_errorBubble(ctx context.Context, field graphq return ec._Error(ctx, field.Selections, res) } +// nolint: megacheck, ineffassign func (ec *executionContext) _Query_valid(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "Query", @@ -981,6 +1005,7 @@ func (ec *executionContext) _Query_valid(ctx context.Context, field graphql.Coll return graphql.MarshalString(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) _Query_keywordArgs(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { rawArgs := field.ArgumentMap(ec.Variables) args := map[string]interface{}{} @@ -1253,6 +1278,7 @@ func (ec *executionContext) _Query_keywordArgs(ctx context.Context, field graphq return graphql.MarshalBoolean(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) _Query___type(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { rawArgs := field.ArgumentMap(ec.Variables) args := map[string]interface{}{} @@ -1286,6 +1312,7 @@ func (ec *executionContext) _Query___type(ctx context.Context, field graphql.Col return ec.___Type(ctx, field.Selections, res) } +// nolint: megacheck, ineffassign func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "Query", @@ -1340,6 +1367,7 @@ func (ec *executionContext) _Rectangle(ctx context.Context, sel ast.SelectionSet return out } +// nolint: megacheck, ineffassign func (ec *executionContext) _Rectangle_length(ctx context.Context, field graphql.CollectedField, obj *Rectangle) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "Rectangle", @@ -1357,6 +1385,7 @@ func (ec *executionContext) _Rectangle_length(ctx context.Context, field graphql return graphql.MarshalFloat(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) _Rectangle_width(ctx context.Context, field graphql.CollectedField, obj *Rectangle) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "Rectangle", @@ -1374,6 +1403,7 @@ func (ec *executionContext) _Rectangle_width(ctx context.Context, field graphql. return graphql.MarshalFloat(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) _Rectangle_area(ctx context.Context, field graphql.CollectedField, obj *Rectangle) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "Rectangle", @@ -1435,6 +1465,7 @@ func (ec *executionContext) ___Directive(ctx context.Context, sel ast.SelectionS return out } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Directive", @@ -1455,6 +1486,7 @@ func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql return graphql.MarshalString(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Directive_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Directive", @@ -1472,6 +1504,7 @@ func (ec *executionContext) ___Directive_description(ctx context.Context, field return graphql.MarshalString(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Directive_locations(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Directive", @@ -1492,8 +1525,9 @@ func (ec *executionContext) ___Directive_locations(ctx context.Context, field gr arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return graphql.MarshalString(res[idx1]) }(ctx)) @@ -1501,6 +1535,7 @@ func (ec *executionContext) ___Directive_locations(ctx context.Context, field gr return arr1 } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Directive", @@ -1521,8 +1556,9 @@ func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return ec.___InputValue(ctx, field.Selections, &res[idx1]) }(ctx)) @@ -1571,6 +1607,7 @@ func (ec *executionContext) ___EnumValue(ctx context.Context, sel ast.SelectionS return out } +// nolint: megacheck, ineffassign func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__EnumValue", @@ -1591,6 +1628,7 @@ func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql return graphql.MarshalString(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___EnumValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__EnumValue", @@ -1608,6 +1646,7 @@ func (ec *executionContext) ___EnumValue_description(ctx context.Context, field return graphql.MarshalString(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__EnumValue", @@ -1628,6 +1667,7 @@ func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field return graphql.MarshalBoolean(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__EnumValue", @@ -1696,6 +1736,7 @@ func (ec *executionContext) ___Field(ctx context.Context, sel ast.SelectionSet, return out } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Field", @@ -1716,6 +1757,7 @@ func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.Col return graphql.MarshalString(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Field_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Field", @@ -1733,6 +1775,7 @@ func (ec *executionContext) ___Field_description(ctx context.Context, field grap return graphql.MarshalString(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Field", @@ -1753,8 +1796,9 @@ func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.Col arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return ec.___InputValue(ctx, field.Selections, &res[idx1]) }(ctx)) @@ -1762,6 +1806,7 @@ func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.Col return arr1 } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Field", @@ -1789,6 +1834,7 @@ func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.Col return ec.___Type(ctx, field.Selections, res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Field", @@ -1809,6 +1855,7 @@ func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field gra return graphql.MarshalBoolean(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Field", @@ -1867,6 +1914,7 @@ func (ec *executionContext) ___InputValue(ctx context.Context, sel ast.Selection return out } +// nolint: megacheck, ineffassign func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__InputValue", @@ -1887,6 +1935,7 @@ func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphq return graphql.MarshalString(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___InputValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__InputValue", @@ -1904,6 +1953,7 @@ func (ec *executionContext) ___InputValue_description(ctx context.Context, field return graphql.MarshalString(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__InputValue", @@ -1931,6 +1981,7 @@ func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphq return ec.___Type(ctx, field.Selections, res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__InputValue", @@ -1998,6 +2049,7 @@ func (ec *executionContext) ___Schema(ctx context.Context, sel ast.SelectionSet, return out } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Schema", @@ -2018,8 +2070,9 @@ func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.C arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return ec.___Type(ctx, field.Selections, &res[idx1]) }(ctx)) @@ -2027,6 +2080,7 @@ func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.C return arr1 } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Schema", @@ -2054,6 +2108,7 @@ func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graph return ec.___Type(ctx, field.Selections, res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Schema", @@ -2075,6 +2130,7 @@ func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field gr return ec.___Type(ctx, field.Selections, res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Schema", @@ -2096,6 +2152,7 @@ func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, fiel return ec.___Type(ctx, field.Selections, res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Schema_directives(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Schema", @@ -2116,8 +2173,9 @@ func (ec *executionContext) ___Schema_directives(ctx context.Context, field grap arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return ec.___Directive(ctx, field.Selections, &res[idx1]) }(ctx)) @@ -2173,6 +2231,7 @@ func (ec *executionContext) ___Type(ctx context.Context, sel ast.SelectionSet, o return out } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Type", @@ -2193,6 +2252,7 @@ func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.Coll return graphql.MarshalString(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Type", @@ -2214,6 +2274,7 @@ func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.Coll return graphql.MarshalString(*res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Type_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Type", @@ -2231,6 +2292,7 @@ func (ec *executionContext) ___Type_description(ctx context.Context, field graph return graphql.MarshalString(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler { rawArgs := field.ArgumentMap(ec.Variables) args := map[string]interface{}{} @@ -2260,8 +2322,9 @@ func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.Co arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return ec.___Field(ctx, field.Selections, &res[idx1]) }(ctx)) @@ -2269,6 +2332,7 @@ func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.Co return arr1 } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Type", @@ -2286,8 +2350,9 @@ func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphq arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return ec.___Type(ctx, field.Selections, &res[idx1]) }(ctx)) @@ -2295,6 +2360,7 @@ func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphq return arr1 } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Type", @@ -2312,8 +2378,9 @@ func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field gra arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return ec.___Type(ctx, field.Selections, &res[idx1]) }(ctx)) @@ -2321,6 +2388,7 @@ func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field gra return arr1 } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler { rawArgs := field.ArgumentMap(ec.Variables) args := map[string]interface{}{} @@ -2350,8 +2418,9 @@ func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphq arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return ec.___EnumValue(ctx, field.Selections, &res[idx1]) }(ctx)) @@ -2359,6 +2428,7 @@ func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphq return arr1 } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Type", @@ -2376,8 +2446,9 @@ func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graph arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return ec.___InputValue(ctx, field.Selections, &res[idx1]) }(ctx)) @@ -2385,6 +2456,7 @@ func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graph return arr1 } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Type", diff --git a/example/chat/generated.go b/example/chat/generated.go index e674b402fc1..d1d9019f0d6 100644 --- a/example/chat/generated.go +++ b/example/chat/generated.go @@ -157,6 +157,7 @@ func (ec *executionContext) _Chatroom(ctx context.Context, sel ast.SelectionSet, return out } +// nolint: megacheck, ineffassign func (ec *executionContext) _Chatroom_name(ctx context.Context, field graphql.CollectedField, obj *Chatroom) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "Chatroom", @@ -177,6 +178,7 @@ func (ec *executionContext) _Chatroom_name(ctx context.Context, field graphql.Co return graphql.MarshalString(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) _Chatroom_messages(ctx context.Context, field graphql.CollectedField, obj *Chatroom) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "Chatroom", @@ -197,8 +199,9 @@ func (ec *executionContext) _Chatroom_messages(ctx context.Context, field graphq arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return ec._Message(ctx, field.Selections, &res[idx1]) }(ctx)) @@ -253,6 +256,7 @@ func (ec *executionContext) _Message(ctx context.Context, sel ast.SelectionSet, return out } +// nolint: megacheck, ineffassign func (ec *executionContext) _Message_id(ctx context.Context, field graphql.CollectedField, obj *Message) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "Message", @@ -273,6 +277,7 @@ func (ec *executionContext) _Message_id(ctx context.Context, field graphql.Colle return graphql.MarshalID(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) _Message_text(ctx context.Context, field graphql.CollectedField, obj *Message) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "Message", @@ -293,6 +298,7 @@ func (ec *executionContext) _Message_text(ctx context.Context, field graphql.Col return graphql.MarshalString(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) _Message_createdBy(ctx context.Context, field graphql.CollectedField, obj *Message) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "Message", @@ -313,6 +319,7 @@ func (ec *executionContext) _Message_createdBy(ctx context.Context, field graphq return graphql.MarshalString(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) _Message_createdAt(ctx context.Context, field graphql.CollectedField, obj *Message) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "Message", @@ -367,6 +374,7 @@ func (ec *executionContext) _Mutation(ctx context.Context, sel ast.SelectionSet) return out } +// nolint: megacheck, ineffassign func (ec *executionContext) _Mutation_post(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { rawArgs := field.ArgumentMap(ec.Variables) args := map[string]interface{}{} @@ -459,6 +467,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr return out } +// nolint: megacheck, ineffassign func (ec *executionContext) _Query_room(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { rawArgs := field.ArgumentMap(ec.Variables) args := map[string]interface{}{} @@ -492,6 +501,7 @@ func (ec *executionContext) _Query_room(ctx context.Context, field graphql.Colle return ec._Chatroom(ctx, field.Selections, res) } +// nolint: megacheck, ineffassign func (ec *executionContext) _Query___type(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { rawArgs := field.ArgumentMap(ec.Variables) args := map[string]interface{}{} @@ -525,6 +535,7 @@ func (ec *executionContext) _Query___type(ctx context.Context, field graphql.Col return ec.___Type(ctx, field.Selections, res) } +// nolint: megacheck, ineffassign func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "Query", @@ -580,7 +591,9 @@ func (ec *executionContext) _Subscription_messageAdded(ctx context.Context, fiel } } args["roomName"] = arg0 - ctx = graphql.WithResolverContext(ctx, &graphql.ResolverContext{Field: field}) + ctx = graphql.WithResolverContext(ctx, &graphql.ResolverContext{ + Field: field, + }) results, err := ec.resolvers.Subscription().MessageAdded(ctx, args["roomName"].(string)) if err != nil { ec.Error(ctx, err) @@ -641,6 +654,7 @@ func (ec *executionContext) ___Directive(ctx context.Context, sel ast.SelectionS return out } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Directive", @@ -661,6 +675,7 @@ func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql return graphql.MarshalString(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Directive_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Directive", @@ -678,6 +693,7 @@ func (ec *executionContext) ___Directive_description(ctx context.Context, field return graphql.MarshalString(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Directive_locations(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Directive", @@ -698,8 +714,9 @@ func (ec *executionContext) ___Directive_locations(ctx context.Context, field gr arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return graphql.MarshalString(res[idx1]) }(ctx)) @@ -707,6 +724,7 @@ func (ec *executionContext) ___Directive_locations(ctx context.Context, field gr return arr1 } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Directive", @@ -727,8 +745,9 @@ func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return ec.___InputValue(ctx, field.Selections, &res[idx1]) }(ctx)) @@ -777,6 +796,7 @@ func (ec *executionContext) ___EnumValue(ctx context.Context, sel ast.SelectionS return out } +// nolint: megacheck, ineffassign func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__EnumValue", @@ -797,6 +817,7 @@ func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql return graphql.MarshalString(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___EnumValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__EnumValue", @@ -814,6 +835,7 @@ func (ec *executionContext) ___EnumValue_description(ctx context.Context, field return graphql.MarshalString(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__EnumValue", @@ -834,6 +856,7 @@ func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field return graphql.MarshalBoolean(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__EnumValue", @@ -902,6 +925,7 @@ func (ec *executionContext) ___Field(ctx context.Context, sel ast.SelectionSet, return out } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Field", @@ -922,6 +946,7 @@ func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.Col return graphql.MarshalString(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Field_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Field", @@ -939,6 +964,7 @@ func (ec *executionContext) ___Field_description(ctx context.Context, field grap return graphql.MarshalString(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Field", @@ -959,8 +985,9 @@ func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.Col arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return ec.___InputValue(ctx, field.Selections, &res[idx1]) }(ctx)) @@ -968,6 +995,7 @@ func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.Col return arr1 } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Field", @@ -995,6 +1023,7 @@ func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.Col return ec.___Type(ctx, field.Selections, res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Field", @@ -1015,6 +1044,7 @@ func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field gra return graphql.MarshalBoolean(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Field", @@ -1073,6 +1103,7 @@ func (ec *executionContext) ___InputValue(ctx context.Context, sel ast.Selection return out } +// nolint: megacheck, ineffassign func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__InputValue", @@ -1093,6 +1124,7 @@ func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphq return graphql.MarshalString(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___InputValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__InputValue", @@ -1110,6 +1142,7 @@ func (ec *executionContext) ___InputValue_description(ctx context.Context, field return graphql.MarshalString(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__InputValue", @@ -1137,6 +1170,7 @@ func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphq return ec.___Type(ctx, field.Selections, res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__InputValue", @@ -1204,6 +1238,7 @@ func (ec *executionContext) ___Schema(ctx context.Context, sel ast.SelectionSet, return out } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Schema", @@ -1224,8 +1259,9 @@ func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.C arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return ec.___Type(ctx, field.Selections, &res[idx1]) }(ctx)) @@ -1233,6 +1269,7 @@ func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.C return arr1 } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Schema", @@ -1260,6 +1297,7 @@ func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graph return ec.___Type(ctx, field.Selections, res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Schema", @@ -1281,6 +1319,7 @@ func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field gr return ec.___Type(ctx, field.Selections, res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Schema", @@ -1302,6 +1341,7 @@ func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, fiel return ec.___Type(ctx, field.Selections, res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Schema_directives(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Schema", @@ -1322,8 +1362,9 @@ func (ec *executionContext) ___Schema_directives(ctx context.Context, field grap arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return ec.___Directive(ctx, field.Selections, &res[idx1]) }(ctx)) @@ -1379,6 +1420,7 @@ func (ec *executionContext) ___Type(ctx context.Context, sel ast.SelectionSet, o return out } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Type", @@ -1399,6 +1441,7 @@ func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.Coll return graphql.MarshalString(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Type", @@ -1420,6 +1463,7 @@ func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.Coll return graphql.MarshalString(*res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Type_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Type", @@ -1437,6 +1481,7 @@ func (ec *executionContext) ___Type_description(ctx context.Context, field graph return graphql.MarshalString(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler { rawArgs := field.ArgumentMap(ec.Variables) args := map[string]interface{}{} @@ -1466,8 +1511,9 @@ func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.Co arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return ec.___Field(ctx, field.Selections, &res[idx1]) }(ctx)) @@ -1475,6 +1521,7 @@ func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.Co return arr1 } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Type", @@ -1492,8 +1539,9 @@ func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphq arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return ec.___Type(ctx, field.Selections, &res[idx1]) }(ctx)) @@ -1501,6 +1549,7 @@ func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphq return arr1 } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Type", @@ -1518,8 +1567,9 @@ func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field gra arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return ec.___Type(ctx, field.Selections, &res[idx1]) }(ctx)) @@ -1527,6 +1577,7 @@ func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field gra return arr1 } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler { rawArgs := field.ArgumentMap(ec.Variables) args := map[string]interface{}{} @@ -1556,8 +1607,9 @@ func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphq arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return ec.___EnumValue(ctx, field.Selections, &res[idx1]) }(ctx)) @@ -1565,6 +1617,7 @@ func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphq return arr1 } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Type", @@ -1582,8 +1635,9 @@ func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graph arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return ec.___InputValue(ctx, field.Selections, &res[idx1]) }(ctx)) @@ -1591,6 +1645,7 @@ func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graph return arr1 } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Type", diff --git a/example/config/generated.go b/example/config/generated.go index d46311d725c..7d2f750b1b8 100644 --- a/example/config/generated.go +++ b/example/config/generated.go @@ -129,6 +129,7 @@ func (ec *executionContext) _Mutation(ctx context.Context, sel ast.SelectionSet) return out } +// nolint: megacheck, ineffassign func (ec *executionContext) _Mutation_createTodo(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { rawArgs := field.ArgumentMap(ec.Variables) args := map[string]interface{}{} @@ -204,6 +205,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr return out } +// nolint: megacheck, ineffassign func (ec *executionContext) _Query_todos(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "Query", @@ -224,8 +226,9 @@ func (ec *executionContext) _Query_todos(ctx context.Context, field graphql.Coll arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return ec._Todo(ctx, field.Selections, &res[idx1]) }(ctx)) @@ -233,6 +236,7 @@ func (ec *executionContext) _Query_todos(ctx context.Context, field graphql.Coll return arr1 } +// nolint: megacheck, ineffassign func (ec *executionContext) _Query___type(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { rawArgs := field.ArgumentMap(ec.Variables) args := map[string]interface{}{} @@ -266,6 +270,7 @@ func (ec *executionContext) _Query___type(ctx context.Context, field graphql.Col return ec.___Type(ctx, field.Selections, res) } +// nolint: megacheck, ineffassign func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "Query", @@ -344,6 +349,7 @@ func (ec *executionContext) _Todo(ctx context.Context, sel ast.SelectionSet, obj return out } +// nolint: megacheck, ineffassign func (ec *executionContext) _Todo_id(ctx context.Context, field graphql.CollectedField, obj *Todo) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "Todo", @@ -364,6 +370,7 @@ func (ec *executionContext) _Todo_id(ctx context.Context, field graphql.Collecte return graphql.MarshalID(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) _Todo_databaseId(ctx context.Context, field graphql.CollectedField, obj *Todo) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "Todo", @@ -384,6 +391,7 @@ func (ec *executionContext) _Todo_databaseId(ctx context.Context, field graphql. return graphql.MarshalInt(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) _Todo_text(ctx context.Context, field graphql.CollectedField, obj *Todo) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "Todo", @@ -404,6 +412,7 @@ func (ec *executionContext) _Todo_text(ctx context.Context, field graphql.Collec return graphql.MarshalString(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) _Todo_done(ctx context.Context, field graphql.CollectedField, obj *Todo) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "Todo", @@ -424,6 +433,7 @@ func (ec *executionContext) _Todo_done(ctx context.Context, field graphql.Collec return graphql.MarshalBoolean(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) _Todo_user(ctx context.Context, field graphql.CollectedField, obj *Todo) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "Todo", @@ -481,6 +491,7 @@ func (ec *executionContext) _User(ctx context.Context, sel ast.SelectionSet, obj return out } +// nolint: megacheck, ineffassign func (ec *executionContext) _User_id(ctx context.Context, field graphql.CollectedField, obj *User) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "User", @@ -501,6 +512,7 @@ func (ec *executionContext) _User_id(ctx context.Context, field graphql.Collecte return graphql.MarshalID(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) _User_name(ctx context.Context, field graphql.CollectedField, obj *User) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "User", @@ -565,6 +577,7 @@ func (ec *executionContext) ___Directive(ctx context.Context, sel ast.SelectionS return out } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Directive", @@ -585,6 +598,7 @@ func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql return graphql.MarshalString(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Directive_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Directive", @@ -602,6 +616,7 @@ func (ec *executionContext) ___Directive_description(ctx context.Context, field return graphql.MarshalString(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Directive_locations(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Directive", @@ -622,8 +637,9 @@ func (ec *executionContext) ___Directive_locations(ctx context.Context, field gr arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return graphql.MarshalString(res[idx1]) }(ctx)) @@ -631,6 +647,7 @@ func (ec *executionContext) ___Directive_locations(ctx context.Context, field gr return arr1 } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Directive", @@ -651,8 +668,9 @@ func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return ec.___InputValue(ctx, field.Selections, &res[idx1]) }(ctx)) @@ -701,6 +719,7 @@ func (ec *executionContext) ___EnumValue(ctx context.Context, sel ast.SelectionS return out } +// nolint: megacheck, ineffassign func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__EnumValue", @@ -721,6 +740,7 @@ func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql return graphql.MarshalString(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___EnumValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__EnumValue", @@ -738,6 +758,7 @@ func (ec *executionContext) ___EnumValue_description(ctx context.Context, field return graphql.MarshalString(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__EnumValue", @@ -758,6 +779,7 @@ func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field return graphql.MarshalBoolean(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__EnumValue", @@ -826,6 +848,7 @@ func (ec *executionContext) ___Field(ctx context.Context, sel ast.SelectionSet, return out } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Field", @@ -846,6 +869,7 @@ func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.Col return graphql.MarshalString(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Field_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Field", @@ -863,6 +887,7 @@ func (ec *executionContext) ___Field_description(ctx context.Context, field grap return graphql.MarshalString(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Field", @@ -883,8 +908,9 @@ func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.Col arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return ec.___InputValue(ctx, field.Selections, &res[idx1]) }(ctx)) @@ -892,6 +918,7 @@ func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.Col return arr1 } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Field", @@ -919,6 +946,7 @@ func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.Col return ec.___Type(ctx, field.Selections, res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Field", @@ -939,6 +967,7 @@ func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field gra return graphql.MarshalBoolean(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Field", @@ -997,6 +1026,7 @@ func (ec *executionContext) ___InputValue(ctx context.Context, sel ast.Selection return out } +// nolint: megacheck, ineffassign func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__InputValue", @@ -1017,6 +1047,7 @@ func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphq return graphql.MarshalString(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___InputValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__InputValue", @@ -1034,6 +1065,7 @@ func (ec *executionContext) ___InputValue_description(ctx context.Context, field return graphql.MarshalString(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__InputValue", @@ -1061,6 +1093,7 @@ func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphq return ec.___Type(ctx, field.Selections, res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__InputValue", @@ -1128,6 +1161,7 @@ func (ec *executionContext) ___Schema(ctx context.Context, sel ast.SelectionSet, return out } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Schema", @@ -1148,8 +1182,9 @@ func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.C arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return ec.___Type(ctx, field.Selections, &res[idx1]) }(ctx)) @@ -1157,6 +1192,7 @@ func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.C return arr1 } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Schema", @@ -1184,6 +1220,7 @@ func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graph return ec.___Type(ctx, field.Selections, res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Schema", @@ -1205,6 +1242,7 @@ func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field gr return ec.___Type(ctx, field.Selections, res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Schema", @@ -1226,6 +1264,7 @@ func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, fiel return ec.___Type(ctx, field.Selections, res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Schema_directives(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Schema", @@ -1246,8 +1285,9 @@ func (ec *executionContext) ___Schema_directives(ctx context.Context, field grap arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return ec.___Directive(ctx, field.Selections, &res[idx1]) }(ctx)) @@ -1303,6 +1343,7 @@ func (ec *executionContext) ___Type(ctx context.Context, sel ast.SelectionSet, o return out } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Type", @@ -1323,6 +1364,7 @@ func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.Coll return graphql.MarshalString(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Type", @@ -1344,6 +1386,7 @@ func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.Coll return graphql.MarshalString(*res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Type_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Type", @@ -1361,6 +1404,7 @@ func (ec *executionContext) ___Type_description(ctx context.Context, field graph return graphql.MarshalString(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler { rawArgs := field.ArgumentMap(ec.Variables) args := map[string]interface{}{} @@ -1390,8 +1434,9 @@ func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.Co arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return ec.___Field(ctx, field.Selections, &res[idx1]) }(ctx)) @@ -1399,6 +1444,7 @@ func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.Co return arr1 } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Type", @@ -1416,8 +1462,9 @@ func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphq arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return ec.___Type(ctx, field.Selections, &res[idx1]) }(ctx)) @@ -1425,6 +1472,7 @@ func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphq return arr1 } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Type", @@ -1442,8 +1490,9 @@ func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field gra arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return ec.___Type(ctx, field.Selections, &res[idx1]) }(ctx)) @@ -1451,6 +1500,7 @@ func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field gra return arr1 } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler { rawArgs := field.ArgumentMap(ec.Variables) args := map[string]interface{}{} @@ -1480,8 +1530,9 @@ func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphq arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return ec.___EnumValue(ctx, field.Selections, &res[idx1]) }(ctx)) @@ -1489,6 +1540,7 @@ func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphq return arr1 } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Type", @@ -1506,8 +1558,9 @@ func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graph arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return ec.___InputValue(ctx, field.Selections, &res[idx1]) }(ctx)) @@ -1515,6 +1568,7 @@ func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graph return arr1 } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Type", diff --git a/example/dataloader/generated.go b/example/dataloader/generated.go index c3d73ac4833..22a20274863 100644 --- a/example/dataloader/generated.go +++ b/example/dataloader/generated.go @@ -129,6 +129,7 @@ func (ec *executionContext) _Address(ctx context.Context, sel ast.SelectionSet, return out } +// nolint: megacheck, ineffassign func (ec *executionContext) _Address_id(ctx context.Context, field graphql.CollectedField, obj *Address) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "Address", @@ -149,6 +150,7 @@ func (ec *executionContext) _Address_id(ctx context.Context, field graphql.Colle return graphql.MarshalInt(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) _Address_street(ctx context.Context, field graphql.CollectedField, obj *Address) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "Address", @@ -169,6 +171,7 @@ func (ec *executionContext) _Address_street(ctx context.Context, field graphql.C return graphql.MarshalString(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) _Address_country(ctx context.Context, field graphql.CollectedField, obj *Address) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "Address", @@ -239,6 +242,7 @@ func (ec *executionContext) _Customer(ctx context.Context, sel ast.SelectionSet, return out } +// nolint: megacheck, ineffassign func (ec *executionContext) _Customer_id(ctx context.Context, field graphql.CollectedField, obj *Customer) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "Customer", @@ -259,6 +263,7 @@ func (ec *executionContext) _Customer_id(ctx context.Context, field graphql.Coll return graphql.MarshalInt(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) _Customer_name(ctx context.Context, field graphql.CollectedField, obj *Customer) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "Customer", @@ -279,6 +284,7 @@ func (ec *executionContext) _Customer_name(ctx context.Context, field graphql.Co return graphql.MarshalString(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) _Customer_address(ctx context.Context, field graphql.CollectedField, obj *Customer) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "Customer", @@ -300,6 +306,7 @@ func (ec *executionContext) _Customer_address(ctx context.Context, field graphql return ec._Address(ctx, field.Selections, res) } +// nolint: megacheck, ineffassign func (ec *executionContext) _Customer_orders(ctx context.Context, field graphql.CollectedField, obj *Customer) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "Customer", @@ -317,8 +324,9 @@ func (ec *executionContext) _Customer_orders(ctx context.Context, field graphql. arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return ec._Order(ctx, field.Selections, &res[idx1]) }(ctx)) @@ -358,6 +366,7 @@ func (ec *executionContext) _Item(ctx context.Context, sel ast.SelectionSet, obj return out } +// nolint: megacheck, ineffassign func (ec *executionContext) _Item_name(ctx context.Context, field graphql.CollectedField, obj *Item) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "Item", @@ -427,6 +436,7 @@ func (ec *executionContext) _Order(ctx context.Context, sel ast.SelectionSet, ob return out } +// nolint: megacheck, ineffassign func (ec *executionContext) _Order_id(ctx context.Context, field graphql.CollectedField, obj *Order) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "Order", @@ -447,6 +457,7 @@ func (ec *executionContext) _Order_id(ctx context.Context, field graphql.Collect return graphql.MarshalInt(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) _Order_date(ctx context.Context, field graphql.CollectedField, obj *Order) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "Order", @@ -467,6 +478,7 @@ func (ec *executionContext) _Order_date(ctx context.Context, field graphql.Colle return graphql.MarshalTime(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) _Order_amount(ctx context.Context, field graphql.CollectedField, obj *Order) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "Order", @@ -487,6 +499,7 @@ func (ec *executionContext) _Order_amount(ctx context.Context, field graphql.Col return graphql.MarshalFloat(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) _Order_items(ctx context.Context, field graphql.CollectedField, obj *Order) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "Order", @@ -504,8 +517,9 @@ func (ec *executionContext) _Order_items(ctx context.Context, field graphql.Coll arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return ec._Item(ctx, field.Selections, &res[idx1]) }(ctx)) @@ -565,6 +579,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr return out } +// nolint: megacheck, ineffassign func (ec *executionContext) _Query_customers(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "Query", @@ -582,8 +597,9 @@ func (ec *executionContext) _Query_customers(ctx context.Context, field graphql. arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return ec._Customer(ctx, field.Selections, &res[idx1]) }(ctx)) @@ -591,6 +607,7 @@ func (ec *executionContext) _Query_customers(ctx context.Context, field graphql. return arr1 } +// nolint: megacheck, ineffassign func (ec *executionContext) _Query_torture1d(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { rawArgs := field.ArgumentMap(ec.Variables) args := map[string]interface{}{} @@ -631,8 +648,9 @@ func (ec *executionContext) _Query_torture1d(ctx context.Context, field graphql. arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return ec._Customer(ctx, field.Selections, &res[idx1]) }(ctx)) @@ -640,6 +658,7 @@ func (ec *executionContext) _Query_torture1d(ctx context.Context, field graphql. return arr1 } +// nolint: megacheck, ineffassign func (ec *executionContext) _Query_torture2d(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { rawArgs := field.ArgumentMap(ec.Variables) args := map[string]interface{}{} @@ -691,14 +710,16 @@ func (ec *executionContext) _Query_torture2d(ctx context.Context, field graphql. arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) arr2 := graphql.Array{} for idx2 := range res[idx1] { arr2 = append(arr2, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx2) + rctx := &graphql.ResolverContext{ + Index: &idx2, + } ctx = graphql.WithResolverContext(ctx, rctx) return ec._Customer(ctx, field.Selections, &res[idx1][idx2]) }(ctx)) @@ -709,6 +730,7 @@ func (ec *executionContext) _Query_torture2d(ctx context.Context, field graphql. return arr1 } +// nolint: megacheck, ineffassign func (ec *executionContext) _Query___type(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { rawArgs := field.ArgumentMap(ec.Variables) args := map[string]interface{}{} @@ -742,6 +764,7 @@ func (ec *executionContext) _Query___type(ctx context.Context, field graphql.Col return ec.___Type(ctx, field.Selections, res) } +// nolint: megacheck, ineffassign func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "Query", @@ -807,6 +830,7 @@ func (ec *executionContext) ___Directive(ctx context.Context, sel ast.SelectionS return out } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Directive", @@ -827,6 +851,7 @@ func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql return graphql.MarshalString(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Directive_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Directive", @@ -844,6 +869,7 @@ func (ec *executionContext) ___Directive_description(ctx context.Context, field return graphql.MarshalString(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Directive_locations(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Directive", @@ -864,8 +890,9 @@ func (ec *executionContext) ___Directive_locations(ctx context.Context, field gr arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return graphql.MarshalString(res[idx1]) }(ctx)) @@ -873,6 +900,7 @@ func (ec *executionContext) ___Directive_locations(ctx context.Context, field gr return arr1 } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Directive", @@ -893,8 +921,9 @@ func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return ec.___InputValue(ctx, field.Selections, &res[idx1]) }(ctx)) @@ -943,6 +972,7 @@ func (ec *executionContext) ___EnumValue(ctx context.Context, sel ast.SelectionS return out } +// nolint: megacheck, ineffassign func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__EnumValue", @@ -963,6 +993,7 @@ func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql return graphql.MarshalString(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___EnumValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__EnumValue", @@ -980,6 +1011,7 @@ func (ec *executionContext) ___EnumValue_description(ctx context.Context, field return graphql.MarshalString(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__EnumValue", @@ -1000,6 +1032,7 @@ func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field return graphql.MarshalBoolean(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__EnumValue", @@ -1068,6 +1101,7 @@ func (ec *executionContext) ___Field(ctx context.Context, sel ast.SelectionSet, return out } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Field", @@ -1088,6 +1122,7 @@ func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.Col return graphql.MarshalString(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Field_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Field", @@ -1105,6 +1140,7 @@ func (ec *executionContext) ___Field_description(ctx context.Context, field grap return graphql.MarshalString(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Field", @@ -1125,8 +1161,9 @@ func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.Col arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return ec.___InputValue(ctx, field.Selections, &res[idx1]) }(ctx)) @@ -1134,6 +1171,7 @@ func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.Col return arr1 } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Field", @@ -1161,6 +1199,7 @@ func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.Col return ec.___Type(ctx, field.Selections, res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Field", @@ -1181,6 +1220,7 @@ func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field gra return graphql.MarshalBoolean(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Field", @@ -1239,6 +1279,7 @@ func (ec *executionContext) ___InputValue(ctx context.Context, sel ast.Selection return out } +// nolint: megacheck, ineffassign func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__InputValue", @@ -1259,6 +1300,7 @@ func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphq return graphql.MarshalString(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___InputValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__InputValue", @@ -1276,6 +1318,7 @@ func (ec *executionContext) ___InputValue_description(ctx context.Context, field return graphql.MarshalString(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__InputValue", @@ -1303,6 +1346,7 @@ func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphq return ec.___Type(ctx, field.Selections, res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__InputValue", @@ -1370,6 +1414,7 @@ func (ec *executionContext) ___Schema(ctx context.Context, sel ast.SelectionSet, return out } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Schema", @@ -1390,8 +1435,9 @@ func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.C arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return ec.___Type(ctx, field.Selections, &res[idx1]) }(ctx)) @@ -1399,6 +1445,7 @@ func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.C return arr1 } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Schema", @@ -1426,6 +1473,7 @@ func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graph return ec.___Type(ctx, field.Selections, res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Schema", @@ -1447,6 +1495,7 @@ func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field gr return ec.___Type(ctx, field.Selections, res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Schema", @@ -1468,6 +1517,7 @@ func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, fiel return ec.___Type(ctx, field.Selections, res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Schema_directives(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Schema", @@ -1488,8 +1538,9 @@ func (ec *executionContext) ___Schema_directives(ctx context.Context, field grap arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return ec.___Directive(ctx, field.Selections, &res[idx1]) }(ctx)) @@ -1545,6 +1596,7 @@ func (ec *executionContext) ___Type(ctx context.Context, sel ast.SelectionSet, o return out } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Type", @@ -1565,6 +1617,7 @@ func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.Coll return graphql.MarshalString(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Type", @@ -1586,6 +1639,7 @@ func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.Coll return graphql.MarshalString(*res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Type_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Type", @@ -1603,6 +1657,7 @@ func (ec *executionContext) ___Type_description(ctx context.Context, field graph return graphql.MarshalString(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler { rawArgs := field.ArgumentMap(ec.Variables) args := map[string]interface{}{} @@ -1632,8 +1687,9 @@ func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.Co arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return ec.___Field(ctx, field.Selections, &res[idx1]) }(ctx)) @@ -1641,6 +1697,7 @@ func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.Co return arr1 } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Type", @@ -1658,8 +1715,9 @@ func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphq arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return ec.___Type(ctx, field.Selections, &res[idx1]) }(ctx)) @@ -1667,6 +1725,7 @@ func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphq return arr1 } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Type", @@ -1684,8 +1743,9 @@ func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field gra arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return ec.___Type(ctx, field.Selections, &res[idx1]) }(ctx)) @@ -1693,6 +1753,7 @@ func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field gra return arr1 } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler { rawArgs := field.ArgumentMap(ec.Variables) args := map[string]interface{}{} @@ -1722,8 +1783,9 @@ func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphq arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return ec.___EnumValue(ctx, field.Selections, &res[idx1]) }(ctx)) @@ -1731,6 +1793,7 @@ func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphq return arr1 } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Type", @@ -1748,8 +1811,9 @@ func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graph arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return ec.___InputValue(ctx, field.Selections, &res[idx1]) }(ctx)) @@ -1757,6 +1821,7 @@ func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graph return arr1 } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Type", diff --git a/example/scalars/generated.go b/example/scalars/generated.go index a02028db18d..6b69ac8e6cb 100644 --- a/example/scalars/generated.go +++ b/example/scalars/generated.go @@ -118,6 +118,7 @@ func (ec *executionContext) _Address(ctx context.Context, sel ast.SelectionSet, return out } +// nolint: megacheck, ineffassign func (ec *executionContext) _Address_id(ctx context.Context, field graphql.CollectedField, obj *model.Address) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "Address", @@ -138,6 +139,7 @@ func (ec *executionContext) _Address_id(ctx context.Context, field graphql.Colle return model.MarshalID(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) _Address_location(ctx context.Context, field graphql.CollectedField, obj *model.Address) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "Address", @@ -208,6 +210,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr return out } +// nolint: megacheck, ineffassign func (ec *executionContext) _Query_user(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { rawArgs := field.ArgumentMap(ec.Variables) args := map[string]interface{}{} @@ -241,6 +244,7 @@ func (ec *executionContext) _Query_user(ctx context.Context, field graphql.Colle return ec._User(ctx, field.Selections, res) } +// nolint: megacheck, ineffassign func (ec *executionContext) _Query_search(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { rawArgs := field.ArgumentMap(ec.Variables) args := map[string]interface{}{} @@ -273,8 +277,9 @@ func (ec *executionContext) _Query_search(ctx context.Context, field graphql.Col arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return ec._User(ctx, field.Selections, &res[idx1]) }(ctx)) @@ -282,6 +287,7 @@ func (ec *executionContext) _Query_search(ctx context.Context, field graphql.Col return arr1 } +// nolint: megacheck, ineffassign func (ec *executionContext) _Query___type(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { rawArgs := field.ArgumentMap(ec.Variables) args := map[string]interface{}{} @@ -315,6 +321,7 @@ func (ec *executionContext) _Query___type(ctx context.Context, field graphql.Col return ec.___Type(ctx, field.Selections, res) } +// nolint: megacheck, ineffassign func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "Query", @@ -403,6 +410,7 @@ func (ec *executionContext) _User(ctx context.Context, sel ast.SelectionSet, obj return out } +// nolint: megacheck, ineffassign func (ec *executionContext) _User_id(ctx context.Context, field graphql.CollectedField, obj *model.User) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "User", @@ -423,6 +431,7 @@ func (ec *executionContext) _User_id(ctx context.Context, field graphql.Collecte return model.MarshalID(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) _User_name(ctx context.Context, field graphql.CollectedField, obj *model.User) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "User", @@ -443,6 +452,7 @@ func (ec *executionContext) _User_name(ctx context.Context, field graphql.Collec return graphql.MarshalString(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) _User_created(ctx context.Context, field graphql.CollectedField, obj *model.User) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "User", @@ -460,6 +470,7 @@ func (ec *executionContext) _User_created(ctx context.Context, field graphql.Col return model.MarshalTimestamp(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) _User_isBanned(ctx context.Context, field graphql.CollectedField, obj *model.User) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "User", @@ -480,6 +491,7 @@ func (ec *executionContext) _User_isBanned(ctx context.Context, field graphql.Co return graphql.MarshalBoolean(bool(res)) } +// nolint: megacheck, ineffassign func (ec *executionContext) _User_primitiveResolver(ctx context.Context, field graphql.CollectedField, obj *model.User) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "User", @@ -500,6 +512,7 @@ func (ec *executionContext) _User_primitiveResolver(ctx context.Context, field g return graphql.MarshalString(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) _User_customResolver(ctx context.Context, field graphql.CollectedField, obj *model.User) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "User", @@ -520,6 +533,7 @@ func (ec *executionContext) _User_customResolver(ctx context.Context, field grap return res } +// nolint: megacheck, ineffassign func (ec *executionContext) _User_address(ctx context.Context, field graphql.CollectedField, obj *model.User) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "User", @@ -537,6 +551,7 @@ func (ec *executionContext) _User_address(ctx context.Context, field graphql.Col return ec._Address(ctx, field.Selections, &res) } +// nolint: megacheck, ineffassign func (ec *executionContext) _User_tier(ctx context.Context, field graphql.CollectedField, obj *model.User) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "User", @@ -598,6 +613,7 @@ func (ec *executionContext) ___Directive(ctx context.Context, sel ast.SelectionS return out } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Directive", @@ -618,6 +634,7 @@ func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql return graphql.MarshalString(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Directive_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Directive", @@ -635,6 +652,7 @@ func (ec *executionContext) ___Directive_description(ctx context.Context, field return graphql.MarshalString(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Directive_locations(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Directive", @@ -655,8 +673,9 @@ func (ec *executionContext) ___Directive_locations(ctx context.Context, field gr arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return graphql.MarshalString(res[idx1]) }(ctx)) @@ -664,6 +683,7 @@ func (ec *executionContext) ___Directive_locations(ctx context.Context, field gr return arr1 } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Directive", @@ -684,8 +704,9 @@ func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return ec.___InputValue(ctx, field.Selections, &res[idx1]) }(ctx)) @@ -734,6 +755,7 @@ func (ec *executionContext) ___EnumValue(ctx context.Context, sel ast.SelectionS return out } +// nolint: megacheck, ineffassign func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__EnumValue", @@ -754,6 +776,7 @@ func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql return graphql.MarshalString(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___EnumValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__EnumValue", @@ -771,6 +794,7 @@ func (ec *executionContext) ___EnumValue_description(ctx context.Context, field return graphql.MarshalString(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__EnumValue", @@ -791,6 +815,7 @@ func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field return graphql.MarshalBoolean(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__EnumValue", @@ -859,6 +884,7 @@ func (ec *executionContext) ___Field(ctx context.Context, sel ast.SelectionSet, return out } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Field", @@ -879,6 +905,7 @@ func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.Col return graphql.MarshalString(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Field_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Field", @@ -896,6 +923,7 @@ func (ec *executionContext) ___Field_description(ctx context.Context, field grap return graphql.MarshalString(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Field", @@ -916,8 +944,9 @@ func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.Col arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return ec.___InputValue(ctx, field.Selections, &res[idx1]) }(ctx)) @@ -925,6 +954,7 @@ func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.Col return arr1 } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Field", @@ -952,6 +982,7 @@ func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.Col return ec.___Type(ctx, field.Selections, res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Field", @@ -972,6 +1003,7 @@ func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field gra return graphql.MarshalBoolean(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Field", @@ -1030,6 +1062,7 @@ func (ec *executionContext) ___InputValue(ctx context.Context, sel ast.Selection return out } +// nolint: megacheck, ineffassign func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__InputValue", @@ -1050,6 +1083,7 @@ func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphq return graphql.MarshalString(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___InputValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__InputValue", @@ -1067,6 +1101,7 @@ func (ec *executionContext) ___InputValue_description(ctx context.Context, field return graphql.MarshalString(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__InputValue", @@ -1094,6 +1129,7 @@ func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphq return ec.___Type(ctx, field.Selections, res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__InputValue", @@ -1161,6 +1197,7 @@ func (ec *executionContext) ___Schema(ctx context.Context, sel ast.SelectionSet, return out } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Schema", @@ -1181,8 +1218,9 @@ func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.C arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return ec.___Type(ctx, field.Selections, &res[idx1]) }(ctx)) @@ -1190,6 +1228,7 @@ func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.C return arr1 } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Schema", @@ -1217,6 +1256,7 @@ func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graph return ec.___Type(ctx, field.Selections, res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Schema", @@ -1238,6 +1278,7 @@ func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field gr return ec.___Type(ctx, field.Selections, res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Schema", @@ -1259,6 +1300,7 @@ func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, fiel return ec.___Type(ctx, field.Selections, res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Schema_directives(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Schema", @@ -1279,8 +1321,9 @@ func (ec *executionContext) ___Schema_directives(ctx context.Context, field grap arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return ec.___Directive(ctx, field.Selections, &res[idx1]) }(ctx)) @@ -1336,6 +1379,7 @@ func (ec *executionContext) ___Type(ctx context.Context, sel ast.SelectionSet, o return out } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Type", @@ -1356,6 +1400,7 @@ func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.Coll return graphql.MarshalString(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Type", @@ -1377,6 +1422,7 @@ func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.Coll return graphql.MarshalString(*res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Type_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Type", @@ -1394,6 +1440,7 @@ func (ec *executionContext) ___Type_description(ctx context.Context, field graph return graphql.MarshalString(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler { rawArgs := field.ArgumentMap(ec.Variables) args := map[string]interface{}{} @@ -1423,8 +1470,9 @@ func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.Co arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return ec.___Field(ctx, field.Selections, &res[idx1]) }(ctx)) @@ -1432,6 +1480,7 @@ func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.Co return arr1 } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Type", @@ -1449,8 +1498,9 @@ func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphq arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return ec.___Type(ctx, field.Selections, &res[idx1]) }(ctx)) @@ -1458,6 +1508,7 @@ func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphq return arr1 } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Type", @@ -1475,8 +1526,9 @@ func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field gra arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return ec.___Type(ctx, field.Selections, &res[idx1]) }(ctx)) @@ -1484,6 +1536,7 @@ func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field gra return arr1 } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler { rawArgs := field.ArgumentMap(ec.Variables) args := map[string]interface{}{} @@ -1513,8 +1566,9 @@ func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphq arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return ec.___EnumValue(ctx, field.Selections, &res[idx1]) }(ctx)) @@ -1522,6 +1576,7 @@ func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphq return arr1 } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Type", @@ -1539,8 +1594,9 @@ func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graph arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return ec.___InputValue(ctx, field.Selections, &res[idx1]) }(ctx)) @@ -1548,6 +1604,7 @@ func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graph return arr1 } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Type", diff --git a/example/selection/generated.go b/example/selection/generated.go index 78b84af745c..7e40feac28a 100644 --- a/example/selection/generated.go +++ b/example/selection/generated.go @@ -118,6 +118,7 @@ func (ec *executionContext) _Like(ctx context.Context, sel ast.SelectionSet, obj return out } +// nolint: megacheck, ineffassign func (ec *executionContext) _Like_reaction(ctx context.Context, field graphql.CollectedField, obj *Like) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "Like", @@ -138,6 +139,7 @@ func (ec *executionContext) _Like_reaction(ctx context.Context, field graphql.Co return graphql.MarshalString(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) _Like_sent(ctx context.Context, field graphql.CollectedField, obj *Like) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "Like", @@ -158,6 +160,7 @@ func (ec *executionContext) _Like_sent(ctx context.Context, field graphql.Collec return graphql.MarshalTime(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) _Like_selection(ctx context.Context, field graphql.CollectedField, obj *Like) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "Like", @@ -175,8 +178,9 @@ func (ec *executionContext) _Like_selection(ctx context.Context, field graphql.C arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return graphql.MarshalString(res[idx1]) }(ctx)) @@ -184,6 +188,7 @@ func (ec *executionContext) _Like_selection(ctx context.Context, field graphql.C return arr1 } +// nolint: megacheck, ineffassign func (ec *executionContext) _Like_collected(ctx context.Context, field graphql.CollectedField, obj *Like) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "Like", @@ -201,8 +206,9 @@ func (ec *executionContext) _Like_collected(ctx context.Context, field graphql.C arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return graphql.MarshalString(res[idx1]) }(ctx)) @@ -251,6 +257,7 @@ func (ec *executionContext) _Post(ctx context.Context, sel ast.SelectionSet, obj return out } +// nolint: megacheck, ineffassign func (ec *executionContext) _Post_message(ctx context.Context, field graphql.CollectedField, obj *Post) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "Post", @@ -271,6 +278,7 @@ func (ec *executionContext) _Post_message(ctx context.Context, field graphql.Col return graphql.MarshalString(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) _Post_sent(ctx context.Context, field graphql.CollectedField, obj *Post) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "Post", @@ -291,6 +299,7 @@ func (ec *executionContext) _Post_sent(ctx context.Context, field graphql.Collec return graphql.MarshalTime(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) _Post_selection(ctx context.Context, field graphql.CollectedField, obj *Post) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "Post", @@ -308,8 +317,9 @@ func (ec *executionContext) _Post_selection(ctx context.Context, field graphql.C arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return graphql.MarshalString(res[idx1]) }(ctx)) @@ -317,6 +327,7 @@ func (ec *executionContext) _Post_selection(ctx context.Context, field graphql.C return arr1 } +// nolint: megacheck, ineffassign func (ec *executionContext) _Post_collected(ctx context.Context, field graphql.CollectedField, obj *Post) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "Post", @@ -334,8 +345,9 @@ func (ec *executionContext) _Post_collected(ctx context.Context, field graphql.C arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return graphql.MarshalString(res[idx1]) }(ctx)) @@ -383,6 +395,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr return out } +// nolint: megacheck, ineffassign func (ec *executionContext) _Query_events(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "Query", @@ -400,8 +413,9 @@ func (ec *executionContext) _Query_events(ctx context.Context, field graphql.Col arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return ec._Event(ctx, field.Selections, &res[idx1]) }(ctx)) @@ -409,6 +423,7 @@ func (ec *executionContext) _Query_events(ctx context.Context, field graphql.Col return arr1 } +// nolint: megacheck, ineffassign func (ec *executionContext) _Query___type(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { rawArgs := field.ArgumentMap(ec.Variables) args := map[string]interface{}{} @@ -442,6 +457,7 @@ func (ec *executionContext) _Query___type(ctx context.Context, field graphql.Col return ec.___Type(ctx, field.Selections, res) } +// nolint: megacheck, ineffassign func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "Query", @@ -507,6 +523,7 @@ func (ec *executionContext) ___Directive(ctx context.Context, sel ast.SelectionS return out } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Directive", @@ -527,6 +544,7 @@ func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql return graphql.MarshalString(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Directive_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Directive", @@ -544,6 +562,7 @@ func (ec *executionContext) ___Directive_description(ctx context.Context, field return graphql.MarshalString(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Directive_locations(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Directive", @@ -564,8 +583,9 @@ func (ec *executionContext) ___Directive_locations(ctx context.Context, field gr arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return graphql.MarshalString(res[idx1]) }(ctx)) @@ -573,6 +593,7 @@ func (ec *executionContext) ___Directive_locations(ctx context.Context, field gr return arr1 } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Directive", @@ -593,8 +614,9 @@ func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return ec.___InputValue(ctx, field.Selections, &res[idx1]) }(ctx)) @@ -643,6 +665,7 @@ func (ec *executionContext) ___EnumValue(ctx context.Context, sel ast.SelectionS return out } +// nolint: megacheck, ineffassign func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__EnumValue", @@ -663,6 +686,7 @@ func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql return graphql.MarshalString(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___EnumValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__EnumValue", @@ -680,6 +704,7 @@ func (ec *executionContext) ___EnumValue_description(ctx context.Context, field return graphql.MarshalString(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__EnumValue", @@ -700,6 +725,7 @@ func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field return graphql.MarshalBoolean(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__EnumValue", @@ -768,6 +794,7 @@ func (ec *executionContext) ___Field(ctx context.Context, sel ast.SelectionSet, return out } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Field", @@ -788,6 +815,7 @@ func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.Col return graphql.MarshalString(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Field_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Field", @@ -805,6 +833,7 @@ func (ec *executionContext) ___Field_description(ctx context.Context, field grap return graphql.MarshalString(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Field", @@ -825,8 +854,9 @@ func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.Col arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return ec.___InputValue(ctx, field.Selections, &res[idx1]) }(ctx)) @@ -834,6 +864,7 @@ func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.Col return arr1 } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Field", @@ -861,6 +892,7 @@ func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.Col return ec.___Type(ctx, field.Selections, res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Field", @@ -881,6 +913,7 @@ func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field gra return graphql.MarshalBoolean(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Field", @@ -939,6 +972,7 @@ func (ec *executionContext) ___InputValue(ctx context.Context, sel ast.Selection return out } +// nolint: megacheck, ineffassign func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__InputValue", @@ -959,6 +993,7 @@ func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphq return graphql.MarshalString(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___InputValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__InputValue", @@ -976,6 +1011,7 @@ func (ec *executionContext) ___InputValue_description(ctx context.Context, field return graphql.MarshalString(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__InputValue", @@ -1003,6 +1039,7 @@ func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphq return ec.___Type(ctx, field.Selections, res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__InputValue", @@ -1070,6 +1107,7 @@ func (ec *executionContext) ___Schema(ctx context.Context, sel ast.SelectionSet, return out } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Schema", @@ -1090,8 +1128,9 @@ func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.C arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return ec.___Type(ctx, field.Selections, &res[idx1]) }(ctx)) @@ -1099,6 +1138,7 @@ func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.C return arr1 } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Schema", @@ -1126,6 +1166,7 @@ func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graph return ec.___Type(ctx, field.Selections, res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Schema", @@ -1147,6 +1188,7 @@ func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field gr return ec.___Type(ctx, field.Selections, res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Schema", @@ -1168,6 +1210,7 @@ func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, fiel return ec.___Type(ctx, field.Selections, res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Schema_directives(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Schema", @@ -1188,8 +1231,9 @@ func (ec *executionContext) ___Schema_directives(ctx context.Context, field grap arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return ec.___Directive(ctx, field.Selections, &res[idx1]) }(ctx)) @@ -1245,6 +1289,7 @@ func (ec *executionContext) ___Type(ctx context.Context, sel ast.SelectionSet, o return out } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Type", @@ -1265,6 +1310,7 @@ func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.Coll return graphql.MarshalString(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Type", @@ -1286,6 +1332,7 @@ func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.Coll return graphql.MarshalString(*res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Type_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Type", @@ -1303,6 +1350,7 @@ func (ec *executionContext) ___Type_description(ctx context.Context, field graph return graphql.MarshalString(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler { rawArgs := field.ArgumentMap(ec.Variables) args := map[string]interface{}{} @@ -1332,8 +1380,9 @@ func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.Co arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return ec.___Field(ctx, field.Selections, &res[idx1]) }(ctx)) @@ -1341,6 +1390,7 @@ func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.Co return arr1 } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Type", @@ -1358,8 +1408,9 @@ func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphq arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return ec.___Type(ctx, field.Selections, &res[idx1]) }(ctx)) @@ -1367,6 +1418,7 @@ func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphq return arr1 } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Type", @@ -1384,8 +1436,9 @@ func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field gra arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return ec.___Type(ctx, field.Selections, &res[idx1]) }(ctx)) @@ -1393,6 +1446,7 @@ func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field gra return arr1 } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler { rawArgs := field.ArgumentMap(ec.Variables) args := map[string]interface{}{} @@ -1422,8 +1476,9 @@ func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphq arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return ec.___EnumValue(ctx, field.Selections, &res[idx1]) }(ctx)) @@ -1431,6 +1486,7 @@ func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphq return arr1 } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Type", @@ -1448,8 +1504,9 @@ func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graph arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return ec.___InputValue(ctx, field.Selections, &res[idx1]) }(ctx)) @@ -1457,6 +1514,7 @@ func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graph return arr1 } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Type", diff --git a/example/starwars/generated.go b/example/starwars/generated.go index a318ba0b480..e9a15b05dde 100644 --- a/example/starwars/generated.go +++ b/example/starwars/generated.go @@ -180,6 +180,7 @@ func (ec *executionContext) _Droid(ctx context.Context, sel ast.SelectionSet, ob return out } +// nolint: megacheck, ineffassign func (ec *executionContext) _Droid_id(ctx context.Context, field graphql.CollectedField, obj *Droid) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "Droid", @@ -200,6 +201,7 @@ func (ec *executionContext) _Droid_id(ctx context.Context, field graphql.Collect return graphql.MarshalID(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) _Droid_name(ctx context.Context, field graphql.CollectedField, obj *Droid) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "Droid", @@ -220,6 +222,7 @@ func (ec *executionContext) _Droid_name(ctx context.Context, field graphql.Colle return graphql.MarshalString(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) _Droid_friends(ctx context.Context, field graphql.CollectedField, obj *Droid) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "Droid", @@ -237,8 +240,9 @@ func (ec *executionContext) _Droid_friends(ctx context.Context, field graphql.Co arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return ec._Character(ctx, field.Selections, &res[idx1]) }(ctx)) @@ -246,6 +250,7 @@ func (ec *executionContext) _Droid_friends(ctx context.Context, field graphql.Co return arr1 } +// nolint: megacheck, ineffassign func (ec *executionContext) _Droid_friendsConnection(ctx context.Context, field graphql.CollectedField, obj *Droid) graphql.Marshaler { rawArgs := field.ArgumentMap(ec.Variables) args := map[string]interface{}{} @@ -298,6 +303,7 @@ func (ec *executionContext) _Droid_friendsConnection(ctx context.Context, field return ec._FriendsConnection(ctx, field.Selections, &res) } +// nolint: megacheck, ineffassign func (ec *executionContext) _Droid_appearsIn(ctx context.Context, field graphql.CollectedField, obj *Droid) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "Droid", @@ -318,8 +324,9 @@ func (ec *executionContext) _Droid_appearsIn(ctx context.Context, field graphql. arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return res[idx1] }(ctx)) @@ -327,6 +334,7 @@ func (ec *executionContext) _Droid_appearsIn(ctx context.Context, field graphql. return arr1 } +// nolint: megacheck, ineffassign func (ec *executionContext) _Droid_primaryFunction(ctx context.Context, field graphql.CollectedField, obj *Droid) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "Droid", @@ -394,6 +402,7 @@ func (ec *executionContext) _FriendsConnection(ctx context.Context, sel ast.Sele return out } +// nolint: megacheck, ineffassign func (ec *executionContext) _FriendsConnection_totalCount(ctx context.Context, field graphql.CollectedField, obj *FriendsConnection) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "FriendsConnection", @@ -414,6 +423,7 @@ func (ec *executionContext) _FriendsConnection_totalCount(ctx context.Context, f return graphql.MarshalInt(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) _FriendsConnection_edges(ctx context.Context, field graphql.CollectedField, obj *FriendsConnection) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "FriendsConnection", @@ -431,8 +441,9 @@ func (ec *executionContext) _FriendsConnection_edges(ctx context.Context, field arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return ec._FriendsEdge(ctx, field.Selections, &res[idx1]) }(ctx)) @@ -440,6 +451,7 @@ func (ec *executionContext) _FriendsConnection_edges(ctx context.Context, field return arr1 } +// nolint: megacheck, ineffassign func (ec *executionContext) _FriendsConnection_friends(ctx context.Context, field graphql.CollectedField, obj *FriendsConnection) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "FriendsConnection", @@ -457,8 +469,9 @@ func (ec *executionContext) _FriendsConnection_friends(ctx context.Context, fiel arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return ec._Character(ctx, field.Selections, &res[idx1]) }(ctx)) @@ -466,6 +479,7 @@ func (ec *executionContext) _FriendsConnection_friends(ctx context.Context, fiel return arr1 } +// nolint: megacheck, ineffassign func (ec *executionContext) _FriendsConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *FriendsConnection) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "FriendsConnection", @@ -520,6 +534,7 @@ func (ec *executionContext) _FriendsEdge(ctx context.Context, sel ast.SelectionS return out } +// nolint: megacheck, ineffassign func (ec *executionContext) _FriendsEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *FriendsEdge) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "FriendsEdge", @@ -540,6 +555,7 @@ func (ec *executionContext) _FriendsEdge_cursor(ctx context.Context, field graph return graphql.MarshalID(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) _FriendsEdge_node(ctx context.Context, field graphql.CollectedField, obj *FriendsEdge) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "FriendsEdge", @@ -628,6 +644,7 @@ func (ec *executionContext) _Human(ctx context.Context, sel ast.SelectionSet, ob return out } +// nolint: megacheck, ineffassign func (ec *executionContext) _Human_id(ctx context.Context, field graphql.CollectedField, obj *Human) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "Human", @@ -648,6 +665,7 @@ func (ec *executionContext) _Human_id(ctx context.Context, field graphql.Collect return graphql.MarshalID(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) _Human_name(ctx context.Context, field graphql.CollectedField, obj *Human) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "Human", @@ -668,6 +686,7 @@ func (ec *executionContext) _Human_name(ctx context.Context, field graphql.Colle return graphql.MarshalString(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) _Human_height(ctx context.Context, field graphql.CollectedField, obj *Human) graphql.Marshaler { rawArgs := field.ArgumentMap(ec.Variables) args := map[string]interface{}{} @@ -700,6 +719,7 @@ func (ec *executionContext) _Human_height(ctx context.Context, field graphql.Col return graphql.MarshalFloat(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) _Human_mass(ctx context.Context, field graphql.CollectedField, obj *Human) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "Human", @@ -717,6 +737,7 @@ func (ec *executionContext) _Human_mass(ctx context.Context, field graphql.Colle return graphql.MarshalFloat(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) _Human_friends(ctx context.Context, field graphql.CollectedField, obj *Human) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "Human", @@ -734,8 +755,9 @@ func (ec *executionContext) _Human_friends(ctx context.Context, field graphql.Co arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return ec._Character(ctx, field.Selections, &res[idx1]) }(ctx)) @@ -743,6 +765,7 @@ func (ec *executionContext) _Human_friends(ctx context.Context, field graphql.Co return arr1 } +// nolint: megacheck, ineffassign func (ec *executionContext) _Human_friendsConnection(ctx context.Context, field graphql.CollectedField, obj *Human) graphql.Marshaler { rawArgs := field.ArgumentMap(ec.Variables) args := map[string]interface{}{} @@ -795,6 +818,7 @@ func (ec *executionContext) _Human_friendsConnection(ctx context.Context, field return ec._FriendsConnection(ctx, field.Selections, &res) } +// nolint: megacheck, ineffassign func (ec *executionContext) _Human_appearsIn(ctx context.Context, field graphql.CollectedField, obj *Human) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "Human", @@ -815,8 +839,9 @@ func (ec *executionContext) _Human_appearsIn(ctx context.Context, field graphql. arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return res[idx1] }(ctx)) @@ -824,6 +849,7 @@ func (ec *executionContext) _Human_appearsIn(ctx context.Context, field graphql. return arr1 } +// nolint: megacheck, ineffassign func (ec *executionContext) _Human_starships(ctx context.Context, field graphql.CollectedField, obj *Human) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "Human", @@ -841,8 +867,9 @@ func (ec *executionContext) _Human_starships(ctx context.Context, field graphql. arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return ec._Starship(ctx, field.Selections, &res[idx1]) }(ctx)) @@ -881,6 +908,7 @@ func (ec *executionContext) _Mutation(ctx context.Context, sel ast.SelectionSet) return out } +// nolint: megacheck, ineffassign func (ec *executionContext) _Mutation_createReview(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { rawArgs := field.ArgumentMap(ec.Variables) args := map[string]interface{}{} @@ -966,6 +994,7 @@ func (ec *executionContext) _PageInfo(ctx context.Context, sel ast.SelectionSet, return out } +// nolint: megacheck, ineffassign func (ec *executionContext) _PageInfo_startCursor(ctx context.Context, field graphql.CollectedField, obj *PageInfo) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "PageInfo", @@ -986,6 +1015,7 @@ func (ec *executionContext) _PageInfo_startCursor(ctx context.Context, field gra return graphql.MarshalID(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) _PageInfo_endCursor(ctx context.Context, field graphql.CollectedField, obj *PageInfo) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "PageInfo", @@ -1006,6 +1036,7 @@ func (ec *executionContext) _PageInfo_endCursor(ctx context.Context, field graph return graphql.MarshalID(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) _PageInfo_hasNextPage(ctx context.Context, field graphql.CollectedField, obj *PageInfo) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "PageInfo", @@ -1108,6 +1139,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr return out } +// nolint: megacheck, ineffassign func (ec *executionContext) _Query_hero(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { rawArgs := field.ArgumentMap(ec.Variables) args := map[string]interface{}{} @@ -1137,6 +1169,7 @@ func (ec *executionContext) _Query_hero(ctx context.Context, field graphql.Colle return ec._Character(ctx, field.Selections, &res) } +// nolint: megacheck, ineffassign func (ec *executionContext) _Query_reviews(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { rawArgs := field.ArgumentMap(ec.Variables) args := map[string]interface{}{} @@ -1184,8 +1217,9 @@ func (ec *executionContext) _Query_reviews(ctx context.Context, field graphql.Co arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return ec._Review(ctx, field.Selections, &res[idx1]) }(ctx)) @@ -1193,6 +1227,7 @@ func (ec *executionContext) _Query_reviews(ctx context.Context, field graphql.Co return arr1 } +// nolint: megacheck, ineffassign func (ec *executionContext) _Query_search(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { rawArgs := field.ArgumentMap(ec.Variables) args := map[string]interface{}{} @@ -1225,8 +1260,9 @@ func (ec *executionContext) _Query_search(ctx context.Context, field graphql.Col arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return ec._SearchResult(ctx, field.Selections, &res[idx1]) }(ctx)) @@ -1234,6 +1270,7 @@ func (ec *executionContext) _Query_search(ctx context.Context, field graphql.Col return arr1 } +// nolint: megacheck, ineffassign func (ec *executionContext) _Query_character(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { rawArgs := field.ArgumentMap(ec.Variables) args := map[string]interface{}{} @@ -1263,6 +1300,7 @@ func (ec *executionContext) _Query_character(ctx context.Context, field graphql. return ec._Character(ctx, field.Selections, &res) } +// nolint: megacheck, ineffassign func (ec *executionContext) _Query_droid(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { rawArgs := field.ArgumentMap(ec.Variables) args := map[string]interface{}{} @@ -1296,6 +1334,7 @@ func (ec *executionContext) _Query_droid(ctx context.Context, field graphql.Coll return ec._Droid(ctx, field.Selections, res) } +// nolint: megacheck, ineffassign func (ec *executionContext) _Query_human(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { rawArgs := field.ArgumentMap(ec.Variables) args := map[string]interface{}{} @@ -1329,6 +1368,7 @@ func (ec *executionContext) _Query_human(ctx context.Context, field graphql.Coll return ec._Human(ctx, field.Selections, res) } +// nolint: megacheck, ineffassign func (ec *executionContext) _Query_starship(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { rawArgs := field.ArgumentMap(ec.Variables) args := map[string]interface{}{} @@ -1362,6 +1402,7 @@ func (ec *executionContext) _Query_starship(ctx context.Context, field graphql.C return ec._Starship(ctx, field.Selections, res) } +// nolint: megacheck, ineffassign func (ec *executionContext) _Query___type(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { rawArgs := field.ArgumentMap(ec.Variables) args := map[string]interface{}{} @@ -1395,6 +1436,7 @@ func (ec *executionContext) _Query___type(ctx context.Context, field graphql.Col return ec.___Type(ctx, field.Selections, res) } +// nolint: megacheck, ineffassign func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "Query", @@ -1452,6 +1494,7 @@ func (ec *executionContext) _Review(ctx context.Context, sel ast.SelectionSet, o return out } +// nolint: megacheck, ineffassign func (ec *executionContext) _Review_stars(ctx context.Context, field graphql.CollectedField, obj *Review) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "Review", @@ -1472,6 +1515,7 @@ func (ec *executionContext) _Review_stars(ctx context.Context, field graphql.Col return graphql.MarshalInt(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) _Review_commentary(ctx context.Context, field graphql.CollectedField, obj *Review) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "Review", @@ -1493,6 +1537,7 @@ func (ec *executionContext) _Review_commentary(ctx context.Context, field graphq return graphql.MarshalString(*res) } +// nolint: megacheck, ineffassign func (ec *executionContext) _Review_time(ctx context.Context, field graphql.CollectedField, obj *Review) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "Review", @@ -1562,6 +1607,7 @@ func (ec *executionContext) _Starship(ctx context.Context, sel ast.SelectionSet, return out } +// nolint: megacheck, ineffassign func (ec *executionContext) _Starship_id(ctx context.Context, field graphql.CollectedField, obj *Starship) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "Starship", @@ -1582,6 +1628,7 @@ func (ec *executionContext) _Starship_id(ctx context.Context, field graphql.Coll return graphql.MarshalID(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) _Starship_name(ctx context.Context, field graphql.CollectedField, obj *Starship) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "Starship", @@ -1602,6 +1649,7 @@ func (ec *executionContext) _Starship_name(ctx context.Context, field graphql.Co return graphql.MarshalString(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) _Starship_length(ctx context.Context, field graphql.CollectedField, obj *Starship) graphql.Marshaler { rawArgs := field.ArgumentMap(ec.Variables) args := map[string]interface{}{} @@ -1634,6 +1682,7 @@ func (ec *executionContext) _Starship_length(ctx context.Context, field graphql. return graphql.MarshalFloat(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) _Starship_history(ctx context.Context, field graphql.CollectedField, obj *Starship) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "Starship", @@ -1654,14 +1703,16 @@ func (ec *executionContext) _Starship_history(ctx context.Context, field graphql arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) arr2 := graphql.Array{} for idx2 := range res[idx1] { arr2 = append(arr2, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx2) + rctx := &graphql.ResolverContext{ + Index: &idx2, + } ctx = graphql.WithResolverContext(ctx, rctx) return graphql.MarshalInt(res[idx1][idx2]) }(ctx)) @@ -1716,6 +1767,7 @@ func (ec *executionContext) ___Directive(ctx context.Context, sel ast.SelectionS return out } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Directive", @@ -1736,6 +1788,7 @@ func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql return graphql.MarshalString(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Directive_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Directive", @@ -1753,6 +1806,7 @@ func (ec *executionContext) ___Directive_description(ctx context.Context, field return graphql.MarshalString(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Directive_locations(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Directive", @@ -1773,8 +1827,9 @@ func (ec *executionContext) ___Directive_locations(ctx context.Context, field gr arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return graphql.MarshalString(res[idx1]) }(ctx)) @@ -1782,6 +1837,7 @@ func (ec *executionContext) ___Directive_locations(ctx context.Context, field gr return arr1 } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Directive", @@ -1802,8 +1858,9 @@ func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return ec.___InputValue(ctx, field.Selections, &res[idx1]) }(ctx)) @@ -1852,6 +1909,7 @@ func (ec *executionContext) ___EnumValue(ctx context.Context, sel ast.SelectionS return out } +// nolint: megacheck, ineffassign func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__EnumValue", @@ -1872,6 +1930,7 @@ func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql return graphql.MarshalString(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___EnumValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__EnumValue", @@ -1889,6 +1948,7 @@ func (ec *executionContext) ___EnumValue_description(ctx context.Context, field return graphql.MarshalString(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__EnumValue", @@ -1909,6 +1969,7 @@ func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field return graphql.MarshalBoolean(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__EnumValue", @@ -1977,6 +2038,7 @@ func (ec *executionContext) ___Field(ctx context.Context, sel ast.SelectionSet, return out } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Field", @@ -1997,6 +2059,7 @@ func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.Col return graphql.MarshalString(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Field_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Field", @@ -2014,6 +2077,7 @@ func (ec *executionContext) ___Field_description(ctx context.Context, field grap return graphql.MarshalString(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Field", @@ -2034,8 +2098,9 @@ func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.Col arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return ec.___InputValue(ctx, field.Selections, &res[idx1]) }(ctx)) @@ -2043,6 +2108,7 @@ func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.Col return arr1 } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Field", @@ -2070,6 +2136,7 @@ func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.Col return ec.___Type(ctx, field.Selections, res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Field", @@ -2090,6 +2157,7 @@ func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field gra return graphql.MarshalBoolean(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Field", @@ -2148,6 +2216,7 @@ func (ec *executionContext) ___InputValue(ctx context.Context, sel ast.Selection return out } +// nolint: megacheck, ineffassign func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__InputValue", @@ -2168,6 +2237,7 @@ func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphq return graphql.MarshalString(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___InputValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__InputValue", @@ -2185,6 +2255,7 @@ func (ec *executionContext) ___InputValue_description(ctx context.Context, field return graphql.MarshalString(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__InputValue", @@ -2212,6 +2283,7 @@ func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphq return ec.___Type(ctx, field.Selections, res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__InputValue", @@ -2279,6 +2351,7 @@ func (ec *executionContext) ___Schema(ctx context.Context, sel ast.SelectionSet, return out } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Schema", @@ -2299,8 +2372,9 @@ func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.C arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return ec.___Type(ctx, field.Selections, &res[idx1]) }(ctx)) @@ -2308,6 +2382,7 @@ func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.C return arr1 } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Schema", @@ -2335,6 +2410,7 @@ func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graph return ec.___Type(ctx, field.Selections, res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Schema", @@ -2356,6 +2432,7 @@ func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field gr return ec.___Type(ctx, field.Selections, res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Schema", @@ -2377,6 +2454,7 @@ func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, fiel return ec.___Type(ctx, field.Selections, res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Schema_directives(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Schema", @@ -2397,8 +2475,9 @@ func (ec *executionContext) ___Schema_directives(ctx context.Context, field grap arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return ec.___Directive(ctx, field.Selections, &res[idx1]) }(ctx)) @@ -2454,6 +2533,7 @@ func (ec *executionContext) ___Type(ctx context.Context, sel ast.SelectionSet, o return out } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Type", @@ -2474,6 +2554,7 @@ func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.Coll return graphql.MarshalString(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Type", @@ -2495,6 +2576,7 @@ func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.Coll return graphql.MarshalString(*res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Type_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Type", @@ -2512,6 +2594,7 @@ func (ec *executionContext) ___Type_description(ctx context.Context, field graph return graphql.MarshalString(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler { rawArgs := field.ArgumentMap(ec.Variables) args := map[string]interface{}{} @@ -2541,8 +2624,9 @@ func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.Co arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return ec.___Field(ctx, field.Selections, &res[idx1]) }(ctx)) @@ -2550,6 +2634,7 @@ func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.Co return arr1 } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Type", @@ -2567,8 +2652,9 @@ func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphq arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return ec.___Type(ctx, field.Selections, &res[idx1]) }(ctx)) @@ -2576,6 +2662,7 @@ func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphq return arr1 } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Type", @@ -2593,8 +2680,9 @@ func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field gra arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return ec.___Type(ctx, field.Selections, &res[idx1]) }(ctx)) @@ -2602,6 +2690,7 @@ func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field gra return arr1 } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler { rawArgs := field.ArgumentMap(ec.Variables) args := map[string]interface{}{} @@ -2631,8 +2720,9 @@ func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphq arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return ec.___EnumValue(ctx, field.Selections, &res[idx1]) }(ctx)) @@ -2640,6 +2730,7 @@ func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphq return arr1 } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Type", @@ -2657,8 +2748,9 @@ func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graph arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return ec.___InputValue(ctx, field.Selections, &res[idx1]) }(ctx)) @@ -2666,6 +2758,7 @@ func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graph return arr1 } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Type", diff --git a/example/todo/generated.go b/example/todo/generated.go index 872f479c244..71aa82be867 100644 --- a/example/todo/generated.go +++ b/example/todo/generated.go @@ -132,6 +132,7 @@ func (ec *executionContext) _MyMutation(ctx context.Context, sel ast.SelectionSe return out } +// nolint: megacheck, ineffassign func (ec *executionContext) _MyMutation_createTodo(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { rawArgs := field.ArgumentMap(ec.Variables) args := map[string]interface{}{} @@ -164,6 +165,7 @@ func (ec *executionContext) _MyMutation_createTodo(ctx context.Context, field gr return ec._Todo(ctx, field.Selections, &res) } +// nolint: megacheck, ineffassign func (ec *executionContext) _MyMutation_updateTodo(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { rawArgs := field.ArgumentMap(ec.Variables) args := map[string]interface{}{} @@ -268,6 +270,7 @@ func (ec *executionContext) _MyQuery(ctx context.Context, sel ast.SelectionSet) return out } +// nolint: megacheck, ineffassign func (ec *executionContext) _MyQuery_todo(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { rawArgs := field.ArgumentMap(ec.Variables) args := map[string]interface{}{} @@ -301,6 +304,7 @@ func (ec *executionContext) _MyQuery_todo(ctx context.Context, field graphql.Col return ec._Todo(ctx, field.Selections, res) } +// nolint: megacheck, ineffassign func (ec *executionContext) _MyQuery_authenticatedTodo(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { rawArgs := field.ArgumentMap(ec.Variables) args := map[string]interface{}{} @@ -334,6 +338,7 @@ func (ec *executionContext) _MyQuery_authenticatedTodo(ctx context.Context, fiel return ec._Todo(ctx, field.Selections, res) } +// nolint: megacheck, ineffassign func (ec *executionContext) _MyQuery_lastTodo(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "MyQuery", @@ -355,6 +360,7 @@ func (ec *executionContext) _MyQuery_lastTodo(ctx context.Context, field graphql return ec._Todo(ctx, field.Selections, res) } +// nolint: megacheck, ineffassign func (ec *executionContext) _MyQuery_todos(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "MyQuery", @@ -375,8 +381,9 @@ func (ec *executionContext) _MyQuery_todos(ctx context.Context, field graphql.Co arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return ec._Todo(ctx, field.Selections, &res[idx1]) }(ctx)) @@ -384,6 +391,7 @@ func (ec *executionContext) _MyQuery_todos(ctx context.Context, field graphql.Co return arr1 } +// nolint: megacheck, ineffassign func (ec *executionContext) _MyQuery___type(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { rawArgs := field.ArgumentMap(ec.Variables) args := map[string]interface{}{} @@ -417,6 +425,7 @@ func (ec *executionContext) _MyQuery___type(ctx context.Context, field graphql.C return ec.___Type(ctx, field.Selections, res) } +// nolint: megacheck, ineffassign func (ec *executionContext) _MyQuery___schema(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "MyQuery", @@ -480,6 +489,7 @@ func (ec *executionContext) _Todo(ctx context.Context, sel ast.SelectionSet, obj return out } +// nolint: megacheck, ineffassign func (ec *executionContext) _Todo_id(ctx context.Context, field graphql.CollectedField, obj *Todo) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "Todo", @@ -500,6 +510,7 @@ func (ec *executionContext) _Todo_id(ctx context.Context, field graphql.Collecte return graphql.MarshalInt(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) _Todo_text(ctx context.Context, field graphql.CollectedField, obj *Todo) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "Todo", @@ -520,6 +531,7 @@ func (ec *executionContext) _Todo_text(ctx context.Context, field graphql.Collec return graphql.MarshalString(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) _Todo_done(ctx context.Context, field graphql.CollectedField, obj *Todo) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "Todo", @@ -584,6 +596,7 @@ func (ec *executionContext) ___Directive(ctx context.Context, sel ast.SelectionS return out } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Directive", @@ -604,6 +617,7 @@ func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql return graphql.MarshalString(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Directive_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Directive", @@ -621,6 +635,7 @@ func (ec *executionContext) ___Directive_description(ctx context.Context, field return graphql.MarshalString(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Directive_locations(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Directive", @@ -641,8 +656,9 @@ func (ec *executionContext) ___Directive_locations(ctx context.Context, field gr arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return graphql.MarshalString(res[idx1]) }(ctx)) @@ -650,6 +666,7 @@ func (ec *executionContext) ___Directive_locations(ctx context.Context, field gr return arr1 } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Directive", @@ -670,8 +687,9 @@ func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return ec.___InputValue(ctx, field.Selections, &res[idx1]) }(ctx)) @@ -720,6 +738,7 @@ func (ec *executionContext) ___EnumValue(ctx context.Context, sel ast.SelectionS return out } +// nolint: megacheck, ineffassign func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__EnumValue", @@ -740,6 +759,7 @@ func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql return graphql.MarshalString(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___EnumValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__EnumValue", @@ -757,6 +777,7 @@ func (ec *executionContext) ___EnumValue_description(ctx context.Context, field return graphql.MarshalString(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__EnumValue", @@ -777,6 +798,7 @@ func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field return graphql.MarshalBoolean(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__EnumValue", @@ -845,6 +867,7 @@ func (ec *executionContext) ___Field(ctx context.Context, sel ast.SelectionSet, return out } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Field", @@ -865,6 +888,7 @@ func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.Col return graphql.MarshalString(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Field_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Field", @@ -882,6 +906,7 @@ func (ec *executionContext) ___Field_description(ctx context.Context, field grap return graphql.MarshalString(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Field", @@ -902,8 +927,9 @@ func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.Col arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return ec.___InputValue(ctx, field.Selections, &res[idx1]) }(ctx)) @@ -911,6 +937,7 @@ func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.Col return arr1 } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Field", @@ -938,6 +965,7 @@ func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.Col return ec.___Type(ctx, field.Selections, res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Field", @@ -958,6 +986,7 @@ func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field gra return graphql.MarshalBoolean(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Field", @@ -1016,6 +1045,7 @@ func (ec *executionContext) ___InputValue(ctx context.Context, sel ast.Selection return out } +// nolint: megacheck, ineffassign func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__InputValue", @@ -1036,6 +1066,7 @@ func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphq return graphql.MarshalString(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___InputValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__InputValue", @@ -1053,6 +1084,7 @@ func (ec *executionContext) ___InputValue_description(ctx context.Context, field return graphql.MarshalString(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__InputValue", @@ -1080,6 +1112,7 @@ func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphq return ec.___Type(ctx, field.Selections, res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__InputValue", @@ -1147,6 +1180,7 @@ func (ec *executionContext) ___Schema(ctx context.Context, sel ast.SelectionSet, return out } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Schema", @@ -1167,8 +1201,9 @@ func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.C arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return ec.___Type(ctx, field.Selections, &res[idx1]) }(ctx)) @@ -1176,6 +1211,7 @@ func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.C return arr1 } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Schema", @@ -1203,6 +1239,7 @@ func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graph return ec.___Type(ctx, field.Selections, res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Schema", @@ -1224,6 +1261,7 @@ func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field gr return ec.___Type(ctx, field.Selections, res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Schema", @@ -1245,6 +1283,7 @@ func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, fiel return ec.___Type(ctx, field.Selections, res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Schema_directives(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Schema", @@ -1265,8 +1304,9 @@ func (ec *executionContext) ___Schema_directives(ctx context.Context, field grap arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return ec.___Directive(ctx, field.Selections, &res[idx1]) }(ctx)) @@ -1322,6 +1362,7 @@ func (ec *executionContext) ___Type(ctx context.Context, sel ast.SelectionSet, o return out } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Type", @@ -1342,6 +1383,7 @@ func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.Coll return graphql.MarshalString(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Type", @@ -1363,6 +1405,7 @@ func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.Coll return graphql.MarshalString(*res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Type_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Type", @@ -1380,6 +1423,7 @@ func (ec *executionContext) ___Type_description(ctx context.Context, field graph return graphql.MarshalString(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler { rawArgs := field.ArgumentMap(ec.Variables) args := map[string]interface{}{} @@ -1409,8 +1453,9 @@ func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.Co arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return ec.___Field(ctx, field.Selections, &res[idx1]) }(ctx)) @@ -1418,6 +1463,7 @@ func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.Co return arr1 } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Type", @@ -1435,8 +1481,9 @@ func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphq arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return ec.___Type(ctx, field.Selections, &res[idx1]) }(ctx)) @@ -1444,6 +1491,7 @@ func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphq return arr1 } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Type", @@ -1461,8 +1509,9 @@ func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field gra arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return ec.___Type(ctx, field.Selections, &res[idx1]) }(ctx)) @@ -1470,6 +1519,7 @@ func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field gra return arr1 } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler { rawArgs := field.ArgumentMap(ec.Variables) args := map[string]interface{}{} @@ -1499,8 +1549,9 @@ func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphq arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return ec.___EnumValue(ctx, field.Selections, &res[idx1]) }(ctx)) @@ -1508,6 +1559,7 @@ func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphq return arr1 } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Type", @@ -1525,8 +1577,9 @@ func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graph arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return ec.___InputValue(ctx, field.Selections, &res[idx1]) }(ctx)) @@ -1534,6 +1587,7 @@ func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graph return arr1 } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Type", diff --git a/graphql/context.go b/graphql/context.go index 3bd0cb8e22e..6baee83c69c 100644 --- a/graphql/context.go +++ b/graphql/context.go @@ -82,32 +82,18 @@ type ResolverContext struct { Args map[string]interface{} // The raw field Field CollectedField + // The index of array in path. + Index *int // The result object of resolver Result interface{} - - // indicies tracks the array indicies only. all field aliases come from the context stack - indicies []int -} - -func (r *ResolverContext) Copy() *ResolverContext { - return &ResolverContext{ - Parent: r.Parent, - Object: r.Object, - Args: r.Args, - Field: r.Field, - Result: r.Result, - indicies: append(make([]int, 0, len(r.indicies)+1), r.indicies...), - } } func (r *ResolverContext) Path() []interface{} { var path []interface{} for it := r; it != nil; it = it.Parent { - for i := len(it.indicies) - 1; i >= 0; i-- { - path = append(path, it.indicies[i]) - } - - if it.Field.Field != nil { + if it.Index != nil { + path = append(path, *it.Index) + } else if it.Field.Field != nil { path = append(path, it.Field.Alias) } } @@ -121,10 +107,6 @@ func (r *ResolverContext) Path() []interface{} { return path } -func (r *ResolverContext) PushIndex(index int) { - r.indicies = append(r.indicies, index) -} - func GetResolverContext(ctx context.Context) *ResolverContext { val, _ := ctx.Value(resolver).(*ResolverContext) return val diff --git a/integration/generated.go b/integration/generated.go index 6663d827aa4..188fe1f1143 100644 --- a/integration/generated.go +++ b/integration/generated.go @@ -143,6 +143,7 @@ func (ec *executionContext) _Element(ctx context.Context, sel ast.SelectionSet, return out } +// nolint: megacheck, ineffassign func (ec *executionContext) _Element_child(ctx context.Context, field graphql.CollectedField, obj *models.Element) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "Element", @@ -163,6 +164,7 @@ func (ec *executionContext) _Element_child(ctx context.Context, field graphql.Co return ec._Element(ctx, field.Selections, &res) } +// nolint: megacheck, ineffassign func (ec *executionContext) _Element_error(ctx context.Context, field graphql.CollectedField, obj *models.Element) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "Element", @@ -183,6 +185,7 @@ func (ec *executionContext) _Element_error(ctx context.Context, field graphql.Co return graphql.MarshalBoolean(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) _Element_mismatched(ctx context.Context, field graphql.CollectedField, obj *models.Element) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "Element", @@ -200,8 +203,9 @@ func (ec *executionContext) _Element_mismatched(ctx context.Context, field graph arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return graphql.MarshalBoolean(res[idx1]) }(ctx)) @@ -282,6 +286,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr return out } +// nolint: megacheck, ineffassign func (ec *executionContext) _Query_path(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "Query", @@ -299,8 +304,9 @@ func (ec *executionContext) _Query_path(ctx context.Context, field graphql.Colle arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) if res[idx1] == nil { @@ -312,6 +318,7 @@ func (ec *executionContext) _Query_path(ctx context.Context, field graphql.Colle return arr1 } +// nolint: megacheck, ineffassign func (ec *executionContext) _Query_date(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { rawArgs := field.ArgumentMap(ec.Variables) args := map[string]interface{}{} @@ -344,6 +351,7 @@ func (ec *executionContext) _Query_date(ctx context.Context, field graphql.Colle return graphql.MarshalBoolean(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) _Query_viewer(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "Query", @@ -365,6 +373,7 @@ func (ec *executionContext) _Query_viewer(ctx context.Context, field graphql.Col return ec._Viewer(ctx, field.Selections, res) } +// nolint: megacheck, ineffassign func (ec *executionContext) _Query_jsonEncoding(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "Query", @@ -385,6 +394,7 @@ func (ec *executionContext) _Query_jsonEncoding(ctx context.Context, field graph return graphql.MarshalString(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) _Query_error(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { rawArgs := field.ArgumentMap(ec.Variables) args := map[string]interface{}{} @@ -417,6 +427,7 @@ func (ec *executionContext) _Query_error(ctx context.Context, field graphql.Coll return graphql.MarshalBoolean(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) _Query___type(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { rawArgs := field.ArgumentMap(ec.Variables) args := map[string]interface{}{} @@ -450,6 +461,7 @@ func (ec *executionContext) _Query___type(ctx context.Context, field graphql.Col return ec.___Type(ctx, field.Selections, res) } +// nolint: megacheck, ineffassign func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "Query", @@ -513,6 +525,7 @@ func (ec *executionContext) _User(ctx context.Context, sel ast.SelectionSet, obj return out } +// nolint: megacheck, ineffassign func (ec *executionContext) _User_name(ctx context.Context, field graphql.CollectedField, obj *remote_api.User) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "User", @@ -533,6 +546,7 @@ func (ec *executionContext) _User_name(ctx context.Context, field graphql.Collec return graphql.MarshalString(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) _User_likes(ctx context.Context, field graphql.CollectedField, obj *remote_api.User) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "User", @@ -553,8 +567,9 @@ func (ec *executionContext) _User_likes(ctx context.Context, field graphql.Colle arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return graphql.MarshalString(res[idx1]) }(ctx)) @@ -591,6 +606,7 @@ func (ec *executionContext) _Viewer(ctx context.Context, sel ast.SelectionSet, o return out } +// nolint: megacheck, ineffassign func (ec *executionContext) _Viewer_user(ctx context.Context, field graphql.CollectedField, obj *models.Viewer) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "Viewer", @@ -656,6 +672,7 @@ func (ec *executionContext) ___Directive(ctx context.Context, sel ast.SelectionS return out } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Directive", @@ -676,6 +693,7 @@ func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql return graphql.MarshalString(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Directive_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Directive", @@ -693,6 +711,7 @@ func (ec *executionContext) ___Directive_description(ctx context.Context, field return graphql.MarshalString(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Directive_locations(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Directive", @@ -713,8 +732,9 @@ func (ec *executionContext) ___Directive_locations(ctx context.Context, field gr arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return graphql.MarshalString(res[idx1]) }(ctx)) @@ -722,6 +742,7 @@ func (ec *executionContext) ___Directive_locations(ctx context.Context, field gr return arr1 } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Directive", @@ -742,8 +763,9 @@ func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return ec.___InputValue(ctx, field.Selections, &res[idx1]) }(ctx)) @@ -792,6 +814,7 @@ func (ec *executionContext) ___EnumValue(ctx context.Context, sel ast.SelectionS return out } +// nolint: megacheck, ineffassign func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__EnumValue", @@ -812,6 +835,7 @@ func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql return graphql.MarshalString(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___EnumValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__EnumValue", @@ -829,6 +853,7 @@ func (ec *executionContext) ___EnumValue_description(ctx context.Context, field return graphql.MarshalString(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__EnumValue", @@ -849,6 +874,7 @@ func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field return graphql.MarshalBoolean(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__EnumValue", @@ -917,6 +943,7 @@ func (ec *executionContext) ___Field(ctx context.Context, sel ast.SelectionSet, return out } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Field", @@ -937,6 +964,7 @@ func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.Col return graphql.MarshalString(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Field_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Field", @@ -954,6 +982,7 @@ func (ec *executionContext) ___Field_description(ctx context.Context, field grap return graphql.MarshalString(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Field", @@ -974,8 +1003,9 @@ func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.Col arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return ec.___InputValue(ctx, field.Selections, &res[idx1]) }(ctx)) @@ -983,6 +1013,7 @@ func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.Col return arr1 } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Field", @@ -1010,6 +1041,7 @@ func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.Col return ec.___Type(ctx, field.Selections, res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Field", @@ -1030,6 +1062,7 @@ func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field gra return graphql.MarshalBoolean(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Field", @@ -1088,6 +1121,7 @@ func (ec *executionContext) ___InputValue(ctx context.Context, sel ast.Selection return out } +// nolint: megacheck, ineffassign func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__InputValue", @@ -1108,6 +1142,7 @@ func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphq return graphql.MarshalString(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___InputValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__InputValue", @@ -1125,6 +1160,7 @@ func (ec *executionContext) ___InputValue_description(ctx context.Context, field return graphql.MarshalString(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__InputValue", @@ -1152,6 +1188,7 @@ func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphq return ec.___Type(ctx, field.Selections, res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__InputValue", @@ -1219,6 +1256,7 @@ func (ec *executionContext) ___Schema(ctx context.Context, sel ast.SelectionSet, return out } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Schema", @@ -1239,8 +1277,9 @@ func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.C arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return ec.___Type(ctx, field.Selections, &res[idx1]) }(ctx)) @@ -1248,6 +1287,7 @@ func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.C return arr1 } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Schema", @@ -1275,6 +1315,7 @@ func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graph return ec.___Type(ctx, field.Selections, res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Schema", @@ -1296,6 +1337,7 @@ func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field gr return ec.___Type(ctx, field.Selections, res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Schema", @@ -1317,6 +1359,7 @@ func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, fiel return ec.___Type(ctx, field.Selections, res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Schema_directives(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Schema", @@ -1337,8 +1380,9 @@ func (ec *executionContext) ___Schema_directives(ctx context.Context, field grap arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return ec.___Directive(ctx, field.Selections, &res[idx1]) }(ctx)) @@ -1394,6 +1438,7 @@ func (ec *executionContext) ___Type(ctx context.Context, sel ast.SelectionSet, o return out } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Type", @@ -1414,6 +1459,7 @@ func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.Coll return graphql.MarshalString(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Type", @@ -1435,6 +1481,7 @@ func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.Coll return graphql.MarshalString(*res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Type_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Type", @@ -1452,6 +1499,7 @@ func (ec *executionContext) ___Type_description(ctx context.Context, field graph return graphql.MarshalString(res) } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler { rawArgs := field.ArgumentMap(ec.Variables) args := map[string]interface{}{} @@ -1481,8 +1529,9 @@ func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.Co arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return ec.___Field(ctx, field.Selections, &res[idx1]) }(ctx)) @@ -1490,6 +1539,7 @@ func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.Co return arr1 } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Type", @@ -1507,8 +1557,9 @@ func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphq arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return ec.___Type(ctx, field.Selections, &res[idx1]) }(ctx)) @@ -1516,6 +1567,7 @@ func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphq return arr1 } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Type", @@ -1533,8 +1585,9 @@ func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field gra arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return ec.___Type(ctx, field.Selections, &res[idx1]) }(ctx)) @@ -1542,6 +1595,7 @@ func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field gra return arr1 } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler { rawArgs := field.ArgumentMap(ec.Variables) args := map[string]interface{}{} @@ -1571,8 +1625,9 @@ func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphq arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return ec.___EnumValue(ctx, field.Selections, &res[idx1]) }(ctx)) @@ -1580,6 +1635,7 @@ func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphq return arr1 } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Type", @@ -1597,8 +1653,9 @@ func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graph arr1 := graphql.Array{} for idx1 := range res { arr1 = append(arr1, func(ctx context.Context) graphql.Marshaler { - rctx := graphql.GetResolverContext(ctx).Copy() - rctx.PushIndex(idx1) + rctx := &graphql.ResolverContext{ + Index: &idx1, + } ctx = graphql.WithResolverContext(ctx, rctx) return ec.___InputValue(ctx, field.Selections, &res[idx1]) }(ctx)) @@ -1606,6 +1663,7 @@ func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graph return arr1 } +// nolint: megacheck, ineffassign func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler { rctx := &graphql.ResolverContext{ Object: "__Type",