diff --git a/codegen/directives.gotpl b/codegen/directives.gotpl index bdfb5aa2f77..e6d2455f6c8 100644 --- a/codegen/directives.gotpl +++ b/codegen/directives.gotpl @@ -115,8 +115,8 @@ func (ec *executionContext) _subscriptionMiddleware(ctx context.Context, obj *as {{ if .Directives.LocationDirectives "FIELD" }} func (ec *executionContext) _fieldMiddleware(ctx context.Context, obj interface{}, next graphql.Resolver) interface{} { {{- if .Directives.LocationDirectives "FIELD" }} - rctx := graphql.GetResolverContext(ctx) - for _, d := range rctx.Field.Directives { + fc := graphql.GetFieldContext(ctx) + for _, d := range fc.Field.Directives { switch d.Name { {{- range $directive := .Directives.LocationDirectives "FIELD" }} case "{{$directive.Name}}": diff --git a/codegen/field.gotpl b/codegen/field.gotpl index ea90d0ff84e..431028e097d 100644 --- a/codegen/field.gotpl +++ b/codegen/field.gotpl @@ -5,7 +5,7 @@ func (ec *executionContext) _{{$object.Name}}_{{$field.Name}}(ctx context.Contex {{- if $object.Stream }} {{- $null = "nil" }} {{- end }} - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: {{$object.Name|quote}}, Field: field, Args: nil, @@ -13,13 +13,13 @@ func (ec *executionContext) _{{$object.Name}}_{{$field.Name}}(ctx context.Contex Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func () { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = {{ $null }} } }() - ctx = graphql.WithResolverContext(ctx, rctx) + ctx = graphql.WithFieldContext(ctx, fc) {{- if $field.Args }} rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.{{ $field.ArgsFunc }}(ctx,rawArgs) @@ -27,9 +27,9 @@ func (ec *executionContext) _{{$object.Name}}_{{$field.Name}}(ctx context.Contex ec.Error(ctx, err) return {{ $null }} } - rctx.Args = args + fc.Args = args {{- end }} - rctx.Stats.ArgumentsCompleted = graphql.Now() + fc.Stats.ArgumentsCompleted = graphql.Now() {{- if $.Directives.LocationDirectives "FIELD" }} resTmp := ec._fieldMiddleware(ctx, {{if $object.Root}}nil{{else}}obj{{end}}, func(rctx context.Context) (interface{}, error) { {{ template "field" $field }} @@ -45,7 +45,7 @@ func (ec *executionContext) _{{$object.Name}}_{{$field.Name}}(ctx context.Contex {{- end }} if resTmp == nil { {{- if $field.TypeReference.GQL.NonNull }} - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } {{- end }} @@ -67,7 +67,7 @@ func (ec *executionContext) _{{$object.Name}}_{{$field.Name}}(ctx context.Contex } {{- else }} res := resTmp.({{$field.TypeReference.GO | ref}}) - rctx.Result = res + fc.Result = res return ec.{{ $field.TypeReference.MarshalFunc }}(ctx, field.Selections, res) {{- end }} } diff --git a/codegen/generate.go b/codegen/generate.go index eafa3f87434..a32e329e60c 100644 --- a/codegen/generate.go +++ b/codegen/generate.go @@ -10,6 +10,6 @@ func GenerateCode(data *Data) error { Filename: data.Config.Exec.Filename, Data: data, RegionTags: true, - GeneratedHeader: true, + GeneratedHeader: false, }) } diff --git a/codegen/object.gotpl b/codegen/object.gotpl index 84a335989a7..8dfef7c6fa7 100644 --- a/codegen/object.gotpl +++ b/codegen/object.gotpl @@ -5,8 +5,9 @@ var {{ $object.Name|lcFirst}}Implementors = {{$object.Implementors}} {{- if .Stream }} func (ec *executionContext) _{{$object.Name}}(ctx context.Context, sel ast.SelectionSet) func() graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, {{$object.Name|lcFirst}}Implementors) - ctx = graphql.WithResolverContext(ctx, &graphql.ResolverContext{ + ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{ Object: {{$object.Name|quote}}, + Stats: graphql.FieldStats{Started: graphql.Now()}, }) if len(fields) != 1 { ec.Errorf(ctx, "must subscribe to exactly one stream") @@ -26,8 +27,9 @@ func (ec *executionContext) _{{$object.Name}}(ctx context.Context, sel ast.Selec func (ec *executionContext) _{{$object.Name}}(ctx context.Context, sel ast.SelectionSet{{ if not $object.Root }},obj {{$object.Reference | ref }}{{ end }}) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, {{$object.Name|lcFirst}}Implementors) {{if $object.Root}} - ctx = graphql.WithResolverContext(ctx, &graphql.ResolverContext{ + ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{ Object: {{$object.Name|quote}}, + Stats: graphql.FieldStats{Started: graphql.Now()}, }) {{end}} diff --git a/codegen/testserver/generated.go b/codegen/testserver/generated.go index f75ac0b9b1b..5eca48f7cd2 100644 --- a/codegen/testserver/generated.go +++ b/codegen/testserver/generated.go @@ -1,5 +1,3 @@ -// Code generated by github.com/99designs/gqlgen, DO NOT EDIT. - package testserver import ( @@ -2682,8 +2680,8 @@ func (ec *executionContext) field___Type_fields_args(ctx context.Context, rawArg // region ************************** directives.gotpl ************************** func (ec *executionContext) _fieldMiddleware(ctx context.Context, obj interface{}, next graphql.Resolver) interface{} { - rctx := graphql.GetResolverContext(ctx) - for _, d := range rctx.Field.Directives { + fc := graphql.GetFieldContext(ctx) + for _, d := range fc.Field.Directives { switch d.Name { case "logged": rawArgs := d.ArgumentMap(ec.Variables) @@ -2714,7 +2712,7 @@ func (ec *executionContext) _fieldMiddleware(ctx context.Context, obj interface{ // region **************************** field.gotpl ***************************** func (ec *executionContext) _A_id(ctx context.Context, field graphql.CollectedField, obj *A) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "A", Field: field, Args: nil, @@ -2722,32 +2720,32 @@ func (ec *executionContext) _A_id(ctx context.Context, field graphql.CollectedFi Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.ID, nil }) if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalNID2string(ctx, field.Selections, res) } func (ec *executionContext) _AIt_id(ctx context.Context, field graphql.CollectedField, obj *AIt) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "AIt", Field: field, Args: nil, @@ -2755,32 +2753,32 @@ func (ec *executionContext) _AIt_id(ctx context.Context, field graphql.Collected Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.ID, nil }) if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalNID2string(ctx, field.Selections, res) } func (ec *executionContext) _AbIt_id(ctx context.Context, field graphql.CollectedField, obj *AbIt) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "AbIt", Field: field, Args: nil, @@ -2788,32 +2786,32 @@ func (ec *executionContext) _AbIt_id(ctx context.Context, field graphql.Collecte Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.ID, nil }) if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalNID2string(ctx, field.Selections, res) } func (ec *executionContext) _Autobind_int(ctx context.Context, field graphql.CollectedField, obj *Autobind) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Autobind", Field: field, Args: nil, @@ -2821,32 +2819,32 @@ func (ec *executionContext) _Autobind_int(ctx context.Context, field graphql.Col Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Int, nil }) if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(int) - rctx.Result = res + fc.Result = res return ec.marshalNInt2int(ctx, field.Selections, res) } func (ec *executionContext) _Autobind_int32(ctx context.Context, field graphql.CollectedField, obj *Autobind) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Autobind", Field: field, Args: nil, @@ -2854,32 +2852,32 @@ func (ec *executionContext) _Autobind_int32(ctx context.Context, field graphql.C Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Int32, nil }) if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(int32) - rctx.Result = res + fc.Result = res return ec.marshalNInt2int32(ctx, field.Selections, res) } func (ec *executionContext) _Autobind_int64(ctx context.Context, field graphql.CollectedField, obj *Autobind) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Autobind", Field: field, Args: nil, @@ -2887,32 +2885,32 @@ func (ec *executionContext) _Autobind_int64(ctx context.Context, field graphql.C Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Int64, nil }) if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(int64) - rctx.Result = res + fc.Result = res return ec.marshalNInt2int64(ctx, field.Selections, res) } func (ec *executionContext) _Autobind_idStr(ctx context.Context, field graphql.CollectedField, obj *Autobind) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Autobind", Field: field, Args: nil, @@ -2920,32 +2918,32 @@ func (ec *executionContext) _Autobind_idStr(ctx context.Context, field graphql.C Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.IdStr, nil }) if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalNID2string(ctx, field.Selections, res) } func (ec *executionContext) _Autobind_idInt(ctx context.Context, field graphql.CollectedField, obj *Autobind) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Autobind", Field: field, Args: nil, @@ -2953,32 +2951,32 @@ func (ec *executionContext) _Autobind_idInt(ctx context.Context, field graphql.C Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.IdInt, nil }) if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(int) - rctx.Result = res + fc.Result = res return ec.marshalNID2int(ctx, field.Selections, res) } func (ec *executionContext) _B_id(ctx context.Context, field graphql.CollectedField, obj *B) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "B", Field: field, Args: nil, @@ -2986,32 +2984,32 @@ func (ec *executionContext) _B_id(ctx context.Context, field graphql.CollectedFi Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.ID, nil }) if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalNID2string(ctx, field.Selections, res) } func (ec *executionContext) _Circle_radius(ctx context.Context, field graphql.CollectedField, obj *Circle) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Circle", Field: field, Args: nil, @@ -3019,14 +3017,14 @@ func (ec *executionContext) _Circle_radius(ctx context.Context, field graphql.Co Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Radius, nil @@ -3036,12 +3034,12 @@ func (ec *executionContext) _Circle_radius(ctx context.Context, field graphql.Co return graphql.Null } res := resTmp.(float64) - rctx.Result = res + fc.Result = res return ec.marshalOFloat2float64(ctx, field.Selections, res) } func (ec *executionContext) _Circle_area(ctx context.Context, field graphql.CollectedField, obj *Circle) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Circle", Field: field, Args: nil, @@ -3049,14 +3047,14 @@ func (ec *executionContext) _Circle_area(ctx context.Context, field graphql.Coll Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Area(), nil @@ -3066,12 +3064,12 @@ func (ec *executionContext) _Circle_area(ctx context.Context, field graphql.Coll return graphql.Null } res := resTmp.(float64) - rctx.Result = res + fc.Result = res return ec.marshalOFloat2float64(ctx, field.Selections, res) } func (ec *executionContext) _Content_Post_foo(ctx context.Context, field graphql.CollectedField, obj *ContentPost) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Content_Post", Field: field, Args: nil, @@ -3079,14 +3077,14 @@ func (ec *executionContext) _Content_Post_foo(ctx context.Context, field graphql Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Foo, nil @@ -3096,12 +3094,12 @@ func (ec *executionContext) _Content_Post_foo(ctx context.Context, field graphql return graphql.Null } res := resTmp.(*string) - rctx.Result = res + fc.Result = res return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } func (ec *executionContext) _Content_User_foo(ctx context.Context, field graphql.CollectedField, obj *ContentUser) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Content_User", Field: field, Args: nil, @@ -3109,14 +3107,14 @@ func (ec *executionContext) _Content_User_foo(ctx context.Context, field graphql Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Foo, nil @@ -3126,12 +3124,12 @@ func (ec *executionContext) _Content_User_foo(ctx context.Context, field graphql return graphql.Null } res := resTmp.(*string) - rctx.Result = res + fc.Result = res return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } func (ec *executionContext) _EmbeddedDefaultScalar_value(ctx context.Context, field graphql.CollectedField, obj *EmbeddedDefaultScalar) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "EmbeddedDefaultScalar", Field: field, Args: nil, @@ -3139,14 +3137,14 @@ func (ec *executionContext) _EmbeddedDefaultScalar_value(ctx context.Context, fi Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Value, nil @@ -3156,12 +3154,12 @@ func (ec *executionContext) _EmbeddedDefaultScalar_value(ctx context.Context, fi return graphql.Null } res := resTmp.(*string) - rctx.Result = res + fc.Result = res return ec.marshalODefaultScalarImplementation2ᚖstring(ctx, field.Selections, res) } func (ec *executionContext) _EmbeddedPointer_ID(ctx context.Context, field graphql.CollectedField, obj *EmbeddedPointerModel) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "EmbeddedPointer", Field: field, Args: nil, @@ -3169,14 +3167,14 @@ func (ec *executionContext) _EmbeddedPointer_ID(ctx context.Context, field graph Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.ID, nil @@ -3186,12 +3184,12 @@ func (ec *executionContext) _EmbeddedPointer_ID(ctx context.Context, field graph return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalOString2string(ctx, field.Selections, res) } func (ec *executionContext) _EmbeddedPointer_Title(ctx context.Context, field graphql.CollectedField, obj *EmbeddedPointerModel) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "EmbeddedPointer", Field: field, Args: nil, @@ -3199,14 +3197,14 @@ func (ec *executionContext) _EmbeddedPointer_Title(ctx context.Context, field gr Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Title, nil @@ -3216,12 +3214,12 @@ func (ec *executionContext) _EmbeddedPointer_Title(ctx context.Context, field gr return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalOString2string(ctx, field.Selections, res) } func (ec *executionContext) _Error_id(ctx context.Context, field graphql.CollectedField, obj *Error) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Error", Field: field, Args: nil, @@ -3229,32 +3227,32 @@ func (ec *executionContext) _Error_id(ctx context.Context, field graphql.Collect Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.ID, nil }) if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalNID2string(ctx, field.Selections, res) } func (ec *executionContext) _Error_errorOnNonRequiredField(ctx context.Context, field graphql.CollectedField, obj *Error) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Error", Field: field, Args: nil, @@ -3262,14 +3260,14 @@ func (ec *executionContext) _Error_errorOnNonRequiredField(ctx context.Context, Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.ErrorOnNonRequiredField() @@ -3279,12 +3277,12 @@ func (ec *executionContext) _Error_errorOnNonRequiredField(ctx context.Context, return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalOString2string(ctx, field.Selections, res) } func (ec *executionContext) _Error_errorOnRequiredField(ctx context.Context, field graphql.CollectedField, obj *Error) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Error", Field: field, Args: nil, @@ -3292,32 +3290,32 @@ func (ec *executionContext) _Error_errorOnRequiredField(ctx context.Context, fie Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.ErrorOnRequiredField() }) if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalNString2string(ctx, field.Selections, res) } func (ec *executionContext) _Error_nilOnRequiredField(ctx context.Context, field graphql.CollectedField, obj *Error) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Error", Field: field, Args: nil, @@ -3325,32 +3323,32 @@ func (ec *executionContext) _Error_nilOnRequiredField(ctx context.Context, field Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.NilOnRequiredField(), nil }) if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(*string) - rctx.Result = res + fc.Result = res return ec.marshalNString2ᚖstring(ctx, field.Selections, res) } func (ec *executionContext) _Errors_a(ctx context.Context, field graphql.CollectedField, obj *Errors) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Errors", Field: field, Args: nil, @@ -3358,32 +3356,32 @@ func (ec *executionContext) _Errors_a(ctx context.Context, field graphql.Collect Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Errors().A(rctx, obj) }) if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(*Error) - rctx.Result = res + fc.Result = res return ec.marshalNError2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚐError(ctx, field.Selections, res) } func (ec *executionContext) _Errors_b(ctx context.Context, field graphql.CollectedField, obj *Errors) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Errors", Field: field, Args: nil, @@ -3391,32 +3389,32 @@ func (ec *executionContext) _Errors_b(ctx context.Context, field graphql.Collect Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Errors().B(rctx, obj) }) if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(*Error) - rctx.Result = res + fc.Result = res return ec.marshalNError2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚐError(ctx, field.Selections, res) } func (ec *executionContext) _Errors_c(ctx context.Context, field graphql.CollectedField, obj *Errors) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Errors", Field: field, Args: nil, @@ -3424,32 +3422,32 @@ func (ec *executionContext) _Errors_c(ctx context.Context, field graphql.Collect Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Errors().C(rctx, obj) }) if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(*Error) - rctx.Result = res + fc.Result = res return ec.marshalNError2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚐError(ctx, field.Selections, res) } func (ec *executionContext) _Errors_d(ctx context.Context, field graphql.CollectedField, obj *Errors) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Errors", Field: field, Args: nil, @@ -3457,32 +3455,32 @@ func (ec *executionContext) _Errors_d(ctx context.Context, field graphql.Collect Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Errors().D(rctx, obj) }) if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(*Error) - rctx.Result = res + fc.Result = res return ec.marshalNError2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚐError(ctx, field.Selections, res) } func (ec *executionContext) _Errors_e(ctx context.Context, field graphql.CollectedField, obj *Errors) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Errors", Field: field, Args: nil, @@ -3490,32 +3488,32 @@ func (ec *executionContext) _Errors_e(ctx context.Context, field graphql.Collect Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Errors().E(rctx, obj) }) if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(*Error) - rctx.Result = res + fc.Result = res return ec.marshalNError2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚐError(ctx, field.Selections, res) } func (ec *executionContext) _ForcedResolver_field(ctx context.Context, field graphql.CollectedField, obj *ForcedResolver) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "ForcedResolver", Field: field, Args: nil, @@ -3523,14 +3521,14 @@ func (ec *executionContext) _ForcedResolver_field(ctx context.Context, field gra Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.ForcedResolver().Field(rctx, obj) @@ -3540,12 +3538,12 @@ func (ec *executionContext) _ForcedResolver_field(ctx context.Context, field gra return graphql.Null } res := resTmp.(*Circle) - rctx.Result = res + fc.Result = res return ec.marshalOCircle2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚐCircle(ctx, field.Selections, res) } func (ec *executionContext) _InnerObject_id(ctx context.Context, field graphql.CollectedField, obj *InnerObject) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "InnerObject", Field: field, Args: nil, @@ -3553,32 +3551,32 @@ func (ec *executionContext) _InnerObject_id(ctx context.Context, field graphql.C Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.ID, nil }) if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(int) - rctx.Result = res + fc.Result = res return ec.marshalNInt2int(ctx, field.Selections, res) } func (ec *executionContext) _InvalidIdentifier_id(ctx context.Context, field graphql.CollectedField, obj *invalid_packagename.InvalidIdentifier) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "InvalidIdentifier", Field: field, Args: nil, @@ -3586,32 +3584,32 @@ func (ec *executionContext) _InvalidIdentifier_id(ctx context.Context, field gra Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.ID, nil }) if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(int) - rctx.Result = res + fc.Result = res return ec.marshalNInt2int(ctx, field.Selections, res) } func (ec *executionContext) _It_id(ctx context.Context, field graphql.CollectedField, obj *introspection1.It) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "It", Field: field, Args: nil, @@ -3619,32 +3617,32 @@ func (ec *executionContext) _It_id(ctx context.Context, field graphql.CollectedF Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.ID, nil }) if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalNID2string(ctx, field.Selections, res) } func (ec *executionContext) _LoopA_b(ctx context.Context, field graphql.CollectedField, obj *LoopA) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "LoopA", Field: field, Args: nil, @@ -3652,32 +3650,32 @@ func (ec *executionContext) _LoopA_b(ctx context.Context, field graphql.Collecte Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.B, nil }) if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(*LoopB) - rctx.Result = res + fc.Result = res return ec.marshalNLoopB2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚐLoopB(ctx, field.Selections, res) } func (ec *executionContext) _LoopB_a(ctx context.Context, field graphql.CollectedField, obj *LoopB) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "LoopB", Field: field, Args: nil, @@ -3685,32 +3683,32 @@ func (ec *executionContext) _LoopB_a(ctx context.Context, field graphql.Collecte Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.A, nil }) if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(*LoopA) - rctx.Result = res + fc.Result = res return ec.marshalNLoopA2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚐLoopA(ctx, field.Selections, res) } func (ec *executionContext) _Map_id(ctx context.Context, field graphql.CollectedField, obj *Map) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Map", Field: field, Args: nil, @@ -3718,32 +3716,32 @@ func (ec *executionContext) _Map_id(ctx context.Context, field graphql.Collected Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.ID, nil }) if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalNID2string(ctx, field.Selections, res) } func (ec *executionContext) _MapStringInterfaceType_a(ctx context.Context, field graphql.CollectedField, obj map[string]interface{}) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "MapStringInterfaceType", Field: field, Args: nil, @@ -3751,14 +3749,14 @@ func (ec *executionContext) _MapStringInterfaceType_a(ctx context.Context, field Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children switch v := obj["a"].(type) { @@ -3777,12 +3775,12 @@ func (ec *executionContext) _MapStringInterfaceType_a(ctx context.Context, field return graphql.Null } res := resTmp.(*string) - rctx.Result = res + fc.Result = res return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } func (ec *executionContext) _MapStringInterfaceType_b(ctx context.Context, field graphql.CollectedField, obj map[string]interface{}) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "MapStringInterfaceType", Field: field, Args: nil, @@ -3790,14 +3788,14 @@ func (ec *executionContext) _MapStringInterfaceType_b(ctx context.Context, field Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children switch v := obj["b"].(type) { @@ -3816,12 +3814,12 @@ func (ec *executionContext) _MapStringInterfaceType_b(ctx context.Context, field return graphql.Null } res := resTmp.(*int) - rctx.Result = res + fc.Result = res return ec.marshalOInt2ᚖint(ctx, field.Selections, res) } func (ec *executionContext) _ModelMethods_resolverField(ctx context.Context, field graphql.CollectedField, obj *ModelMethods) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "ModelMethods", Field: field, Args: nil, @@ -3829,32 +3827,32 @@ func (ec *executionContext) _ModelMethods_resolverField(ctx context.Context, fie Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.ModelMethods().ResolverField(rctx, obj) }) if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(bool) - rctx.Result = res + fc.Result = res return ec.marshalNBoolean2bool(ctx, field.Selections, res) } func (ec *executionContext) _ModelMethods_noContext(ctx context.Context, field graphql.CollectedField, obj *ModelMethods) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "ModelMethods", Field: field, Args: nil, @@ -3862,32 +3860,32 @@ func (ec *executionContext) _ModelMethods_noContext(ctx context.Context, field g Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.NoContext(), nil }) if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(bool) - rctx.Result = res + fc.Result = res return ec.marshalNBoolean2bool(ctx, field.Selections, res) } func (ec *executionContext) _ModelMethods_withContext(ctx context.Context, field graphql.CollectedField, obj *ModelMethods) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "ModelMethods", Field: field, Args: nil, @@ -3895,32 +3893,32 @@ func (ec *executionContext) _ModelMethods_withContext(ctx context.Context, field Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.WithContext(ctx), nil }) if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(bool) - rctx.Result = res + fc.Result = res return ec.marshalNBoolean2bool(ctx, field.Selections, res) } func (ec *executionContext) _ObjectDirectives_text(ctx context.Context, field graphql.CollectedField, obj *ObjectDirectives) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "ObjectDirectives", Field: field, Args: nil, @@ -3928,14 +3926,14 @@ func (ec *executionContext) _ObjectDirectives_text(ctx context.Context, field gr Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { directive0 := func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children @@ -3974,18 +3972,18 @@ func (ec *executionContext) _ObjectDirectives_text(ctx context.Context, field gr }) if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalNString2string(ctx, field.Selections, res) } func (ec *executionContext) _ObjectDirectives_nullableText(ctx context.Context, field graphql.CollectedField, obj *ObjectDirectives) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "ObjectDirectives", Field: field, Args: nil, @@ -3993,14 +3991,14 @@ func (ec *executionContext) _ObjectDirectives_nullableText(ctx context.Context, Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { directive0 := func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children @@ -4030,12 +4028,12 @@ func (ec *executionContext) _ObjectDirectives_nullableText(ctx context.Context, return graphql.Null } res := resTmp.(*string) - rctx.Result = res + fc.Result = res return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } func (ec *executionContext) _ObjectDirectivesWithCustomGoModel_nullableText(ctx context.Context, field graphql.CollectedField, obj *ObjectDirectivesWithCustomGoModel) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "ObjectDirectivesWithCustomGoModel", Field: field, Args: nil, @@ -4043,14 +4041,14 @@ func (ec *executionContext) _ObjectDirectivesWithCustomGoModel_nullableText(ctx Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { directive0 := func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children @@ -4080,12 +4078,12 @@ func (ec *executionContext) _ObjectDirectivesWithCustomGoModel_nullableText(ctx return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalOString2string(ctx, field.Selections, res) } func (ec *executionContext) _OuterObject_inner(ctx context.Context, field graphql.CollectedField, obj *OuterObject) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "OuterObject", Field: field, Args: nil, @@ -4093,32 +4091,32 @@ func (ec *executionContext) _OuterObject_inner(ctx context.Context, field graphq Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Inner, nil }) if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(*InnerObject) - rctx.Result = res + fc.Result = res return ec.marshalNInnerObject2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚐInnerObject(ctx, field.Selections, res) } func (ec *executionContext) _OverlappingFields_oneFoo(ctx context.Context, field graphql.CollectedField, obj *OverlappingFields) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "OverlappingFields", Field: field, Args: nil, @@ -4126,32 +4124,32 @@ func (ec *executionContext) _OverlappingFields_oneFoo(ctx context.Context, field Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Foo, nil }) if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(int) - rctx.Result = res + fc.Result = res return ec.marshalNInt2int(ctx, field.Selections, res) } func (ec *executionContext) _OverlappingFields_twoFoo(ctx context.Context, field graphql.CollectedField, obj *OverlappingFields) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "OverlappingFields", Field: field, Args: nil, @@ -4159,32 +4157,32 @@ func (ec *executionContext) _OverlappingFields_twoFoo(ctx context.Context, field Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Foo, nil }) if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(int) - rctx.Result = res + fc.Result = res return ec.marshalNInt2int(ctx, field.Selections, res) } func (ec *executionContext) _OverlappingFields_oldFoo(ctx context.Context, field graphql.CollectedField, obj *OverlappingFields) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "OverlappingFields", Field: field, Args: nil, @@ -4192,32 +4190,32 @@ func (ec *executionContext) _OverlappingFields_oldFoo(ctx context.Context, field Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.OverlappingFields().OldFoo(rctx, obj) }) if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(int) - rctx.Result = res + fc.Result = res return ec.marshalNInt2int(ctx, field.Selections, res) } func (ec *executionContext) _OverlappingFields_newFoo(ctx context.Context, field graphql.CollectedField, obj *OverlappingFields) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "OverlappingFields", Field: field, Args: nil, @@ -4225,32 +4223,32 @@ func (ec *executionContext) _OverlappingFields_newFoo(ctx context.Context, field Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.NewFoo, nil }) if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(int) - rctx.Result = res + fc.Result = res return ec.marshalNInt2int(ctx, field.Selections, res) } func (ec *executionContext) _OverlappingFields_new_foo(ctx context.Context, field graphql.CollectedField, obj *OverlappingFields) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "OverlappingFields", Field: field, Args: nil, @@ -4258,32 +4256,32 @@ func (ec *executionContext) _OverlappingFields_new_foo(ctx context.Context, fiel Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.NewFoo, nil }) if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(int) - rctx.Result = res + fc.Result = res return ec.marshalNInt2int(ctx, field.Selections, res) } func (ec *executionContext) _Panics_fieldScalarMarshal(ctx context.Context, field graphql.CollectedField, obj *Panics) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Panics", Field: field, Args: nil, @@ -4291,32 +4289,32 @@ func (ec *executionContext) _Panics_fieldScalarMarshal(ctx context.Context, fiel Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Panics().FieldScalarMarshal(rctx, obj) }) if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.([]MarshalPanic) - rctx.Result = res + fc.Result = res return ec.marshalNMarshalPanic2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚐMarshalPanic(ctx, field.Selections, res) } func (ec *executionContext) _Panics_fieldFuncMarshal(ctx context.Context, field graphql.CollectedField, obj *Panics) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Panics", Field: field, Args: nil, @@ -4324,39 +4322,39 @@ func (ec *executionContext) _Panics_fieldFuncMarshal(ctx context.Context, field Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) + ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field_Panics_fieldFuncMarshal_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } - rctx.Args = args - rctx.Stats.ArgumentsCompleted = graphql.Now() + fc.Args = args + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.FieldFuncMarshal(ctx, args["u"].([]MarshalPanic)), nil }) if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.([]MarshalPanic) - rctx.Result = res + fc.Result = res return ec.marshalNMarshalPanic2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚐMarshalPanic(ctx, field.Selections, res) } func (ec *executionContext) _Panics_argUnmarshal(ctx context.Context, field graphql.CollectedField, obj *Panics) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Panics", Field: field, Args: nil, @@ -4364,39 +4362,39 @@ func (ec *executionContext) _Panics_argUnmarshal(ctx context.Context, field grap Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) + ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field_Panics_argUnmarshal_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } - rctx.Args = args - rctx.Stats.ArgumentsCompleted = graphql.Now() + fc.Args = args + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Panics().ArgUnmarshal(rctx, obj, args["u"].([]MarshalPanic)) }) if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(bool) - rctx.Result = res + fc.Result = res return ec.marshalNBoolean2bool(ctx, field.Selections, res) } func (ec *executionContext) _Primitive_value(ctx context.Context, field graphql.CollectedField, obj *Primitive) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Primitive", Field: field, Args: nil, @@ -4404,32 +4402,32 @@ func (ec *executionContext) _Primitive_value(ctx context.Context, field graphql. Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Primitive().Value(rctx, obj) }) if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(int) - rctx.Result = res + fc.Result = res return ec.marshalNInt2int(ctx, field.Selections, res) } func (ec *executionContext) _Primitive_squared(ctx context.Context, field graphql.CollectedField, obj *Primitive) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Primitive", Field: field, Args: nil, @@ -4437,32 +4435,32 @@ func (ec *executionContext) _Primitive_squared(ctx context.Context, field graphq Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Squared(), nil }) if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(int) - rctx.Result = res + fc.Result = res return ec.marshalNInt2int(ctx, field.Selections, res) } func (ec *executionContext) _PrimitiveString_value(ctx context.Context, field graphql.CollectedField, obj *PrimitiveString) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "PrimitiveString", Field: field, Args: nil, @@ -4470,32 +4468,32 @@ func (ec *executionContext) _PrimitiveString_value(ctx context.Context, field gr Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.PrimitiveString().Value(rctx, obj) }) if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalNString2string(ctx, field.Selections, res) } func (ec *executionContext) _PrimitiveString_doubled(ctx context.Context, field graphql.CollectedField, obj *PrimitiveString) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "PrimitiveString", Field: field, Args: nil, @@ -4503,32 +4501,32 @@ func (ec *executionContext) _PrimitiveString_doubled(ctx context.Context, field Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Doubled(), nil }) if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalNString2string(ctx, field.Selections, res) } func (ec *executionContext) _PrimitiveString_len(ctx context.Context, field graphql.CollectedField, obj *PrimitiveString) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "PrimitiveString", Field: field, Args: nil, @@ -4536,32 +4534,32 @@ func (ec *executionContext) _PrimitiveString_len(ctx context.Context, field grap Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.PrimitiveString().Len(rctx, obj) }) if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(int) - rctx.Result = res + fc.Result = res return ec.marshalNInt2int(ctx, field.Selections, res) } func (ec *executionContext) _Query_invalidIdentifier(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Query", Field: field, Args: nil, @@ -4569,14 +4567,14 @@ func (ec *executionContext) _Query_invalidIdentifier(ctx context.Context, field Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().InvalidIdentifier(rctx) @@ -4586,12 +4584,12 @@ func (ec *executionContext) _Query_invalidIdentifier(ctx context.Context, field return graphql.Null } res := resTmp.(*invalid_packagename.InvalidIdentifier) - rctx.Result = res + fc.Result = res return ec.marshalOInvalidIdentifier2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋinvalidᚑpackagenameᚐInvalidIdentifier(ctx, field.Selections, res) } func (ec *executionContext) _Query_collision(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Query", Field: field, Args: nil, @@ -4599,14 +4597,14 @@ func (ec *executionContext) _Query_collision(ctx context.Context, field graphql. Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().Collision(rctx) @@ -4616,12 +4614,12 @@ func (ec *executionContext) _Query_collision(ctx context.Context, field graphql. return graphql.Null } res := resTmp.(*introspection1.It) - rctx.Result = res + fc.Result = res return ec.marshalOIt2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋintrospectionᚐIt(ctx, field.Selections, res) } func (ec *executionContext) _Query_mapInput(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Query", Field: field, Args: nil, @@ -4629,21 +4627,21 @@ func (ec *executionContext) _Query_mapInput(ctx context.Context, field graphql.C Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) + ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field_Query_mapInput_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } - rctx.Args = args - rctx.Stats.ArgumentsCompleted = graphql.Now() + fc.Args = args + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().MapInput(rctx, args["input"].(map[string]interface{})) @@ -4653,12 +4651,12 @@ func (ec *executionContext) _Query_mapInput(ctx context.Context, field graphql.C return graphql.Null } res := resTmp.(*bool) - rctx.Result = res + fc.Result = res return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) } func (ec *executionContext) _Query_recursive(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Query", Field: field, Args: nil, @@ -4666,21 +4664,21 @@ func (ec *executionContext) _Query_recursive(ctx context.Context, field graphql. Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) + ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field_Query_recursive_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } - rctx.Args = args - rctx.Stats.ArgumentsCompleted = graphql.Now() + fc.Args = args + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().Recursive(rctx, args["input"].(*RecursiveInputSlice)) @@ -4690,12 +4688,12 @@ func (ec *executionContext) _Query_recursive(ctx context.Context, field graphql. return graphql.Null } res := resTmp.(*bool) - rctx.Result = res + fc.Result = res return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) } func (ec *executionContext) _Query_nestedInputs(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Query", Field: field, Args: nil, @@ -4703,21 +4701,21 @@ func (ec *executionContext) _Query_nestedInputs(ctx context.Context, field graph Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) + ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field_Query_nestedInputs_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } - rctx.Args = args - rctx.Stats.ArgumentsCompleted = graphql.Now() + fc.Args = args + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().NestedInputs(rctx, args["input"].([][]*OuterInput)) @@ -4727,12 +4725,12 @@ func (ec *executionContext) _Query_nestedInputs(ctx context.Context, field graph return graphql.Null } res := resTmp.(*bool) - rctx.Result = res + fc.Result = res return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) } func (ec *executionContext) _Query_nestedOutputs(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Query", Field: field, Args: nil, @@ -4740,14 +4738,14 @@ func (ec *executionContext) _Query_nestedOutputs(ctx context.Context, field grap Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().NestedOutputs(rctx) @@ -4757,12 +4755,12 @@ func (ec *executionContext) _Query_nestedOutputs(ctx context.Context, field grap return graphql.Null } res := resTmp.([][]*OuterObject) - rctx.Result = res + fc.Result = res return ec.marshalOOuterObject2ᚕᚕᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚐOuterObject(ctx, field.Selections, res) } func (ec *executionContext) _Query_modelMethods(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Query", Field: field, Args: nil, @@ -4770,14 +4768,14 @@ func (ec *executionContext) _Query_modelMethods(ctx context.Context, field graph Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().ModelMethods(rctx) @@ -4787,12 +4785,12 @@ func (ec *executionContext) _Query_modelMethods(ctx context.Context, field graph return graphql.Null } res := resTmp.(*ModelMethods) - rctx.Result = res + fc.Result = res return ec.marshalOModelMethods2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚐModelMethods(ctx, field.Selections, res) } func (ec *executionContext) _Query_user(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Query", Field: field, Args: nil, @@ -4800,39 +4798,39 @@ func (ec *executionContext) _Query_user(ctx context.Context, field graphql.Colle Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) + ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field_Query_user_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } - rctx.Args = args - rctx.Stats.ArgumentsCompleted = graphql.Now() + fc.Args = args + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().User(rctx, args["id"].(int)) }) if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(*User) - rctx.Result = res + fc.Result = res return ec.marshalNUser2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚐUser(ctx, field.Selections, res) } func (ec *executionContext) _Query_nullableArg(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Query", Field: field, Args: nil, @@ -4840,21 +4838,21 @@ func (ec *executionContext) _Query_nullableArg(ctx context.Context, field graphq Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) + ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field_Query_nullableArg_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } - rctx.Args = args - rctx.Stats.ArgumentsCompleted = graphql.Now() + fc.Args = args + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().NullableArg(rctx, args["arg"].(*int)) @@ -4864,12 +4862,12 @@ func (ec *executionContext) _Query_nullableArg(ctx context.Context, field graphq return graphql.Null } res := resTmp.(*string) - rctx.Result = res + fc.Result = res return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } func (ec *executionContext) _Query_inputSlice(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Query", Field: field, Args: nil, @@ -4877,39 +4875,39 @@ func (ec *executionContext) _Query_inputSlice(ctx context.Context, field graphql Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) + ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field_Query_inputSlice_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } - rctx.Args = args - rctx.Stats.ArgumentsCompleted = graphql.Now() + fc.Args = args + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().InputSlice(rctx, args["arg"].([]string)) }) if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(bool) - rctx.Result = res + fc.Result = res return ec.marshalNBoolean2bool(ctx, field.Selections, res) } func (ec *executionContext) _Query_shapeUnion(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Query", Field: field, Args: nil, @@ -4917,32 +4915,32 @@ func (ec *executionContext) _Query_shapeUnion(ctx context.Context, field graphql Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().ShapeUnion(rctx) }) if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(ShapeUnion) - rctx.Result = res + fc.Result = res return ec.marshalNShapeUnion2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚐShapeUnion(ctx, field.Selections, res) } func (ec *executionContext) _Query_autobind(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Query", Field: field, Args: nil, @@ -4950,14 +4948,14 @@ func (ec *executionContext) _Query_autobind(ctx context.Context, field graphql.C Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().Autobind(rctx) @@ -4967,12 +4965,12 @@ func (ec *executionContext) _Query_autobind(ctx context.Context, field graphql.C return graphql.Null } res := resTmp.(*Autobind) - rctx.Result = res + fc.Result = res return ec.marshalOAutobind2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚐAutobind(ctx, field.Selections, res) } func (ec *executionContext) _Query_deprecatedField(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Query", Field: field, Args: nil, @@ -4980,32 +4978,32 @@ func (ec *executionContext) _Query_deprecatedField(ctx context.Context, field gr Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().DeprecatedField(rctx) }) if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalNString2string(ctx, field.Selections, res) } func (ec *executionContext) _Query_overlapping(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Query", Field: field, Args: nil, @@ -5013,14 +5011,14 @@ func (ec *executionContext) _Query_overlapping(ctx context.Context, field graphq Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().Overlapping(rctx) @@ -5030,12 +5028,12 @@ func (ec *executionContext) _Query_overlapping(ctx context.Context, field graphq return graphql.Null } res := resTmp.(*OverlappingFields) - rctx.Result = res + fc.Result = res return ec.marshalOOverlappingFields2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚐOverlappingFields(ctx, field.Selections, res) } func (ec *executionContext) _Query_directiveArg(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Query", Field: field, Args: nil, @@ -5043,21 +5041,21 @@ func (ec *executionContext) _Query_directiveArg(ctx context.Context, field graph Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) + ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field_Query_directiveArg_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } - rctx.Args = args - rctx.Stats.ArgumentsCompleted = graphql.Now() + fc.Args = args + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().DirectiveArg(rctx, args["arg"].(string)) @@ -5067,12 +5065,12 @@ func (ec *executionContext) _Query_directiveArg(ctx context.Context, field graph return graphql.Null } res := resTmp.(*string) - rctx.Result = res + fc.Result = res return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } func (ec *executionContext) _Query_directiveNullableArg(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Query", Field: field, Args: nil, @@ -5080,21 +5078,21 @@ func (ec *executionContext) _Query_directiveNullableArg(ctx context.Context, fie Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) + ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field_Query_directiveNullableArg_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } - rctx.Args = args - rctx.Stats.ArgumentsCompleted = graphql.Now() + fc.Args = args + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().DirectiveNullableArg(rctx, args["arg"].(*int), args["arg2"].(*int), args["arg3"].(*string)) @@ -5104,12 +5102,12 @@ func (ec *executionContext) _Query_directiveNullableArg(ctx context.Context, fie return graphql.Null } res := resTmp.(*string) - rctx.Result = res + fc.Result = res return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } func (ec *executionContext) _Query_directiveInputNullable(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Query", Field: field, Args: nil, @@ -5117,21 +5115,21 @@ func (ec *executionContext) _Query_directiveInputNullable(ctx context.Context, f Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) + ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field_Query_directiveInputNullable_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } - rctx.Args = args - rctx.Stats.ArgumentsCompleted = graphql.Now() + fc.Args = args + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().DirectiveInputNullable(rctx, args["arg"].(*InputDirectives)) @@ -5141,12 +5139,12 @@ func (ec *executionContext) _Query_directiveInputNullable(ctx context.Context, f return graphql.Null } res := resTmp.(*string) - rctx.Result = res + fc.Result = res return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } func (ec *executionContext) _Query_directiveInput(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Query", Field: field, Args: nil, @@ -5154,21 +5152,21 @@ func (ec *executionContext) _Query_directiveInput(ctx context.Context, field gra Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) + ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field_Query_directiveInput_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } - rctx.Args = args - rctx.Stats.ArgumentsCompleted = graphql.Now() + fc.Args = args + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().DirectiveInput(rctx, args["arg"].(InputDirectives)) @@ -5178,12 +5176,12 @@ func (ec *executionContext) _Query_directiveInput(ctx context.Context, field gra return graphql.Null } res := resTmp.(*string) - rctx.Result = res + fc.Result = res return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } func (ec *executionContext) _Query_directiveInputType(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Query", Field: field, Args: nil, @@ -5191,21 +5189,21 @@ func (ec *executionContext) _Query_directiveInputType(ctx context.Context, field Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) + ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field_Query_directiveInputType_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } - rctx.Args = args - rctx.Stats.ArgumentsCompleted = graphql.Now() + fc.Args = args + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().DirectiveInputType(rctx, args["arg"].(InnerInput)) @@ -5215,12 +5213,12 @@ func (ec *executionContext) _Query_directiveInputType(ctx context.Context, field return graphql.Null } res := resTmp.(*string) - rctx.Result = res + fc.Result = res return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } func (ec *executionContext) _Query_directiveObject(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Query", Field: field, Args: nil, @@ -5228,14 +5226,14 @@ func (ec *executionContext) _Query_directiveObject(ctx context.Context, field gr Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().DirectiveObject(rctx) @@ -5245,12 +5243,12 @@ func (ec *executionContext) _Query_directiveObject(ctx context.Context, field gr return graphql.Null } res := resTmp.(*ObjectDirectives) - rctx.Result = res + fc.Result = res return ec.marshalOObjectDirectives2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚐObjectDirectives(ctx, field.Selections, res) } func (ec *executionContext) _Query_directiveObjectWithCustomGoModel(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Query", Field: field, Args: nil, @@ -5258,14 +5256,14 @@ func (ec *executionContext) _Query_directiveObjectWithCustomGoModel(ctx context. Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().DirectiveObjectWithCustomGoModel(rctx) @@ -5275,12 +5273,12 @@ func (ec *executionContext) _Query_directiveObjectWithCustomGoModel(ctx context. return graphql.Null } res := resTmp.(*ObjectDirectivesWithCustomGoModel) - rctx.Result = res + fc.Result = res return ec.marshalOObjectDirectivesWithCustomGoModel2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚐObjectDirectivesWithCustomGoModel(ctx, field.Selections, res) } func (ec *executionContext) _Query_directiveFieldDef(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Query", Field: field, Args: nil, @@ -5288,21 +5286,21 @@ func (ec *executionContext) _Query_directiveFieldDef(ctx context.Context, field Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) + ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field_Query_directiveFieldDef_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } - rctx.Args = args - rctx.Stats.ArgumentsCompleted = graphql.Now() + fc.Args = args + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { directive0 := func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children @@ -5337,18 +5335,18 @@ func (ec *executionContext) _Query_directiveFieldDef(ctx context.Context, field }) if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalNString2string(ctx, field.Selections, res) } func (ec *executionContext) _Query_directiveField(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Query", Field: field, Args: nil, @@ -5356,14 +5354,14 @@ func (ec *executionContext) _Query_directiveField(ctx context.Context, field gra Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().DirectiveField(rctx) @@ -5373,12 +5371,12 @@ func (ec *executionContext) _Query_directiveField(ctx context.Context, field gra return graphql.Null } res := resTmp.(*string) - rctx.Result = res + fc.Result = res return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } func (ec *executionContext) _Query_directiveDouble(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Query", Field: field, Args: nil, @@ -5386,14 +5384,14 @@ func (ec *executionContext) _Query_directiveDouble(ctx context.Context, field gr Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { directive0 := func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children @@ -5429,12 +5427,12 @@ func (ec *executionContext) _Query_directiveDouble(ctx context.Context, field gr return graphql.Null } res := resTmp.(*string) - rctx.Result = res + fc.Result = res return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } func (ec *executionContext) _Query_directiveUnimplemented(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Query", Field: field, Args: nil, @@ -5442,14 +5440,14 @@ func (ec *executionContext) _Query_directiveUnimplemented(ctx context.Context, f Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { directive0 := func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children @@ -5479,12 +5477,12 @@ func (ec *executionContext) _Query_directiveUnimplemented(ctx context.Context, f return graphql.Null } res := resTmp.(*string) - rctx.Result = res + fc.Result = res return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } func (ec *executionContext) _Query_shapes(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Query", Field: field, Args: nil, @@ -5492,14 +5490,14 @@ func (ec *executionContext) _Query_shapes(ctx context.Context, field graphql.Col Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().Shapes(rctx) @@ -5509,12 +5507,12 @@ func (ec *executionContext) _Query_shapes(ctx context.Context, field graphql.Col return graphql.Null } res := resTmp.([]Shape) - rctx.Result = res + fc.Result = res return ec.marshalOShape2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚐShape(ctx, field.Selections, res) } func (ec *executionContext) _Query_noShape(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Query", Field: field, Args: nil, @@ -5522,14 +5520,14 @@ func (ec *executionContext) _Query_noShape(ctx context.Context, field graphql.Co Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { directive0 := func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children @@ -5559,12 +5557,12 @@ func (ec *executionContext) _Query_noShape(ctx context.Context, field graphql.Co return graphql.Null } res := resTmp.(Shape) - rctx.Result = res + fc.Result = res return ec.marshalOShape2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚐShape(ctx, field.Selections, res) } func (ec *executionContext) _Query_mapStringInterface(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Query", Field: field, Args: nil, @@ -5572,21 +5570,21 @@ func (ec *executionContext) _Query_mapStringInterface(ctx context.Context, field Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) + ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field_Query_mapStringInterface_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } - rctx.Args = args - rctx.Stats.ArgumentsCompleted = graphql.Now() + fc.Args = args + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().MapStringInterface(rctx, args["in"].(map[string]interface{})) @@ -5596,12 +5594,12 @@ func (ec *executionContext) _Query_mapStringInterface(ctx context.Context, field return graphql.Null } res := resTmp.(map[string]interface{}) - rctx.Result = res + fc.Result = res return ec.marshalOMapStringInterfaceType2map(ctx, field.Selections, res) } func (ec *executionContext) _Query_mapNestedStringInterface(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Query", Field: field, Args: nil, @@ -5609,21 +5607,21 @@ func (ec *executionContext) _Query_mapNestedStringInterface(ctx context.Context, Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) + ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field_Query_mapNestedStringInterface_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } - rctx.Args = args - rctx.Stats.ArgumentsCompleted = graphql.Now() + fc.Args = args + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().MapNestedStringInterface(rctx, args["in"].(*NestedMapInput)) @@ -5633,12 +5631,12 @@ func (ec *executionContext) _Query_mapNestedStringInterface(ctx context.Context, return graphql.Null } res := resTmp.(map[string]interface{}) - rctx.Result = res + fc.Result = res return ec.marshalOMapStringInterfaceType2map(ctx, field.Selections, res) } func (ec *executionContext) _Query_errorBubble(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Query", Field: field, Args: nil, @@ -5646,14 +5644,14 @@ func (ec *executionContext) _Query_errorBubble(ctx context.Context, field graphq Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().ErrorBubble(rctx) @@ -5663,12 +5661,12 @@ func (ec *executionContext) _Query_errorBubble(ctx context.Context, field graphq return graphql.Null } res := resTmp.(*Error) - rctx.Result = res + fc.Result = res return ec.marshalOError2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚐError(ctx, field.Selections, res) } func (ec *executionContext) _Query_errors(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Query", Field: field, Args: nil, @@ -5676,14 +5674,14 @@ func (ec *executionContext) _Query_errors(ctx context.Context, field graphql.Col Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().Errors(rctx) @@ -5693,12 +5691,12 @@ func (ec *executionContext) _Query_errors(ctx context.Context, field graphql.Col return graphql.Null } res := resTmp.(*Errors) - rctx.Result = res + fc.Result = res return ec.marshalOErrors2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚐErrors(ctx, field.Selections, res) } func (ec *executionContext) _Query_valid(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Query", Field: field, Args: nil, @@ -5706,32 +5704,32 @@ func (ec *executionContext) _Query_valid(ctx context.Context, field graphql.Coll Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().Valid(rctx) }) if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalNString2string(ctx, field.Selections, res) } func (ec *executionContext) _Query_panics(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Query", Field: field, Args: nil, @@ -5739,14 +5737,14 @@ func (ec *executionContext) _Query_panics(ctx context.Context, field graphql.Col Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().Panics(rctx) @@ -5756,12 +5754,12 @@ func (ec *executionContext) _Query_panics(ctx context.Context, field graphql.Col return graphql.Null } res := resTmp.(*Panics) - rctx.Result = res + fc.Result = res return ec.marshalOPanics2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚐPanics(ctx, field.Selections, res) } func (ec *executionContext) _Query_primitiveObject(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Query", Field: field, Args: nil, @@ -5769,32 +5767,32 @@ func (ec *executionContext) _Query_primitiveObject(ctx context.Context, field gr Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().PrimitiveObject(rctx) }) if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.([]Primitive) - rctx.Result = res + fc.Result = res return ec.marshalNPrimitive2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚐPrimitive(ctx, field.Selections, res) } func (ec *executionContext) _Query_primitiveStringObject(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Query", Field: field, Args: nil, @@ -5802,32 +5800,32 @@ func (ec *executionContext) _Query_primitiveStringObject(ctx context.Context, fi Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().PrimitiveStringObject(rctx) }) if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.([]PrimitiveString) - rctx.Result = res + fc.Result = res return ec.marshalNPrimitiveString2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚐPrimitiveString(ctx, field.Selections, res) } func (ec *executionContext) _Query_defaultScalar(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Query", Field: field, Args: nil, @@ -5835,39 +5833,39 @@ func (ec *executionContext) _Query_defaultScalar(ctx context.Context, field grap Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) + ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field_Query_defaultScalar_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } - rctx.Args = args - rctx.Stats.ArgumentsCompleted = graphql.Now() + fc.Args = args + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().DefaultScalar(rctx, args["arg"].(string)) }) if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalNDefaultScalarImplementation2string(ctx, field.Selections, res) } func (ec *executionContext) _Query_slices(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Query", Field: field, Args: nil, @@ -5875,14 +5873,14 @@ func (ec *executionContext) _Query_slices(ctx context.Context, field graphql.Col Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().Slices(rctx) @@ -5892,12 +5890,12 @@ func (ec *executionContext) _Query_slices(ctx context.Context, field graphql.Col return graphql.Null } res := resTmp.(*Slices) - rctx.Result = res + fc.Result = res return ec.marshalOSlices2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚐSlices(ctx, field.Selections, res) } func (ec *executionContext) _Query_scalarSlice(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Query", Field: field, Args: nil, @@ -5905,32 +5903,32 @@ func (ec *executionContext) _Query_scalarSlice(ctx context.Context, field graphq Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().ScalarSlice(rctx) }) if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.([]byte) - rctx.Result = res + fc.Result = res return ec.marshalNBytes2ᚕbyte(ctx, field.Selections, res) } func (ec *executionContext) _Query_fallback(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Query", Field: field, Args: nil, @@ -5938,39 +5936,39 @@ func (ec *executionContext) _Query_fallback(ctx context.Context, field graphql.C Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) + ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field_Query_fallback_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } - rctx.Args = args - rctx.Stats.ArgumentsCompleted = graphql.Now() + fc.Args = args + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().Fallback(rctx, args["arg"].(FallbackToStringEncoding)) }) if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(FallbackToStringEncoding) - rctx.Result = res + fc.Result = res return ec.marshalNFallbackToStringEncoding2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚐFallbackToStringEncoding(ctx, field.Selections, res) } func (ec *executionContext) _Query_optionalUnion(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Query", Field: field, Args: nil, @@ -5978,14 +5976,14 @@ func (ec *executionContext) _Query_optionalUnion(ctx context.Context, field grap Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().OptionalUnion(rctx) @@ -5995,12 +5993,12 @@ func (ec *executionContext) _Query_optionalUnion(ctx context.Context, field grap return graphql.Null } res := resTmp.(TestUnion) - rctx.Result = res + fc.Result = res return ec.marshalOTestUnion2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚐTestUnion(ctx, field.Selections, res) } func (ec *executionContext) _Query_validType(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Query", Field: field, Args: nil, @@ -6008,14 +6006,14 @@ func (ec *executionContext) _Query_validType(ctx context.Context, field graphql. Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().ValidType(rctx) @@ -6025,12 +6023,12 @@ func (ec *executionContext) _Query_validType(ctx context.Context, field graphql. return graphql.Null } res := resTmp.(*ValidType) - rctx.Result = res + fc.Result = res return ec.marshalOValidType2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚐValidType(ctx, field.Selections, res) } func (ec *executionContext) _Query_wrappedStruct(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Query", Field: field, Args: nil, @@ -6038,32 +6036,32 @@ func (ec *executionContext) _Query_wrappedStruct(ctx context.Context, field grap Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().WrappedStruct(rctx) }) if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(*WrappedStruct) - rctx.Result = res + fc.Result = res return ec.marshalNWrappedStruct2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚐWrappedStruct(ctx, field.Selections, res) } func (ec *executionContext) _Query_wrappedScalar(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Query", Field: field, Args: nil, @@ -6071,32 +6069,32 @@ func (ec *executionContext) _Query_wrappedScalar(ctx context.Context, field grap Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().WrappedScalar(rctx) }) if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(WrappedScalar) - rctx.Result = res + fc.Result = res return ec.marshalNWrappedScalar2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚐWrappedScalar(ctx, field.Selections, res) } func (ec *executionContext) _Query___type(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Query", Field: field, Args: nil, @@ -6104,21 +6102,21 @@ func (ec *executionContext) _Query___type(ctx context.Context, field graphql.Col Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) + ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field_Query___type_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } - rctx.Args = args - rctx.Stats.ArgumentsCompleted = graphql.Now() + fc.Args = args + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.introspectType(args["name"].(string)) @@ -6128,12 +6126,12 @@ func (ec *executionContext) _Query___type(ctx context.Context, field graphql.Col return graphql.Null } res := resTmp.(*introspection.Type) - rctx.Result = res + fc.Result = res return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Query", Field: field, Args: nil, @@ -6141,14 +6139,14 @@ func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.C Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.introspectSchema() @@ -6158,12 +6156,12 @@ func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.C return graphql.Null } res := resTmp.(*introspection.Schema) - rctx.Result = res + fc.Result = res return ec.marshalO__Schema2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐSchema(ctx, field.Selections, res) } func (ec *executionContext) _Rectangle_length(ctx context.Context, field graphql.CollectedField, obj *Rectangle) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Rectangle", Field: field, Args: nil, @@ -6171,14 +6169,14 @@ func (ec *executionContext) _Rectangle_length(ctx context.Context, field graphql Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Length, nil @@ -6188,12 +6186,12 @@ func (ec *executionContext) _Rectangle_length(ctx context.Context, field graphql return graphql.Null } res := resTmp.(float64) - rctx.Result = res + fc.Result = res return ec.marshalOFloat2float64(ctx, field.Selections, res) } func (ec *executionContext) _Rectangle_width(ctx context.Context, field graphql.CollectedField, obj *Rectangle) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Rectangle", Field: field, Args: nil, @@ -6201,14 +6199,14 @@ func (ec *executionContext) _Rectangle_width(ctx context.Context, field graphql. Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Width, nil @@ -6218,12 +6216,12 @@ func (ec *executionContext) _Rectangle_width(ctx context.Context, field graphql. return graphql.Null } res := resTmp.(float64) - rctx.Result = res + fc.Result = res return ec.marshalOFloat2float64(ctx, field.Selections, res) } func (ec *executionContext) _Rectangle_area(ctx context.Context, field graphql.CollectedField, obj *Rectangle) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Rectangle", Field: field, Args: nil, @@ -6231,14 +6229,14 @@ func (ec *executionContext) _Rectangle_area(ctx context.Context, field graphql.C Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Area(), nil @@ -6248,12 +6246,12 @@ func (ec *executionContext) _Rectangle_area(ctx context.Context, field graphql.C return graphql.Null } res := resTmp.(float64) - rctx.Result = res + fc.Result = res return ec.marshalOFloat2float64(ctx, field.Selections, res) } func (ec *executionContext) _Slices_test1(ctx context.Context, field graphql.CollectedField, obj *Slices) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Slices", Field: field, Args: nil, @@ -6261,14 +6259,14 @@ func (ec *executionContext) _Slices_test1(ctx context.Context, field graphql.Col Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Test1, nil @@ -6278,12 +6276,12 @@ func (ec *executionContext) _Slices_test1(ctx context.Context, field graphql.Col return graphql.Null } res := resTmp.([]*string) - rctx.Result = res + fc.Result = res return ec.marshalOString2ᚕᚖstring(ctx, field.Selections, res) } func (ec *executionContext) _Slices_test2(ctx context.Context, field graphql.CollectedField, obj *Slices) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Slices", Field: field, Args: nil, @@ -6291,14 +6289,14 @@ func (ec *executionContext) _Slices_test2(ctx context.Context, field graphql.Col Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Test2, nil @@ -6308,12 +6306,12 @@ func (ec *executionContext) _Slices_test2(ctx context.Context, field graphql.Col return graphql.Null } res := resTmp.([]string) - rctx.Result = res + fc.Result = res return ec.marshalOString2ᚕstring(ctx, field.Selections, res) } func (ec *executionContext) _Slices_test3(ctx context.Context, field graphql.CollectedField, obj *Slices) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Slices", Field: field, Args: nil, @@ -6321,32 +6319,32 @@ func (ec *executionContext) _Slices_test3(ctx context.Context, field graphql.Col Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Test3, nil }) if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.([]*string) - rctx.Result = res + fc.Result = res return ec.marshalNString2ᚕᚖstring(ctx, field.Selections, res) } func (ec *executionContext) _Slices_test4(ctx context.Context, field graphql.CollectedField, obj *Slices) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Slices", Field: field, Args: nil, @@ -6354,32 +6352,32 @@ func (ec *executionContext) _Slices_test4(ctx context.Context, field graphql.Col Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Test4, nil }) if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.([]string) - rctx.Result = res + fc.Result = res return ec.marshalNString2ᚕstring(ctx, field.Selections, res) } func (ec *executionContext) _Subscription_updated(ctx context.Context, field graphql.CollectedField) (ret func() graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Subscription", Field: field, Args: nil, @@ -6387,21 +6385,21 @@ func (ec *executionContext) _Subscription_updated(ctx context.Context, field gra Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = nil } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Subscription().Updated(rctx) }) if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return nil @@ -6422,7 +6420,7 @@ func (ec *executionContext) _Subscription_updated(ctx context.Context, field gra } func (ec *executionContext) _Subscription_initPayload(ctx context.Context, field graphql.CollectedField) (ret func() graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Subscription", Field: field, Args: nil, @@ -6430,21 +6428,21 @@ func (ec *executionContext) _Subscription_initPayload(ctx context.Context, field Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = nil } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Subscription().InitPayload(rctx) }) if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return nil @@ -6465,7 +6463,7 @@ func (ec *executionContext) _Subscription_initPayload(ctx context.Context, field } func (ec *executionContext) _Subscription_directiveArg(ctx context.Context, field graphql.CollectedField) (ret func() graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Subscription", Field: field, Args: nil, @@ -6473,21 +6471,21 @@ func (ec *executionContext) _Subscription_directiveArg(ctx context.Context, fiel Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = nil } }() - ctx = graphql.WithResolverContext(ctx, rctx) + ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field_Subscription_directiveArg_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return nil } - rctx.Args = args - rctx.Stats.ArgumentsCompleted = graphql.Now() + fc.Args = args + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Subscription().DirectiveArg(rctx, args["arg"].(string)) @@ -6512,7 +6510,7 @@ func (ec *executionContext) _Subscription_directiveArg(ctx context.Context, fiel } func (ec *executionContext) _Subscription_directiveNullableArg(ctx context.Context, field graphql.CollectedField) (ret func() graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Subscription", Field: field, Args: nil, @@ -6520,21 +6518,21 @@ func (ec *executionContext) _Subscription_directiveNullableArg(ctx context.Conte Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = nil } }() - ctx = graphql.WithResolverContext(ctx, rctx) + ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field_Subscription_directiveNullableArg_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return nil } - rctx.Args = args - rctx.Stats.ArgumentsCompleted = graphql.Now() + fc.Args = args + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Subscription().DirectiveNullableArg(rctx, args["arg"].(*int), args["arg2"].(*int), args["arg3"].(*string)) @@ -6559,7 +6557,7 @@ func (ec *executionContext) _Subscription_directiveNullableArg(ctx context.Conte } func (ec *executionContext) _Subscription_directiveDouble(ctx context.Context, field graphql.CollectedField) (ret func() graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Subscription", Field: field, Args: nil, @@ -6567,14 +6565,14 @@ func (ec *executionContext) _Subscription_directiveDouble(ctx context.Context, f Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = nil } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { directive0 := func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children @@ -6625,7 +6623,7 @@ func (ec *executionContext) _Subscription_directiveDouble(ctx context.Context, f } func (ec *executionContext) _Subscription_directiveUnimplemented(ctx context.Context, field graphql.CollectedField) (ret func() graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Subscription", Field: field, Args: nil, @@ -6633,14 +6631,14 @@ func (ec *executionContext) _Subscription_directiveUnimplemented(ctx context.Con Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = nil } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { directive0 := func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children @@ -6685,7 +6683,7 @@ func (ec *executionContext) _Subscription_directiveUnimplemented(ctx context.Con } func (ec *executionContext) _User_id(ctx context.Context, field graphql.CollectedField, obj *User) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "User", Field: field, Args: nil, @@ -6693,32 +6691,32 @@ func (ec *executionContext) _User_id(ctx context.Context, field graphql.Collecte Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.ID, nil }) if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(int) - rctx.Result = res + fc.Result = res return ec.marshalNInt2int(ctx, field.Selections, res) } func (ec *executionContext) _User_friends(ctx context.Context, field graphql.CollectedField, obj *User) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "User", Field: field, Args: nil, @@ -6726,32 +6724,32 @@ func (ec *executionContext) _User_friends(ctx context.Context, field graphql.Col Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.User().Friends(rctx, obj) }) if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.([]*User) - rctx.Result = res + fc.Result = res return ec.marshalNUser2ᚕᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚐUser(ctx, field.Selections, res) } func (ec *executionContext) _User_created(ctx context.Context, field graphql.CollectedField, obj *User) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "User", Field: field, Args: nil, @@ -6759,32 +6757,32 @@ func (ec *executionContext) _User_created(ctx context.Context, field graphql.Col Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Created, nil }) if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(time.Time) - rctx.Result = res + fc.Result = res return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res) } func (ec *executionContext) _User_updated(ctx context.Context, field graphql.CollectedField, obj *User) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "User", Field: field, Args: nil, @@ -6792,14 +6790,14 @@ func (ec *executionContext) _User_updated(ctx context.Context, field graphql.Col Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Updated, nil @@ -6809,12 +6807,12 @@ func (ec *executionContext) _User_updated(ctx context.Context, field graphql.Col return graphql.Null } res := resTmp.(*time.Time) - rctx.Result = res + fc.Result = res return ec.marshalOTime2ᚖtimeᚐTime(ctx, field.Selections, res) } func (ec *executionContext) _ValidType_differentCase(ctx context.Context, field graphql.CollectedField, obj *ValidType) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "ValidType", Field: field, Args: nil, @@ -6822,32 +6820,32 @@ func (ec *executionContext) _ValidType_differentCase(ctx context.Context, field Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.DifferentCase, nil }) if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalNString2string(ctx, field.Selections, res) } func (ec *executionContext) _ValidType_different_case(ctx context.Context, field graphql.CollectedField, obj *ValidType) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "ValidType", Field: field, Args: nil, @@ -6855,32 +6853,32 @@ func (ec *executionContext) _ValidType_different_case(ctx context.Context, field Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.DifferentCaseOld, nil }) if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalNString2string(ctx, field.Selections, res) } func (ec *executionContext) _ValidType_validInputKeywords(ctx context.Context, field graphql.CollectedField, obj *ValidType) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "ValidType", Field: field, Args: nil, @@ -6888,39 +6886,39 @@ func (ec *executionContext) _ValidType_validInputKeywords(ctx context.Context, f Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) + ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field_ValidType_validInputKeywords_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } - rctx.Args = args - rctx.Stats.ArgumentsCompleted = graphql.Now() + fc.Args = args + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.ValidInputKeywords, nil }) if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(bool) - rctx.Result = res + fc.Result = res return ec.marshalNBoolean2bool(ctx, field.Selections, res) } func (ec *executionContext) _ValidType_validArgs(ctx context.Context, field graphql.CollectedField, obj *ValidType) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "ValidType", Field: field, Args: nil, @@ -6928,39 +6926,39 @@ func (ec *executionContext) _ValidType_validArgs(ctx context.Context, field grap Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) + ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field_ValidType_validArgs_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } - rctx.Args = args - rctx.Stats.ArgumentsCompleted = graphql.Now() + fc.Args = args + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.ValidArgs, nil }) if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(bool) - rctx.Result = res + fc.Result = res return ec.marshalNBoolean2bool(ctx, field.Selections, res) } func (ec *executionContext) _WrappedStruct_name(ctx context.Context, field graphql.CollectedField, obj *WrappedStruct) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "WrappedStruct", Field: field, Args: nil, @@ -6968,32 +6966,32 @@ func (ec *executionContext) _WrappedStruct_name(ctx context.Context, field graph Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Name, nil }) if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalNString2string(ctx, field.Selections, res) } func (ec *executionContext) _XXIt_id(ctx context.Context, field graphql.CollectedField, obj *XXIt) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "XXIt", Field: field, Args: nil, @@ -7001,32 +6999,32 @@ func (ec *executionContext) _XXIt_id(ctx context.Context, field graphql.Collecte Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.ID, nil }) if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalNID2string(ctx, field.Selections, res) } func (ec *executionContext) _XxIt_id(ctx context.Context, field graphql.CollectedField, obj *XxIt) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "XxIt", Field: field, Args: nil, @@ -7034,32 +7032,32 @@ func (ec *executionContext) _XxIt_id(ctx context.Context, field graphql.Collecte Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.ID, nil }) if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalNID2string(ctx, field.Selections, res) } func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Directive", Field: field, Args: nil, @@ -7067,32 +7065,32 @@ func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Name, nil }) if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalNString2string(ctx, field.Selections, res) } func (ec *executionContext) ___Directive_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Directive", Field: field, Args: nil, @@ -7100,14 +7098,14 @@ func (ec *executionContext) ___Directive_description(ctx context.Context, field Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Description, nil @@ -7117,12 +7115,12 @@ func (ec *executionContext) ___Directive_description(ctx context.Context, field return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalOString2string(ctx, field.Selections, res) } func (ec *executionContext) ___Directive_locations(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Directive", Field: field, Args: nil, @@ -7130,32 +7128,32 @@ func (ec *executionContext) ___Directive_locations(ctx context.Context, field gr Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Locations, nil }) if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.([]string) - rctx.Result = res + fc.Result = res return ec.marshalN__DirectiveLocation2ᚕstring(ctx, field.Selections, res) } func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Directive", Field: field, Args: nil, @@ -7163,32 +7161,32 @@ func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Args, nil }) if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.([]introspection.InputValue) - rctx.Result = res + fc.Result = res return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx, field.Selections, res) } func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__EnumValue", Field: field, Args: nil, @@ -7196,32 +7194,32 @@ func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Name, nil }) if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalNString2string(ctx, field.Selections, res) } func (ec *executionContext) ___EnumValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__EnumValue", Field: field, Args: nil, @@ -7229,14 +7227,14 @@ func (ec *executionContext) ___EnumValue_description(ctx context.Context, field Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Description, nil @@ -7246,12 +7244,12 @@ func (ec *executionContext) ___EnumValue_description(ctx context.Context, field return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalOString2string(ctx, field.Selections, res) } func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__EnumValue", Field: field, Args: nil, @@ -7259,32 +7257,32 @@ func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.IsDeprecated(), nil }) if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(bool) - rctx.Result = res + fc.Result = res return ec.marshalNBoolean2bool(ctx, field.Selections, res) } func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__EnumValue", Field: field, Args: nil, @@ -7292,14 +7290,14 @@ func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.DeprecationReason(), nil @@ -7309,12 +7307,12 @@ func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, return graphql.Null } res := resTmp.(*string) - rctx.Result = res + fc.Result = res return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Field", Field: field, Args: nil, @@ -7322,32 +7320,32 @@ func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.Col Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Name, nil }) if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalNString2string(ctx, field.Selections, res) } func (ec *executionContext) ___Field_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Field", Field: field, Args: nil, @@ -7355,14 +7353,14 @@ func (ec *executionContext) ___Field_description(ctx context.Context, field grap Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Description, nil @@ -7372,12 +7370,12 @@ func (ec *executionContext) ___Field_description(ctx context.Context, field grap return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalOString2string(ctx, field.Selections, res) } func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Field", Field: field, Args: nil, @@ -7385,32 +7383,32 @@ func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.Col Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Args, nil }) if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.([]introspection.InputValue) - rctx.Result = res + fc.Result = res return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx, field.Selections, res) } func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Field", Field: field, Args: nil, @@ -7418,32 +7416,32 @@ func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.Col Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Type, nil }) if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(*introspection.Type) - rctx.Result = res + fc.Result = res return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Field", Field: field, Args: nil, @@ -7451,32 +7449,32 @@ func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field gra Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.IsDeprecated(), nil }) if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(bool) - rctx.Result = res + fc.Result = res return ec.marshalNBoolean2bool(ctx, field.Selections, res) } func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Field", Field: field, Args: nil, @@ -7484,14 +7482,14 @@ func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, fiel Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.DeprecationReason(), nil @@ -7501,12 +7499,12 @@ func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, fiel return graphql.Null } res := resTmp.(*string) - rctx.Result = res + fc.Result = res return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__InputValue", Field: field, Args: nil, @@ -7514,32 +7512,32 @@ func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphq Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Name, nil }) if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalNString2string(ctx, field.Selections, res) } func (ec *executionContext) ___InputValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__InputValue", Field: field, Args: nil, @@ -7547,14 +7545,14 @@ func (ec *executionContext) ___InputValue_description(ctx context.Context, field Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Description, nil @@ -7564,12 +7562,12 @@ func (ec *executionContext) ___InputValue_description(ctx context.Context, field return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalOString2string(ctx, field.Selections, res) } func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__InputValue", Field: field, Args: nil, @@ -7577,32 +7575,32 @@ func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphq Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Type, nil }) if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(*introspection.Type) - rctx.Result = res + fc.Result = res return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__InputValue", Field: field, Args: nil, @@ -7610,14 +7608,14 @@ func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, fiel Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.DefaultValue, nil @@ -7627,12 +7625,12 @@ func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, fiel return graphql.Null } res := resTmp.(*string) - rctx.Result = res + fc.Result = res return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Schema", Field: field, Args: nil, @@ -7640,32 +7638,32 @@ func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.C Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Types(), nil }) if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.([]introspection.Type) - rctx.Result = res + fc.Result = res return ec.marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Schema", Field: field, Args: nil, @@ -7673,32 +7671,32 @@ func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graph Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.QueryType(), nil }) if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(*introspection.Type) - rctx.Result = res + fc.Result = res return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Schema", Field: field, Args: nil, @@ -7706,14 +7704,14 @@ func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field gr Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.MutationType(), nil @@ -7723,12 +7721,12 @@ func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field gr return graphql.Null } res := resTmp.(*introspection.Type) - rctx.Result = res + fc.Result = res return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Schema", Field: field, Args: nil, @@ -7736,14 +7734,14 @@ func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, fiel Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.SubscriptionType(), nil @@ -7753,12 +7751,12 @@ func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, fiel return graphql.Null } res := resTmp.(*introspection.Type) - rctx.Result = res + fc.Result = res return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) ___Schema_directives(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Schema", Field: field, Args: nil, @@ -7766,32 +7764,32 @@ func (ec *executionContext) ___Schema_directives(ctx context.Context, field grap Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Directives(), nil }) if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.([]introspection.Directive) - rctx.Result = res + fc.Result = res return ec.marshalN__Directive2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirective(ctx, field.Selections, res) } func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, @@ -7799,32 +7797,32 @@ func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.Coll Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Kind(), nil }) if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalN__TypeKind2string(ctx, field.Selections, res) } func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, @@ -7832,14 +7830,14 @@ func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.Coll Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Name(), nil @@ -7849,12 +7847,12 @@ func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.Coll return graphql.Null } res := resTmp.(*string) - rctx.Result = res + fc.Result = res return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } func (ec *executionContext) ___Type_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, @@ -7862,14 +7860,14 @@ func (ec *executionContext) ___Type_description(ctx context.Context, field graph Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Description(), nil @@ -7879,12 +7877,12 @@ func (ec *executionContext) ___Type_description(ctx context.Context, field graph return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalOString2string(ctx, field.Selections, res) } func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, @@ -7892,21 +7890,21 @@ func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.Co Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) + ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field___Type_fields_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } - rctx.Args = args - rctx.Stats.ArgumentsCompleted = graphql.Now() + fc.Args = args + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Fields(args["includeDeprecated"].(bool)), nil @@ -7916,12 +7914,12 @@ func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.Co return graphql.Null } res := resTmp.([]introspection.Field) - rctx.Result = res + fc.Result = res return ec.marshalO__Field2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐField(ctx, field.Selections, res) } func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, @@ -7929,14 +7927,14 @@ func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphq Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Interfaces(), nil @@ -7946,12 +7944,12 @@ func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphq return graphql.Null } res := resTmp.([]introspection.Type) - rctx.Result = res + fc.Result = res return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, @@ -7959,14 +7957,14 @@ func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field gra Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.PossibleTypes(), nil @@ -7976,12 +7974,12 @@ func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field gra return graphql.Null } res := resTmp.([]introspection.Type) - rctx.Result = res + fc.Result = res return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, @@ -7989,21 +7987,21 @@ func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphq Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) + ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field___Type_enumValues_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } - rctx.Args = args - rctx.Stats.ArgumentsCompleted = graphql.Now() + fc.Args = args + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.EnumValues(args["includeDeprecated"].(bool)), nil @@ -8013,12 +8011,12 @@ func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphq return graphql.Null } res := resTmp.([]introspection.EnumValue) - rctx.Result = res + fc.Result = res return ec.marshalO__EnumValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValue(ctx, field.Selections, res) } func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, @@ -8026,14 +8024,14 @@ func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graph Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.InputFields(), nil @@ -8043,12 +8041,12 @@ func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graph return graphql.Null } res := resTmp.([]introspection.InputValue) - rctx.Result = res + fc.Result = res return ec.marshalO__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx, field.Selections, res) } func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, @@ -8056,14 +8054,14 @@ func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.Co Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.OfType(), nil @@ -8073,12 +8071,12 @@ func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.Co return graphql.Null } res := resTmp.(*introspection.Type) - rctx.Result = res + fc.Result = res return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) _asdfIt_id(ctx context.Context, field graphql.CollectedField, obj *AsdfIt) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "asdfIt", Field: field, Args: nil, @@ -8086,32 +8084,32 @@ func (ec *executionContext) _asdfIt_id(ctx context.Context, field graphql.Collec Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.ID, nil }) if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalNID2string(ctx, field.Selections, res) } func (ec *executionContext) _iIt_id(ctx context.Context, field graphql.CollectedField, obj *IIt) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "iIt", Field: field, Args: nil, @@ -8119,27 +8117,27 @@ func (ec *executionContext) _iIt_id(ctx context.Context, field graphql.Collected Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.ID, nil }) if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalNID2string(ctx, field.Selections, res) } @@ -9588,8 +9586,9 @@ var queryImplementors = []string{"Query"} func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, queryImplementors) - ctx = graphql.WithResolverContext(ctx, &graphql.ResolverContext{ + ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{ Object: "Query", + Stats: graphql.FieldStats{Started: graphql.Now()}, }) out := graphql.NewFieldSet(fields) @@ -10193,8 +10192,9 @@ var subscriptionImplementors = []string{"Subscription"} func (ec *executionContext) _Subscription(ctx context.Context, sel ast.SelectionSet) func() graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, subscriptionImplementors) - ctx = graphql.WithResolverContext(ctx, &graphql.ResolverContext{ + ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{ Object: "Subscription", + Stats: graphql.FieldStats{Started: graphql.Now()}, }) if len(fields) != 1 { ec.Errorf(ctx, "must subscribe to exactly one stream") @@ -10696,7 +10696,7 @@ func (ec *executionContext) unmarshalNBoolean2bool(ctx context.Context, v interf func (ec *executionContext) marshalNBoolean2bool(ctx context.Context, sel ast.SelectionSet, v bool) graphql.Marshaler { res := graphql.MarshalBoolean(v) if res == graphql.Null { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } } @@ -10710,7 +10710,7 @@ func (ec *executionContext) unmarshalNBytes2ᚕbyte(ctx context.Context, v inter func (ec *executionContext) marshalNBytes2ᚕbyte(ctx context.Context, sel ast.SelectionSet, v []byte) graphql.Marshaler { res := MarshalBytes(v) if res == graphql.Null { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } } @@ -10724,7 +10724,7 @@ func (ec *executionContext) unmarshalNDefaultScalarImplementation2string(ctx con func (ec *executionContext) marshalNDefaultScalarImplementation2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { res := graphql.MarshalString(v) if res == graphql.Null { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } } @@ -10737,7 +10737,7 @@ func (ec *executionContext) marshalNError2githubᚗcomᚋ99designsᚋgqlgenᚋco func (ec *executionContext) marshalNError2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚐError(ctx context.Context, sel ast.SelectionSet, v *Error) graphql.Marshaler { if v == nil { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } return graphql.Null @@ -10753,7 +10753,7 @@ func (ec *executionContext) unmarshalNFallbackToStringEncoding2githubᚗcomᚋ99 func (ec *executionContext) marshalNFallbackToStringEncoding2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚐFallbackToStringEncoding(ctx context.Context, sel ast.SelectionSet, v FallbackToStringEncoding) graphql.Marshaler { res := graphql.MarshalString(string(v)) if res == graphql.Null { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } } @@ -10767,7 +10767,7 @@ func (ec *executionContext) unmarshalNID2int(ctx context.Context, v interface{}) func (ec *executionContext) marshalNID2int(ctx context.Context, sel ast.SelectionSet, v int) graphql.Marshaler { res := graphql.MarshalIntID(v) if res == graphql.Null { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } } @@ -10781,7 +10781,7 @@ func (ec *executionContext) unmarshalNID2string(ctx context.Context, v interface func (ec *executionContext) marshalNID2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { res := graphql.MarshalID(v) if res == graphql.Null { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } } @@ -10818,7 +10818,7 @@ func (ec *executionContext) marshalNInnerObject2githubᚗcomᚋ99designsᚋgqlge func (ec *executionContext) marshalNInnerObject2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚐInnerObject(ctx context.Context, sel ast.SelectionSet, v *InnerObject) graphql.Marshaler { if v == nil { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } return graphql.Null @@ -10837,7 +10837,7 @@ func (ec *executionContext) unmarshalNInt2int(ctx context.Context, v interface{} func (ec *executionContext) marshalNInt2int(ctx context.Context, sel ast.SelectionSet, v int) graphql.Marshaler { res := graphql.MarshalInt(v) if res == graphql.Null { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } } @@ -10851,7 +10851,7 @@ func (ec *executionContext) unmarshalNInt2int32(ctx context.Context, v interface func (ec *executionContext) marshalNInt2int32(ctx context.Context, sel ast.SelectionSet, v int32) graphql.Marshaler { res := graphql.MarshalInt32(v) if res == graphql.Null { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } } @@ -10865,7 +10865,7 @@ func (ec *executionContext) unmarshalNInt2int64(ctx context.Context, v interface func (ec *executionContext) marshalNInt2int64(ctx context.Context, sel ast.SelectionSet, v int64) graphql.Marshaler { res := graphql.MarshalInt64(v) if res == graphql.Null { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } } @@ -10878,7 +10878,7 @@ func (ec *executionContext) marshalNLoopA2githubᚗcomᚋ99designsᚋgqlgenᚋco func (ec *executionContext) marshalNLoopA2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚐLoopA(ctx context.Context, sel ast.SelectionSet, v *LoopA) graphql.Marshaler { if v == nil { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } return graphql.Null @@ -10892,7 +10892,7 @@ func (ec *executionContext) marshalNLoopB2githubᚗcomᚋ99designsᚋgqlgenᚋco func (ec *executionContext) marshalNLoopB2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚐLoopB(ctx context.Context, sel ast.SelectionSet, v *LoopB) graphql.Marshaler { if v == nil { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } return graphql.Null @@ -10951,11 +10951,12 @@ func (ec *executionContext) marshalNPrimitive2ᚕgithubᚗcomᚋ99designsᚋgqlg } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -10992,11 +10993,12 @@ func (ec *executionContext) marshalNPrimitiveString2ᚕgithubᚗcomᚋ99designs } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -11026,7 +11028,7 @@ func (ec *executionContext) unmarshalNRecursiveInputSlice2githubᚗcomᚋ99desig func (ec *executionContext) marshalNShapeUnion2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚐShapeUnion(ctx context.Context, sel ast.SelectionSet, v ShapeUnion) graphql.Marshaler { if v == nil { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } return graphql.Null @@ -11041,7 +11043,7 @@ func (ec *executionContext) unmarshalNString2string(ctx context.Context, v inter func (ec *executionContext) marshalNString2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { res := graphql.MarshalString(v) if res == graphql.Null { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } } @@ -11116,7 +11118,7 @@ func (ec *executionContext) unmarshalNString2ᚖstring(ctx context.Context, v in func (ec *executionContext) marshalNString2ᚖstring(ctx context.Context, sel ast.SelectionSet, v *string) graphql.Marshaler { if v == nil { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } return graphql.Null @@ -11131,7 +11133,7 @@ func (ec *executionContext) unmarshalNTime2timeᚐTime(ctx context.Context, v in func (ec *executionContext) marshalNTime2timeᚐTime(ctx context.Context, sel ast.SelectionSet, v time.Time) graphql.Marshaler { res := graphql.MarshalTime(v) if res == graphql.Null { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } } @@ -11145,7 +11147,7 @@ func (ec *executionContext) unmarshalNUUID2string(ctx context.Context, v interfa func (ec *executionContext) marshalNUUID2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { res := graphql.MarshalString(v) if res == graphql.Null { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } } @@ -11165,11 +11167,12 @@ func (ec *executionContext) marshalNUser2ᚕᚖgithubᚗcomᚋ99designsᚋgqlgen } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -11195,7 +11198,7 @@ func (ec *executionContext) marshalNUser2ᚕᚖgithubᚗcomᚋ99designsᚋgqlgen func (ec *executionContext) marshalNUser2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚐUser(ctx context.Context, sel ast.SelectionSet, v *User) graphql.Marshaler { if v == nil { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } return graphql.Null @@ -11211,7 +11214,7 @@ func (ec *executionContext) unmarshalNWrappedScalar2githubᚗcomᚋ99designsᚋg func (ec *executionContext) marshalNWrappedScalar2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚐWrappedScalar(ctx context.Context, sel ast.SelectionSet, v WrappedScalar) graphql.Marshaler { res := graphql.MarshalString(string(v)) if res == graphql.Null { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } } @@ -11224,7 +11227,7 @@ func (ec *executionContext) marshalNWrappedStruct2githubᚗcomᚋ99designsᚋgql func (ec *executionContext) marshalNWrappedStruct2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚐWrappedStruct(ctx context.Context, sel ast.SelectionSet, v *WrappedStruct) graphql.Marshaler { if v == nil { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } return graphql.Null @@ -11245,11 +11248,12 @@ func (ec *executionContext) marshalN__Directive2ᚕgithubᚗcomᚋ99designsᚋgq } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -11280,7 +11284,7 @@ func (ec *executionContext) unmarshalN__DirectiveLocation2string(ctx context.Con func (ec *executionContext) marshalN__DirectiveLocation2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { res := graphql.MarshalString(v) if res == graphql.Null { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } } @@ -11316,11 +11320,12 @@ func (ec *executionContext) marshalN__DirectiveLocation2ᚕstring(ctx context.Co } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -11365,11 +11370,12 @@ func (ec *executionContext) marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋg } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -11406,11 +11412,12 @@ func (ec *executionContext) marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgen } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -11436,7 +11443,7 @@ func (ec *executionContext) marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgen func (ec *executionContext) marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v *introspection.Type) graphql.Marshaler { if v == nil { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } return graphql.Null @@ -11451,7 +11458,7 @@ func (ec *executionContext) unmarshalN__TypeKind2string(ctx context.Context, v i func (ec *executionContext) marshalN__TypeKind2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { res := graphql.MarshalString(v) if res == graphql.Null { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } } @@ -11759,11 +11766,12 @@ func (ec *executionContext) marshalOOuterObject2ᚕᚕᚖgithubᚗcomᚋ99design } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -11799,11 +11807,12 @@ func (ec *executionContext) marshalOOuterObject2ᚕᚖgithubᚗcomᚋ99designs } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -11907,11 +11916,12 @@ func (ec *executionContext) marshalOShape2ᚕgithubᚗcomᚋ99designsᚋgqlgen } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -12121,11 +12131,12 @@ func (ec *executionContext) marshalO__EnumValue2ᚕgithubᚗcomᚋ99designsᚋgq } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -12161,11 +12172,12 @@ func (ec *executionContext) marshalO__Field2ᚕgithubᚗcomᚋ99designsᚋgqlgen } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -12201,11 +12213,12 @@ func (ec *executionContext) marshalO__InputValue2ᚕgithubᚗcomᚋ99designsᚋg } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -12256,11 +12269,12 @@ func (ec *executionContext) marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgen } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { diff --git a/codegen/testserver/middleware_test.go b/codegen/testserver/middleware_test.go index ebfd0b217b9..13d0ce84e42 100644 --- a/codegen/testserver/middleware_test.go +++ b/codegen/testserver/middleware_test.go @@ -38,7 +38,7 @@ func TestMiddleware(t *testing.T) { return next(context.WithValue(ctx, "path", append(path, 2))) }), handler.ResolverMiddleware(func(ctx context.Context, next graphql.Resolver) (res interface{}, err error) { - areMethods = append(areMethods, graphql.GetResolverContext(ctx).IsMethod) + areMethods = append(areMethods, graphql.GetFieldContext(ctx).IsMethod) return next(ctx) }), ) diff --git a/codegen/type.gotpl b/codegen/type.gotpl index 11425c30f2e..b0274fc16e0 100644 --- a/codegen/type.gotpl +++ b/codegen/type.gotpl @@ -50,7 +50,7 @@ {{- if $type.IsNilable }} if v == nil { {{- if $type.GQL.NonNull }} - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } {{- end }} @@ -75,11 +75,12 @@ for i := range v { {{- if not $type.IsScalar }} i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -113,7 +114,7 @@ {{- else if $type.GQL.NonNull }} res := {{ $type.Marshaler | call }}({{- if $type.CastType }}{{ $type.CastType | ref }}(v){{else}}v{{- end }}) if res == graphql.Null { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } } diff --git a/example/chat/generated.go b/example/chat/generated.go index 028127920e0..87928f53f1f 100644 --- a/example/chat/generated.go +++ b/example/chat/generated.go @@ -1,5 +1,3 @@ -// Code generated by github.com/99designs/gqlgen, DO NOT EDIT. - package chat import ( @@ -450,7 +448,7 @@ func (ec *executionContext) _subscriptionMiddleware(ctx context.Context, obj *as // region **************************** field.gotpl ***************************** func (ec *executionContext) _Chatroom_name(ctx context.Context, field graphql.CollectedField, obj *Chatroom) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Chatroom", Field: field, Args: nil, @@ -458,14 +456,14 @@ func (ec *executionContext) _Chatroom_name(ctx context.Context, field graphql.Co Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Name, nil @@ -475,18 +473,18 @@ func (ec *executionContext) _Chatroom_name(ctx context.Context, field graphql.Co return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalNString2string(ctx, field.Selections, res) } func (ec *executionContext) _Chatroom_messages(ctx context.Context, field graphql.CollectedField, obj *Chatroom) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Chatroom", Field: field, Args: nil, @@ -494,14 +492,14 @@ func (ec *executionContext) _Chatroom_messages(ctx context.Context, field graphq Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Messages, nil @@ -511,18 +509,18 @@ func (ec *executionContext) _Chatroom_messages(ctx context.Context, field graphq return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.([]Message) - rctx.Result = res + fc.Result = res return ec.marshalNMessage2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋchatᚐMessage(ctx, field.Selections, res) } func (ec *executionContext) _Message_id(ctx context.Context, field graphql.CollectedField, obj *Message) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Message", Field: field, Args: nil, @@ -530,14 +528,14 @@ func (ec *executionContext) _Message_id(ctx context.Context, field graphql.Colle Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.ID, nil @@ -547,18 +545,18 @@ func (ec *executionContext) _Message_id(ctx context.Context, field graphql.Colle return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalNID2string(ctx, field.Selections, res) } func (ec *executionContext) _Message_text(ctx context.Context, field graphql.CollectedField, obj *Message) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Message", Field: field, Args: nil, @@ -566,14 +564,14 @@ func (ec *executionContext) _Message_text(ctx context.Context, field graphql.Col Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Text, nil @@ -583,18 +581,18 @@ func (ec *executionContext) _Message_text(ctx context.Context, field graphql.Col return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalNString2string(ctx, field.Selections, res) } func (ec *executionContext) _Message_createdBy(ctx context.Context, field graphql.CollectedField, obj *Message) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Message", Field: field, Args: nil, @@ -602,14 +600,14 @@ func (ec *executionContext) _Message_createdBy(ctx context.Context, field graphq Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.CreatedBy, nil @@ -619,18 +617,18 @@ func (ec *executionContext) _Message_createdBy(ctx context.Context, field graphq return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalNString2string(ctx, field.Selections, res) } func (ec *executionContext) _Message_createdAt(ctx context.Context, field graphql.CollectedField, obj *Message) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Message", Field: field, Args: nil, @@ -638,14 +636,14 @@ func (ec *executionContext) _Message_createdAt(ctx context.Context, field graphq Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.CreatedAt, nil @@ -655,18 +653,18 @@ func (ec *executionContext) _Message_createdAt(ctx context.Context, field graphq return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(time.Time) - rctx.Result = res + fc.Result = res return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res) } func (ec *executionContext) _Mutation_post(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Mutation", Field: field, Args: nil, @@ -674,21 +672,21 @@ func (ec *executionContext) _Mutation_post(ctx context.Context, field graphql.Co Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) + ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field_Mutation_post_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } - rctx.Args = args - rctx.Stats.ArgumentsCompleted = graphql.Now() + fc.Args = args + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().Post(rctx, args["text"].(string), args["username"].(string), args["roomName"].(string)) @@ -698,18 +696,18 @@ func (ec *executionContext) _Mutation_post(ctx context.Context, field graphql.Co return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(*Message) - rctx.Result = res + fc.Result = res return ec.marshalNMessage2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋchatᚐMessage(ctx, field.Selections, res) } func (ec *executionContext) _Query_room(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Query", Field: field, Args: nil, @@ -717,21 +715,21 @@ func (ec *executionContext) _Query_room(ctx context.Context, field graphql.Colle Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) + ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field_Query_room_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } - rctx.Args = args - rctx.Stats.ArgumentsCompleted = graphql.Now() + fc.Args = args + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().Room(rctx, args["name"].(string)) @@ -744,12 +742,12 @@ func (ec *executionContext) _Query_room(ctx context.Context, field graphql.Colle return graphql.Null } res := resTmp.(*Chatroom) - rctx.Result = res + fc.Result = res return ec.marshalOChatroom2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋchatᚐChatroom(ctx, field.Selections, res) } func (ec *executionContext) _Query___type(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Query", Field: field, Args: nil, @@ -757,21 +755,21 @@ func (ec *executionContext) _Query___type(ctx context.Context, field graphql.Col Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) + ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field_Query___type_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } - rctx.Args = args - rctx.Stats.ArgumentsCompleted = graphql.Now() + fc.Args = args + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.introspectType(args["name"].(string)) @@ -784,12 +782,12 @@ func (ec *executionContext) _Query___type(ctx context.Context, field graphql.Col return graphql.Null } res := resTmp.(*introspection.Type) - rctx.Result = res + fc.Result = res return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Query", Field: field, Args: nil, @@ -797,14 +795,14 @@ func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.C Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.introspectSchema() @@ -817,12 +815,12 @@ func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.C return graphql.Null } res := resTmp.(*introspection.Schema) - rctx.Result = res + fc.Result = res return ec.marshalO__Schema2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐSchema(ctx, field.Selections, res) } func (ec *executionContext) _Subscription_messageAdded(ctx context.Context, field graphql.CollectedField) (ret func() graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Subscription", Field: field, Args: nil, @@ -830,21 +828,21 @@ func (ec *executionContext) _Subscription_messageAdded(ctx context.Context, fiel Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = nil } }() - ctx = graphql.WithResolverContext(ctx, rctx) + ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field_Subscription_messageAdded_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return nil } - rctx.Args = args - rctx.Stats.ArgumentsCompleted = graphql.Now() + fc.Args = args + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Subscription().MessageAdded(rctx, args["roomName"].(string)) @@ -854,7 +852,7 @@ func (ec *executionContext) _Subscription_messageAdded(ctx context.Context, fiel return nil } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return nil @@ -875,7 +873,7 @@ func (ec *executionContext) _Subscription_messageAdded(ctx context.Context, fiel } func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Directive", Field: field, Args: nil, @@ -883,14 +881,14 @@ func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Name, nil @@ -900,18 +898,18 @@ func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalNString2string(ctx, field.Selections, res) } func (ec *executionContext) ___Directive_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Directive", Field: field, Args: nil, @@ -919,14 +917,14 @@ func (ec *executionContext) ___Directive_description(ctx context.Context, field Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Description, nil @@ -939,12 +937,12 @@ func (ec *executionContext) ___Directive_description(ctx context.Context, field return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalOString2string(ctx, field.Selections, res) } func (ec *executionContext) ___Directive_locations(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Directive", Field: field, Args: nil, @@ -952,14 +950,14 @@ func (ec *executionContext) ___Directive_locations(ctx context.Context, field gr Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Locations, nil @@ -969,18 +967,18 @@ func (ec *executionContext) ___Directive_locations(ctx context.Context, field gr return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.([]string) - rctx.Result = res + fc.Result = res return ec.marshalN__DirectiveLocation2ᚕstring(ctx, field.Selections, res) } func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Directive", Field: field, Args: nil, @@ -988,14 +986,14 @@ func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Args, nil @@ -1005,18 +1003,18 @@ func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.([]introspection.InputValue) - rctx.Result = res + fc.Result = res return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx, field.Selections, res) } func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__EnumValue", Field: field, Args: nil, @@ -1024,14 +1022,14 @@ func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Name, nil @@ -1041,18 +1039,18 @@ func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalNString2string(ctx, field.Selections, res) } func (ec *executionContext) ___EnumValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__EnumValue", Field: field, Args: nil, @@ -1060,14 +1058,14 @@ func (ec *executionContext) ___EnumValue_description(ctx context.Context, field Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Description, nil @@ -1080,12 +1078,12 @@ func (ec *executionContext) ___EnumValue_description(ctx context.Context, field return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalOString2string(ctx, field.Selections, res) } func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__EnumValue", Field: field, Args: nil, @@ -1093,14 +1091,14 @@ func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.IsDeprecated(), nil @@ -1110,18 +1108,18 @@ func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(bool) - rctx.Result = res + fc.Result = res return ec.marshalNBoolean2bool(ctx, field.Selections, res) } func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__EnumValue", Field: field, Args: nil, @@ -1129,14 +1127,14 @@ func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.DeprecationReason(), nil @@ -1149,12 +1147,12 @@ func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, return graphql.Null } res := resTmp.(*string) - rctx.Result = res + fc.Result = res return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Field", Field: field, Args: nil, @@ -1162,14 +1160,14 @@ func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.Col Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Name, nil @@ -1179,18 +1177,18 @@ func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.Col return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalNString2string(ctx, field.Selections, res) } func (ec *executionContext) ___Field_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Field", Field: field, Args: nil, @@ -1198,14 +1196,14 @@ func (ec *executionContext) ___Field_description(ctx context.Context, field grap Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Description, nil @@ -1218,12 +1216,12 @@ func (ec *executionContext) ___Field_description(ctx context.Context, field grap return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalOString2string(ctx, field.Selections, res) } func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Field", Field: field, Args: nil, @@ -1231,14 +1229,14 @@ func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.Col Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Args, nil @@ -1248,18 +1246,18 @@ func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.Col return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.([]introspection.InputValue) - rctx.Result = res + fc.Result = res return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx, field.Selections, res) } func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Field", Field: field, Args: nil, @@ -1267,14 +1265,14 @@ func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.Col Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Type, nil @@ -1284,18 +1282,18 @@ func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.Col return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(*introspection.Type) - rctx.Result = res + fc.Result = res return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Field", Field: field, Args: nil, @@ -1303,14 +1301,14 @@ func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field gra Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.IsDeprecated(), nil @@ -1320,18 +1318,18 @@ func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field gra return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(bool) - rctx.Result = res + fc.Result = res return ec.marshalNBoolean2bool(ctx, field.Selections, res) } func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Field", Field: field, Args: nil, @@ -1339,14 +1337,14 @@ func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, fiel Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.DeprecationReason(), nil @@ -1359,12 +1357,12 @@ func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, fiel return graphql.Null } res := resTmp.(*string) - rctx.Result = res + fc.Result = res return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__InputValue", Field: field, Args: nil, @@ -1372,14 +1370,14 @@ func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphq Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Name, nil @@ -1389,18 +1387,18 @@ func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphq return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalNString2string(ctx, field.Selections, res) } func (ec *executionContext) ___InputValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__InputValue", Field: field, Args: nil, @@ -1408,14 +1406,14 @@ func (ec *executionContext) ___InputValue_description(ctx context.Context, field Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Description, nil @@ -1428,12 +1426,12 @@ func (ec *executionContext) ___InputValue_description(ctx context.Context, field return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalOString2string(ctx, field.Selections, res) } func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__InputValue", Field: field, Args: nil, @@ -1441,14 +1439,14 @@ func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphq Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Type, nil @@ -1458,18 +1456,18 @@ func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphq return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(*introspection.Type) - rctx.Result = res + fc.Result = res return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__InputValue", Field: field, Args: nil, @@ -1477,14 +1475,14 @@ func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, fiel Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.DefaultValue, nil @@ -1497,12 +1495,12 @@ func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, fiel return graphql.Null } res := resTmp.(*string) - rctx.Result = res + fc.Result = res return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Schema", Field: field, Args: nil, @@ -1510,14 +1508,14 @@ func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.C Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Types(), nil @@ -1527,18 +1525,18 @@ func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.C return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.([]introspection.Type) - rctx.Result = res + fc.Result = res return ec.marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Schema", Field: field, Args: nil, @@ -1546,14 +1544,14 @@ func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graph Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.QueryType(), nil @@ -1563,18 +1561,18 @@ func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graph return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(*introspection.Type) - rctx.Result = res + fc.Result = res return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Schema", Field: field, Args: nil, @@ -1582,14 +1580,14 @@ func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field gr Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.MutationType(), nil @@ -1602,12 +1600,12 @@ func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field gr return graphql.Null } res := resTmp.(*introspection.Type) - rctx.Result = res + fc.Result = res return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Schema", Field: field, Args: nil, @@ -1615,14 +1613,14 @@ func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, fiel Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.SubscriptionType(), nil @@ -1635,12 +1633,12 @@ func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, fiel return graphql.Null } res := resTmp.(*introspection.Type) - rctx.Result = res + fc.Result = res return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) ___Schema_directives(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Schema", Field: field, Args: nil, @@ -1648,14 +1646,14 @@ func (ec *executionContext) ___Schema_directives(ctx context.Context, field grap Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Directives(), nil @@ -1665,18 +1663,18 @@ func (ec *executionContext) ___Schema_directives(ctx context.Context, field grap return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.([]introspection.Directive) - rctx.Result = res + fc.Result = res return ec.marshalN__Directive2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirective(ctx, field.Selections, res) } func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, @@ -1684,14 +1682,14 @@ func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.Coll Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Kind(), nil @@ -1701,18 +1699,18 @@ func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.Coll return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalN__TypeKind2string(ctx, field.Selections, res) } func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, @@ -1720,14 +1718,14 @@ func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.Coll Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Name(), nil @@ -1740,12 +1738,12 @@ func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.Coll return graphql.Null } res := resTmp.(*string) - rctx.Result = res + fc.Result = res return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } func (ec *executionContext) ___Type_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, @@ -1753,14 +1751,14 @@ func (ec *executionContext) ___Type_description(ctx context.Context, field graph Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Description(), nil @@ -1773,12 +1771,12 @@ func (ec *executionContext) ___Type_description(ctx context.Context, field graph return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalOString2string(ctx, field.Selections, res) } func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, @@ -1786,21 +1784,21 @@ func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.Co Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) + ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field___Type_fields_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } - rctx.Args = args - rctx.Stats.ArgumentsCompleted = graphql.Now() + fc.Args = args + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Fields(args["includeDeprecated"].(bool)), nil @@ -1813,12 +1811,12 @@ func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.Co return graphql.Null } res := resTmp.([]introspection.Field) - rctx.Result = res + fc.Result = res return ec.marshalO__Field2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐField(ctx, field.Selections, res) } func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, @@ -1826,14 +1824,14 @@ func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphq Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Interfaces(), nil @@ -1846,12 +1844,12 @@ func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphq return graphql.Null } res := resTmp.([]introspection.Type) - rctx.Result = res + fc.Result = res return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, @@ -1859,14 +1857,14 @@ func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field gra Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.PossibleTypes(), nil @@ -1879,12 +1877,12 @@ func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field gra return graphql.Null } res := resTmp.([]introspection.Type) - rctx.Result = res + fc.Result = res return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, @@ -1892,21 +1890,21 @@ func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphq Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) + ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field___Type_enumValues_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } - rctx.Args = args - rctx.Stats.ArgumentsCompleted = graphql.Now() + fc.Args = args + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.EnumValues(args["includeDeprecated"].(bool)), nil @@ -1919,12 +1917,12 @@ func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphq return graphql.Null } res := resTmp.([]introspection.EnumValue) - rctx.Result = res + fc.Result = res return ec.marshalO__EnumValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValue(ctx, field.Selections, res) } func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, @@ -1932,14 +1930,14 @@ func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graph Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.InputFields(), nil @@ -1952,12 +1950,12 @@ func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graph return graphql.Null } res := resTmp.([]introspection.InputValue) - rctx.Result = res + fc.Result = res return ec.marshalO__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx, field.Selections, res) } func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, @@ -1965,14 +1963,14 @@ func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.Co Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.OfType(), nil @@ -1985,7 +1983,7 @@ func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.Co return graphql.Null } res := resTmp.(*introspection.Type) - rctx.Result = res + fc.Result = res return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } @@ -2080,8 +2078,9 @@ var mutationImplementors = []string{"Mutation"} func (ec *executionContext) _Mutation(ctx context.Context, sel ast.SelectionSet) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, mutationImplementors) - ctx = graphql.WithResolverContext(ctx, &graphql.ResolverContext{ + ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{ Object: "Mutation", + Stats: graphql.FieldStats{Started: graphql.Now()}, }) out := graphql.NewFieldSet(fields) @@ -2111,8 +2110,9 @@ var queryImplementors = []string{"Query"} func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, queryImplementors) - ctx = graphql.WithResolverContext(ctx, &graphql.ResolverContext{ + ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{ Object: "Query", + Stats: graphql.FieldStats{Started: graphql.Now()}, }) out := graphql.NewFieldSet(fields) @@ -2151,8 +2151,9 @@ var subscriptionImplementors = []string{"Subscription"} func (ec *executionContext) _Subscription(ctx context.Context, sel ast.SelectionSet) func() graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, subscriptionImplementors) - ctx = graphql.WithResolverContext(ctx, &graphql.ResolverContext{ + ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{ Object: "Subscription", + Stats: graphql.FieldStats{Started: graphql.Now()}, }) if len(fields) != 1 { ec.Errorf(ctx, "must subscribe to exactly one stream") @@ -2419,7 +2420,7 @@ func (ec *executionContext) unmarshalNBoolean2bool(ctx context.Context, v interf func (ec *executionContext) marshalNBoolean2bool(ctx context.Context, sel ast.SelectionSet, v bool) graphql.Marshaler { res := graphql.MarshalBoolean(v) if res == graphql.Null { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } } @@ -2433,7 +2434,7 @@ func (ec *executionContext) unmarshalNID2string(ctx context.Context, v interface func (ec *executionContext) marshalNID2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { res := graphql.MarshalID(v) if res == graphql.Null { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } } @@ -2453,11 +2454,12 @@ func (ec *executionContext) marshalNMessage2ᚕgithubᚗcomᚋ99designsᚋgqlgen } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -2483,7 +2485,7 @@ func (ec *executionContext) marshalNMessage2ᚕgithubᚗcomᚋ99designsᚋgqlgen func (ec *executionContext) marshalNMessage2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋchatᚐMessage(ctx context.Context, sel ast.SelectionSet, v *Message) graphql.Marshaler { if v == nil { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } return graphql.Null @@ -2498,7 +2500,7 @@ func (ec *executionContext) unmarshalNString2string(ctx context.Context, v inter func (ec *executionContext) marshalNString2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { res := graphql.MarshalString(v) if res == graphql.Null { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } } @@ -2512,7 +2514,7 @@ func (ec *executionContext) unmarshalNTime2timeᚐTime(ctx context.Context, v in func (ec *executionContext) marshalNTime2timeᚐTime(ctx context.Context, sel ast.SelectionSet, v time.Time) graphql.Marshaler { res := graphql.MarshalTime(v) if res == graphql.Null { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } } @@ -2532,11 +2534,12 @@ func (ec *executionContext) marshalN__Directive2ᚕgithubᚗcomᚋ99designsᚋgq } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -2567,7 +2570,7 @@ func (ec *executionContext) unmarshalN__DirectiveLocation2string(ctx context.Con func (ec *executionContext) marshalN__DirectiveLocation2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { res := graphql.MarshalString(v) if res == graphql.Null { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } } @@ -2603,11 +2606,12 @@ func (ec *executionContext) marshalN__DirectiveLocation2ᚕstring(ctx context.Co } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -2652,11 +2656,12 @@ func (ec *executionContext) marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋg } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -2693,11 +2698,12 @@ func (ec *executionContext) marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgen } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -2723,7 +2729,7 @@ func (ec *executionContext) marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgen func (ec *executionContext) marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v *introspection.Type) graphql.Marshaler { if v == nil { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } return graphql.Null @@ -2738,7 +2744,7 @@ func (ec *executionContext) unmarshalN__TypeKind2string(ctx context.Context, v i func (ec *executionContext) marshalN__TypeKind2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { res := graphql.MarshalString(v) if res == graphql.Null { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } } @@ -2814,11 +2820,12 @@ func (ec *executionContext) marshalO__EnumValue2ᚕgithubᚗcomᚋ99designsᚋgq } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -2854,11 +2861,12 @@ func (ec *executionContext) marshalO__Field2ᚕgithubᚗcomᚋ99designsᚋgqlgen } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -2894,11 +2902,12 @@ func (ec *executionContext) marshalO__InputValue2ᚕgithubᚗcomᚋ99designsᚋg } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -2949,11 +2958,12 @@ func (ec *executionContext) marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgen } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { diff --git a/example/config/generated.go b/example/config/generated.go index a5d195c1de0..dea8fafc91b 100644 --- a/example/config/generated.go +++ b/example/config/generated.go @@ -1,5 +1,3 @@ -// Code generated by github.com/99designs/gqlgen, DO NOT EDIT. - package config import ( @@ -324,7 +322,7 @@ func (ec *executionContext) field___Type_fields_args(ctx context.Context, rawArg // region **************************** field.gotpl ***************************** func (ec *executionContext) _Mutation_createTodo(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Mutation", Field: field, Args: nil, @@ -332,21 +330,21 @@ func (ec *executionContext) _Mutation_createTodo(ctx context.Context, field grap Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) + ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field_Mutation_createTodo_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } - rctx.Args = args - rctx.Stats.ArgumentsCompleted = graphql.Now() + fc.Args = args + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().CreateTodo(rctx, args["input"].(NewTodo)) @@ -356,18 +354,18 @@ func (ec *executionContext) _Mutation_createTodo(ctx context.Context, field grap return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(*Todo) - rctx.Result = res + fc.Result = res return ec.marshalNTodo2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋconfigᚐTodo(ctx, field.Selections, res) } func (ec *executionContext) _Query_todos(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Query", Field: field, Args: nil, @@ -375,14 +373,14 @@ func (ec *executionContext) _Query_todos(ctx context.Context, field graphql.Coll Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().Todos(rctx) @@ -392,18 +390,18 @@ func (ec *executionContext) _Query_todos(ctx context.Context, field graphql.Coll return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.([]*Todo) - rctx.Result = res + fc.Result = res return ec.marshalNTodo2ᚕᚖgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋconfigᚐTodo(ctx, field.Selections, res) } func (ec *executionContext) _Query___type(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Query", Field: field, Args: nil, @@ -411,21 +409,21 @@ func (ec *executionContext) _Query___type(ctx context.Context, field graphql.Col Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) + ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field_Query___type_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } - rctx.Args = args - rctx.Stats.ArgumentsCompleted = graphql.Now() + fc.Args = args + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.introspectType(args["name"].(string)) @@ -438,12 +436,12 @@ func (ec *executionContext) _Query___type(ctx context.Context, field graphql.Col return graphql.Null } res := resTmp.(*introspection.Type) - rctx.Result = res + fc.Result = res return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Query", Field: field, Args: nil, @@ -451,14 +449,14 @@ func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.C Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.introspectSchema() @@ -471,12 +469,12 @@ func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.C return graphql.Null } res := resTmp.(*introspection.Schema) - rctx.Result = res + fc.Result = res return ec.marshalO__Schema2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐSchema(ctx, field.Selections, res) } func (ec *executionContext) _Todo_id(ctx context.Context, field graphql.CollectedField, obj *Todo) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Todo", Field: field, Args: nil, @@ -484,14 +482,14 @@ func (ec *executionContext) _Todo_id(ctx context.Context, field graphql.Collecte Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Todo().ID(rctx, obj) @@ -501,18 +499,18 @@ func (ec *executionContext) _Todo_id(ctx context.Context, field graphql.Collecte return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalNID2string(ctx, field.Selections, res) } func (ec *executionContext) _Todo_databaseId(ctx context.Context, field graphql.CollectedField, obj *Todo) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Todo", Field: field, Args: nil, @@ -520,14 +518,14 @@ func (ec *executionContext) _Todo_databaseId(ctx context.Context, field graphql. Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.DatabaseID, nil @@ -537,18 +535,18 @@ func (ec *executionContext) _Todo_databaseId(ctx context.Context, field graphql. return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(int) - rctx.Result = res + fc.Result = res return ec.marshalNInt2int(ctx, field.Selections, res) } func (ec *executionContext) _Todo_text(ctx context.Context, field graphql.CollectedField, obj *Todo) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Todo", Field: field, Args: nil, @@ -556,14 +554,14 @@ func (ec *executionContext) _Todo_text(ctx context.Context, field graphql.Collec Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Description, nil @@ -573,18 +571,18 @@ func (ec *executionContext) _Todo_text(ctx context.Context, field graphql.Collec return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalNString2string(ctx, field.Selections, res) } func (ec *executionContext) _Todo_done(ctx context.Context, field graphql.CollectedField, obj *Todo) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Todo", Field: field, Args: nil, @@ -592,14 +590,14 @@ func (ec *executionContext) _Todo_done(ctx context.Context, field graphql.Collec Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Done, nil @@ -609,18 +607,18 @@ func (ec *executionContext) _Todo_done(ctx context.Context, field graphql.Collec return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(bool) - rctx.Result = res + fc.Result = res return ec.marshalNBoolean2bool(ctx, field.Selections, res) } func (ec *executionContext) _Todo_user(ctx context.Context, field graphql.CollectedField, obj *Todo) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Todo", Field: field, Args: nil, @@ -628,14 +626,14 @@ func (ec *executionContext) _Todo_user(ctx context.Context, field graphql.Collec Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.User, nil @@ -645,18 +643,18 @@ func (ec *executionContext) _Todo_user(ctx context.Context, field graphql.Collec return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(*User) - rctx.Result = res + fc.Result = res return ec.marshalNUser2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋconfigᚐUser(ctx, field.Selections, res) } func (ec *executionContext) _User_id(ctx context.Context, field graphql.CollectedField, obj *User) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "User", Field: field, Args: nil, @@ -664,14 +662,14 @@ func (ec *executionContext) _User_id(ctx context.Context, field graphql.Collecte Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.ID, nil @@ -681,18 +679,18 @@ func (ec *executionContext) _User_id(ctx context.Context, field graphql.Collecte return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalNID2string(ctx, field.Selections, res) } func (ec *executionContext) _User_name(ctx context.Context, field graphql.CollectedField, obj *User) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "User", Field: field, Args: nil, @@ -700,14 +698,14 @@ func (ec *executionContext) _User_name(ctx context.Context, field graphql.Collec Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.FullName(), nil @@ -717,18 +715,18 @@ func (ec *executionContext) _User_name(ctx context.Context, field graphql.Collec return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalNString2string(ctx, field.Selections, res) } func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Directive", Field: field, Args: nil, @@ -736,14 +734,14 @@ func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Name, nil @@ -753,18 +751,18 @@ func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalNString2string(ctx, field.Selections, res) } func (ec *executionContext) ___Directive_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Directive", Field: field, Args: nil, @@ -772,14 +770,14 @@ func (ec *executionContext) ___Directive_description(ctx context.Context, field Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Description, nil @@ -792,12 +790,12 @@ func (ec *executionContext) ___Directive_description(ctx context.Context, field return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalOString2string(ctx, field.Selections, res) } func (ec *executionContext) ___Directive_locations(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Directive", Field: field, Args: nil, @@ -805,14 +803,14 @@ func (ec *executionContext) ___Directive_locations(ctx context.Context, field gr Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Locations, nil @@ -822,18 +820,18 @@ func (ec *executionContext) ___Directive_locations(ctx context.Context, field gr return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.([]string) - rctx.Result = res + fc.Result = res return ec.marshalN__DirectiveLocation2ᚕstring(ctx, field.Selections, res) } func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Directive", Field: field, Args: nil, @@ -841,14 +839,14 @@ func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Args, nil @@ -858,18 +856,18 @@ func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.([]introspection.InputValue) - rctx.Result = res + fc.Result = res return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx, field.Selections, res) } func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__EnumValue", Field: field, Args: nil, @@ -877,14 +875,14 @@ func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Name, nil @@ -894,18 +892,18 @@ func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalNString2string(ctx, field.Selections, res) } func (ec *executionContext) ___EnumValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__EnumValue", Field: field, Args: nil, @@ -913,14 +911,14 @@ func (ec *executionContext) ___EnumValue_description(ctx context.Context, field Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Description, nil @@ -933,12 +931,12 @@ func (ec *executionContext) ___EnumValue_description(ctx context.Context, field return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalOString2string(ctx, field.Selections, res) } func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__EnumValue", Field: field, Args: nil, @@ -946,14 +944,14 @@ func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.IsDeprecated(), nil @@ -963,18 +961,18 @@ func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(bool) - rctx.Result = res + fc.Result = res return ec.marshalNBoolean2bool(ctx, field.Selections, res) } func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__EnumValue", Field: field, Args: nil, @@ -982,14 +980,14 @@ func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.DeprecationReason(), nil @@ -1002,12 +1000,12 @@ func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, return graphql.Null } res := resTmp.(*string) - rctx.Result = res + fc.Result = res return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Field", Field: field, Args: nil, @@ -1015,14 +1013,14 @@ func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.Col Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Name, nil @@ -1032,18 +1030,18 @@ func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.Col return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalNString2string(ctx, field.Selections, res) } func (ec *executionContext) ___Field_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Field", Field: field, Args: nil, @@ -1051,14 +1049,14 @@ func (ec *executionContext) ___Field_description(ctx context.Context, field grap Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Description, nil @@ -1071,12 +1069,12 @@ func (ec *executionContext) ___Field_description(ctx context.Context, field grap return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalOString2string(ctx, field.Selections, res) } func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Field", Field: field, Args: nil, @@ -1084,14 +1082,14 @@ func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.Col Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Args, nil @@ -1101,18 +1099,18 @@ func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.Col return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.([]introspection.InputValue) - rctx.Result = res + fc.Result = res return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx, field.Selections, res) } func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Field", Field: field, Args: nil, @@ -1120,14 +1118,14 @@ func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.Col Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Type, nil @@ -1137,18 +1135,18 @@ func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.Col return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(*introspection.Type) - rctx.Result = res + fc.Result = res return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Field", Field: field, Args: nil, @@ -1156,14 +1154,14 @@ func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field gra Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.IsDeprecated(), nil @@ -1173,18 +1171,18 @@ func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field gra return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(bool) - rctx.Result = res + fc.Result = res return ec.marshalNBoolean2bool(ctx, field.Selections, res) } func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Field", Field: field, Args: nil, @@ -1192,14 +1190,14 @@ func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, fiel Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.DeprecationReason(), nil @@ -1212,12 +1210,12 @@ func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, fiel return graphql.Null } res := resTmp.(*string) - rctx.Result = res + fc.Result = res return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__InputValue", Field: field, Args: nil, @@ -1225,14 +1223,14 @@ func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphq Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Name, nil @@ -1242,18 +1240,18 @@ func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphq return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalNString2string(ctx, field.Selections, res) } func (ec *executionContext) ___InputValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__InputValue", Field: field, Args: nil, @@ -1261,14 +1259,14 @@ func (ec *executionContext) ___InputValue_description(ctx context.Context, field Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Description, nil @@ -1281,12 +1279,12 @@ func (ec *executionContext) ___InputValue_description(ctx context.Context, field return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalOString2string(ctx, field.Selections, res) } func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__InputValue", Field: field, Args: nil, @@ -1294,14 +1292,14 @@ func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphq Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Type, nil @@ -1311,18 +1309,18 @@ func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphq return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(*introspection.Type) - rctx.Result = res + fc.Result = res return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__InputValue", Field: field, Args: nil, @@ -1330,14 +1328,14 @@ func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, fiel Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.DefaultValue, nil @@ -1350,12 +1348,12 @@ func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, fiel return graphql.Null } res := resTmp.(*string) - rctx.Result = res + fc.Result = res return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Schema", Field: field, Args: nil, @@ -1363,14 +1361,14 @@ func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.C Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Types(), nil @@ -1380,18 +1378,18 @@ func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.C return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.([]introspection.Type) - rctx.Result = res + fc.Result = res return ec.marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Schema", Field: field, Args: nil, @@ -1399,14 +1397,14 @@ func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graph Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.QueryType(), nil @@ -1416,18 +1414,18 @@ func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graph return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(*introspection.Type) - rctx.Result = res + fc.Result = res return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Schema", Field: field, Args: nil, @@ -1435,14 +1433,14 @@ func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field gr Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.MutationType(), nil @@ -1455,12 +1453,12 @@ func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field gr return graphql.Null } res := resTmp.(*introspection.Type) - rctx.Result = res + fc.Result = res return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Schema", Field: field, Args: nil, @@ -1468,14 +1466,14 @@ func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, fiel Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.SubscriptionType(), nil @@ -1488,12 +1486,12 @@ func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, fiel return graphql.Null } res := resTmp.(*introspection.Type) - rctx.Result = res + fc.Result = res return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) ___Schema_directives(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Schema", Field: field, Args: nil, @@ -1501,14 +1499,14 @@ func (ec *executionContext) ___Schema_directives(ctx context.Context, field grap Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Directives(), nil @@ -1518,18 +1516,18 @@ func (ec *executionContext) ___Schema_directives(ctx context.Context, field grap return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.([]introspection.Directive) - rctx.Result = res + fc.Result = res return ec.marshalN__Directive2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirective(ctx, field.Selections, res) } func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, @@ -1537,14 +1535,14 @@ func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.Coll Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Kind(), nil @@ -1554,18 +1552,18 @@ func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.Coll return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalN__TypeKind2string(ctx, field.Selections, res) } func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, @@ -1573,14 +1571,14 @@ func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.Coll Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Name(), nil @@ -1593,12 +1591,12 @@ func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.Coll return graphql.Null } res := resTmp.(*string) - rctx.Result = res + fc.Result = res return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } func (ec *executionContext) ___Type_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, @@ -1606,14 +1604,14 @@ func (ec *executionContext) ___Type_description(ctx context.Context, field graph Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Description(), nil @@ -1626,12 +1624,12 @@ func (ec *executionContext) ___Type_description(ctx context.Context, field graph return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalOString2string(ctx, field.Selections, res) } func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, @@ -1639,21 +1637,21 @@ func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.Co Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) + ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field___Type_fields_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } - rctx.Args = args - rctx.Stats.ArgumentsCompleted = graphql.Now() + fc.Args = args + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Fields(args["includeDeprecated"].(bool)), nil @@ -1666,12 +1664,12 @@ func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.Co return graphql.Null } res := resTmp.([]introspection.Field) - rctx.Result = res + fc.Result = res return ec.marshalO__Field2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐField(ctx, field.Selections, res) } func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, @@ -1679,14 +1677,14 @@ func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphq Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Interfaces(), nil @@ -1699,12 +1697,12 @@ func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphq return graphql.Null } res := resTmp.([]introspection.Type) - rctx.Result = res + fc.Result = res return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, @@ -1712,14 +1710,14 @@ func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field gra Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.PossibleTypes(), nil @@ -1732,12 +1730,12 @@ func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field gra return graphql.Null } res := resTmp.([]introspection.Type) - rctx.Result = res + fc.Result = res return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, @@ -1745,21 +1743,21 @@ func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphq Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) + ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field___Type_enumValues_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } - rctx.Args = args - rctx.Stats.ArgumentsCompleted = graphql.Now() + fc.Args = args + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.EnumValues(args["includeDeprecated"].(bool)), nil @@ -1772,12 +1770,12 @@ func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphq return graphql.Null } res := resTmp.([]introspection.EnumValue) - rctx.Result = res + fc.Result = res return ec.marshalO__EnumValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValue(ctx, field.Selections, res) } func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, @@ -1785,14 +1783,14 @@ func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graph Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.InputFields(), nil @@ -1805,12 +1803,12 @@ func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graph return graphql.Null } res := resTmp.([]introspection.InputValue) - rctx.Result = res + fc.Result = res return ec.marshalO__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx, field.Selections, res) } func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, @@ -1818,14 +1816,14 @@ func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.Co Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.OfType(), nil @@ -1838,7 +1836,7 @@ func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.Co return graphql.Null } res := resTmp.(*introspection.Type) - rctx.Result = res + fc.Result = res return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } @@ -1883,8 +1881,9 @@ var mutationImplementors = []string{"Mutation"} func (ec *executionContext) _Mutation(ctx context.Context, sel ast.SelectionSet) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, mutationImplementors) - ctx = graphql.WithResolverContext(ctx, &graphql.ResolverContext{ + ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{ Object: "Mutation", + Stats: graphql.FieldStats{Started: graphql.Now()}, }) out := graphql.NewFieldSet(fields) @@ -1914,8 +1913,9 @@ var queryImplementors = []string{"Query"} func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, queryImplementors) - ctx = graphql.WithResolverContext(ctx, &graphql.ResolverContext{ + ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{ Object: "Query", + Stats: graphql.FieldStats{Started: graphql.Now()}, }) out := graphql.NewFieldSet(fields) @@ -2293,7 +2293,7 @@ func (ec *executionContext) unmarshalNBoolean2bool(ctx context.Context, v interf func (ec *executionContext) marshalNBoolean2bool(ctx context.Context, sel ast.SelectionSet, v bool) graphql.Marshaler { res := graphql.MarshalBoolean(v) if res == graphql.Null { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } } @@ -2307,7 +2307,7 @@ func (ec *executionContext) unmarshalNID2string(ctx context.Context, v interface func (ec *executionContext) marshalNID2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { res := graphql.MarshalID(v) if res == graphql.Null { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } } @@ -2321,7 +2321,7 @@ func (ec *executionContext) unmarshalNInt2int(ctx context.Context, v interface{} func (ec *executionContext) marshalNInt2int(ctx context.Context, sel ast.SelectionSet, v int) graphql.Marshaler { res := graphql.MarshalInt(v) if res == graphql.Null { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } } @@ -2339,7 +2339,7 @@ func (ec *executionContext) unmarshalNString2string(ctx context.Context, v inter func (ec *executionContext) marshalNString2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { res := graphql.MarshalString(v) if res == graphql.Null { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } } @@ -2359,11 +2359,12 @@ func (ec *executionContext) marshalNTodo2ᚕᚖgithubᚗcomᚋ99designsᚋgqlgen } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -2389,7 +2390,7 @@ func (ec *executionContext) marshalNTodo2ᚕᚖgithubᚗcomᚋ99designsᚋgqlgen func (ec *executionContext) marshalNTodo2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋconfigᚐTodo(ctx context.Context, sel ast.SelectionSet, v *Todo) graphql.Marshaler { if v == nil { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } return graphql.Null @@ -2403,7 +2404,7 @@ func (ec *executionContext) marshalNUser2githubᚗcomᚋ99designsᚋgqlgenᚋexa func (ec *executionContext) marshalNUser2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋconfigᚐUser(ctx context.Context, sel ast.SelectionSet, v *User) graphql.Marshaler { if v == nil { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } return graphql.Null @@ -2424,11 +2425,12 @@ func (ec *executionContext) marshalN__Directive2ᚕgithubᚗcomᚋ99designsᚋgq } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -2459,7 +2461,7 @@ func (ec *executionContext) unmarshalN__DirectiveLocation2string(ctx context.Con func (ec *executionContext) marshalN__DirectiveLocation2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { res := graphql.MarshalString(v) if res == graphql.Null { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } } @@ -2495,11 +2497,12 @@ func (ec *executionContext) marshalN__DirectiveLocation2ᚕstring(ctx context.Co } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -2544,11 +2547,12 @@ func (ec *executionContext) marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋg } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -2585,11 +2589,12 @@ func (ec *executionContext) marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgen } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -2615,7 +2620,7 @@ func (ec *executionContext) marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgen func (ec *executionContext) marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v *introspection.Type) graphql.Marshaler { if v == nil { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } return graphql.Null @@ -2630,7 +2635,7 @@ func (ec *executionContext) unmarshalN__TypeKind2string(ctx context.Context, v i func (ec *executionContext) marshalN__TypeKind2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { res := graphql.MarshalString(v) if res == graphql.Null { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } } @@ -2727,11 +2732,12 @@ func (ec *executionContext) marshalO__EnumValue2ᚕgithubᚗcomᚋ99designsᚋgq } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -2767,11 +2773,12 @@ func (ec *executionContext) marshalO__Field2ᚕgithubᚗcomᚋ99designsᚋgqlgen } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -2807,11 +2814,12 @@ func (ec *executionContext) marshalO__InputValue2ᚕgithubᚗcomᚋ99designsᚋg } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -2862,11 +2870,12 @@ func (ec *executionContext) marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgen } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { diff --git a/example/dataloader/generated.go b/example/dataloader/generated.go index 9edf2bb8447..10500847fc6 100644 --- a/example/dataloader/generated.go +++ b/example/dataloader/generated.go @@ -1,5 +1,3 @@ -// Code generated by github.com/99designs/gqlgen, DO NOT EDIT. - package dataloader import ( @@ -386,7 +384,7 @@ func (ec *executionContext) field___Type_fields_args(ctx context.Context, rawArg // region **************************** field.gotpl ***************************** func (ec *executionContext) _Address_id(ctx context.Context, field graphql.CollectedField, obj *Address) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Address", Field: field, Args: nil, @@ -394,14 +392,14 @@ func (ec *executionContext) _Address_id(ctx context.Context, field graphql.Colle Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.ID, nil @@ -411,18 +409,18 @@ func (ec *executionContext) _Address_id(ctx context.Context, field graphql.Colle return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(int) - rctx.Result = res + fc.Result = res return ec.marshalNInt2int(ctx, field.Selections, res) } func (ec *executionContext) _Address_street(ctx context.Context, field graphql.CollectedField, obj *Address) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Address", Field: field, Args: nil, @@ -430,14 +428,14 @@ func (ec *executionContext) _Address_street(ctx context.Context, field graphql.C Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Street, nil @@ -447,18 +445,18 @@ func (ec *executionContext) _Address_street(ctx context.Context, field graphql.C return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalNString2string(ctx, field.Selections, res) } func (ec *executionContext) _Address_country(ctx context.Context, field graphql.CollectedField, obj *Address) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Address", Field: field, Args: nil, @@ -466,14 +464,14 @@ func (ec *executionContext) _Address_country(ctx context.Context, field graphql. Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Country, nil @@ -483,18 +481,18 @@ func (ec *executionContext) _Address_country(ctx context.Context, field graphql. return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalNString2string(ctx, field.Selections, res) } func (ec *executionContext) _Customer_id(ctx context.Context, field graphql.CollectedField, obj *Customer) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Customer", Field: field, Args: nil, @@ -502,14 +500,14 @@ func (ec *executionContext) _Customer_id(ctx context.Context, field graphql.Coll Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.ID, nil @@ -519,18 +517,18 @@ func (ec *executionContext) _Customer_id(ctx context.Context, field graphql.Coll return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(int) - rctx.Result = res + fc.Result = res return ec.marshalNInt2int(ctx, field.Selections, res) } func (ec *executionContext) _Customer_name(ctx context.Context, field graphql.CollectedField, obj *Customer) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Customer", Field: field, Args: nil, @@ -538,14 +536,14 @@ func (ec *executionContext) _Customer_name(ctx context.Context, field graphql.Co Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Name, nil @@ -555,18 +553,18 @@ func (ec *executionContext) _Customer_name(ctx context.Context, field graphql.Co return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalNString2string(ctx, field.Selections, res) } func (ec *executionContext) _Customer_address(ctx context.Context, field graphql.CollectedField, obj *Customer) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Customer", Field: field, Args: nil, @@ -574,14 +572,14 @@ func (ec *executionContext) _Customer_address(ctx context.Context, field graphql Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Customer().Address(rctx, obj) @@ -594,12 +592,12 @@ func (ec *executionContext) _Customer_address(ctx context.Context, field graphql return graphql.Null } res := resTmp.(*Address) - rctx.Result = res + fc.Result = res return ec.marshalOAddress2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋdataloaderᚐAddress(ctx, field.Selections, res) } func (ec *executionContext) _Customer_orders(ctx context.Context, field graphql.CollectedField, obj *Customer) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Customer", Field: field, Args: nil, @@ -607,14 +605,14 @@ func (ec *executionContext) _Customer_orders(ctx context.Context, field graphql. Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Customer().Orders(rctx, obj) @@ -627,12 +625,12 @@ func (ec *executionContext) _Customer_orders(ctx context.Context, field graphql. return graphql.Null } res := resTmp.([]*Order) - rctx.Result = res + fc.Result = res return ec.marshalOOrder2ᚕᚖgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋdataloaderᚐOrder(ctx, field.Selections, res) } func (ec *executionContext) _Item_name(ctx context.Context, field graphql.CollectedField, obj *Item) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Item", Field: field, Args: nil, @@ -640,14 +638,14 @@ func (ec *executionContext) _Item_name(ctx context.Context, field graphql.Collec Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Name, nil @@ -657,18 +655,18 @@ func (ec *executionContext) _Item_name(ctx context.Context, field graphql.Collec return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalNString2string(ctx, field.Selections, res) } func (ec *executionContext) _Order_id(ctx context.Context, field graphql.CollectedField, obj *Order) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Order", Field: field, Args: nil, @@ -676,14 +674,14 @@ func (ec *executionContext) _Order_id(ctx context.Context, field graphql.Collect Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.ID, nil @@ -693,18 +691,18 @@ func (ec *executionContext) _Order_id(ctx context.Context, field graphql.Collect return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(int) - rctx.Result = res + fc.Result = res return ec.marshalNInt2int(ctx, field.Selections, res) } func (ec *executionContext) _Order_date(ctx context.Context, field graphql.CollectedField, obj *Order) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Order", Field: field, Args: nil, @@ -712,14 +710,14 @@ func (ec *executionContext) _Order_date(ctx context.Context, field graphql.Colle Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Date, nil @@ -729,18 +727,18 @@ func (ec *executionContext) _Order_date(ctx context.Context, field graphql.Colle return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(time.Time) - rctx.Result = res + fc.Result = res return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res) } func (ec *executionContext) _Order_amount(ctx context.Context, field graphql.CollectedField, obj *Order) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Order", Field: field, Args: nil, @@ -748,14 +746,14 @@ func (ec *executionContext) _Order_amount(ctx context.Context, field graphql.Col Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Amount, nil @@ -765,18 +763,18 @@ func (ec *executionContext) _Order_amount(ctx context.Context, field graphql.Col return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(float64) - rctx.Result = res + fc.Result = res return ec.marshalNFloat2float64(ctx, field.Selections, res) } func (ec *executionContext) _Order_items(ctx context.Context, field graphql.CollectedField, obj *Order) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Order", Field: field, Args: nil, @@ -784,14 +782,14 @@ func (ec *executionContext) _Order_items(ctx context.Context, field graphql.Coll Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Order().Items(rctx, obj) @@ -804,12 +802,12 @@ func (ec *executionContext) _Order_items(ctx context.Context, field graphql.Coll return graphql.Null } res := resTmp.([]*Item) - rctx.Result = res + fc.Result = res return ec.marshalOItem2ᚕᚖgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋdataloaderᚐItem(ctx, field.Selections, res) } func (ec *executionContext) _Query_customers(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Query", Field: field, Args: nil, @@ -817,14 +815,14 @@ func (ec *executionContext) _Query_customers(ctx context.Context, field graphql. Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().Customers(rctx) @@ -837,12 +835,12 @@ func (ec *executionContext) _Query_customers(ctx context.Context, field graphql. return graphql.Null } res := resTmp.([]*Customer) - rctx.Result = res + fc.Result = res return ec.marshalOCustomer2ᚕᚖgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋdataloaderᚐCustomer(ctx, field.Selections, res) } func (ec *executionContext) _Query_torture1d(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Query", Field: field, Args: nil, @@ -850,21 +848,21 @@ func (ec *executionContext) _Query_torture1d(ctx context.Context, field graphql. Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) + ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field_Query_torture1d_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } - rctx.Args = args - rctx.Stats.ArgumentsCompleted = graphql.Now() + fc.Args = args + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().Torture1d(rctx, args["customerIds"].([]int)) @@ -877,12 +875,12 @@ func (ec *executionContext) _Query_torture1d(ctx context.Context, field graphql. return graphql.Null } res := resTmp.([]*Customer) - rctx.Result = res + fc.Result = res return ec.marshalOCustomer2ᚕᚖgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋdataloaderᚐCustomer(ctx, field.Selections, res) } func (ec *executionContext) _Query_torture2d(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Query", Field: field, Args: nil, @@ -890,21 +888,21 @@ func (ec *executionContext) _Query_torture2d(ctx context.Context, field graphql. Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) + ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field_Query_torture2d_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } - rctx.Args = args - rctx.Stats.ArgumentsCompleted = graphql.Now() + fc.Args = args + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().Torture2d(rctx, args["customerIds"].([][]int)) @@ -917,12 +915,12 @@ func (ec *executionContext) _Query_torture2d(ctx context.Context, field graphql. return graphql.Null } res := resTmp.([][]*Customer) - rctx.Result = res + fc.Result = res return ec.marshalOCustomer2ᚕᚕᚖgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋdataloaderᚐCustomer(ctx, field.Selections, res) } func (ec *executionContext) _Query___type(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Query", Field: field, Args: nil, @@ -930,21 +928,21 @@ func (ec *executionContext) _Query___type(ctx context.Context, field graphql.Col Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) + ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field_Query___type_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } - rctx.Args = args - rctx.Stats.ArgumentsCompleted = graphql.Now() + fc.Args = args + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.introspectType(args["name"].(string)) @@ -957,12 +955,12 @@ func (ec *executionContext) _Query___type(ctx context.Context, field graphql.Col return graphql.Null } res := resTmp.(*introspection.Type) - rctx.Result = res + fc.Result = res return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Query", Field: field, Args: nil, @@ -970,14 +968,14 @@ func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.C Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.introspectSchema() @@ -990,12 +988,12 @@ func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.C return graphql.Null } res := resTmp.(*introspection.Schema) - rctx.Result = res + fc.Result = res return ec.marshalO__Schema2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐSchema(ctx, field.Selections, res) } func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Directive", Field: field, Args: nil, @@ -1003,14 +1001,14 @@ func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Name, nil @@ -1020,18 +1018,18 @@ func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalNString2string(ctx, field.Selections, res) } func (ec *executionContext) ___Directive_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Directive", Field: field, Args: nil, @@ -1039,14 +1037,14 @@ func (ec *executionContext) ___Directive_description(ctx context.Context, field Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Description, nil @@ -1059,12 +1057,12 @@ func (ec *executionContext) ___Directive_description(ctx context.Context, field return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalOString2string(ctx, field.Selections, res) } func (ec *executionContext) ___Directive_locations(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Directive", Field: field, Args: nil, @@ -1072,14 +1070,14 @@ func (ec *executionContext) ___Directive_locations(ctx context.Context, field gr Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Locations, nil @@ -1089,18 +1087,18 @@ func (ec *executionContext) ___Directive_locations(ctx context.Context, field gr return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.([]string) - rctx.Result = res + fc.Result = res return ec.marshalN__DirectiveLocation2ᚕstring(ctx, field.Selections, res) } func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Directive", Field: field, Args: nil, @@ -1108,14 +1106,14 @@ func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Args, nil @@ -1125,18 +1123,18 @@ func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.([]introspection.InputValue) - rctx.Result = res + fc.Result = res return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx, field.Selections, res) } func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__EnumValue", Field: field, Args: nil, @@ -1144,14 +1142,14 @@ func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Name, nil @@ -1161,18 +1159,18 @@ func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalNString2string(ctx, field.Selections, res) } func (ec *executionContext) ___EnumValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__EnumValue", Field: field, Args: nil, @@ -1180,14 +1178,14 @@ func (ec *executionContext) ___EnumValue_description(ctx context.Context, field Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Description, nil @@ -1200,12 +1198,12 @@ func (ec *executionContext) ___EnumValue_description(ctx context.Context, field return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalOString2string(ctx, field.Selections, res) } func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__EnumValue", Field: field, Args: nil, @@ -1213,14 +1211,14 @@ func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.IsDeprecated(), nil @@ -1230,18 +1228,18 @@ func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(bool) - rctx.Result = res + fc.Result = res return ec.marshalNBoolean2bool(ctx, field.Selections, res) } func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__EnumValue", Field: field, Args: nil, @@ -1249,14 +1247,14 @@ func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.DeprecationReason(), nil @@ -1269,12 +1267,12 @@ func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, return graphql.Null } res := resTmp.(*string) - rctx.Result = res + fc.Result = res return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Field", Field: field, Args: nil, @@ -1282,14 +1280,14 @@ func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.Col Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Name, nil @@ -1299,18 +1297,18 @@ func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.Col return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalNString2string(ctx, field.Selections, res) } func (ec *executionContext) ___Field_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Field", Field: field, Args: nil, @@ -1318,14 +1316,14 @@ func (ec *executionContext) ___Field_description(ctx context.Context, field grap Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Description, nil @@ -1338,12 +1336,12 @@ func (ec *executionContext) ___Field_description(ctx context.Context, field grap return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalOString2string(ctx, field.Selections, res) } func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Field", Field: field, Args: nil, @@ -1351,14 +1349,14 @@ func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.Col Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Args, nil @@ -1368,18 +1366,18 @@ func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.Col return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.([]introspection.InputValue) - rctx.Result = res + fc.Result = res return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx, field.Selections, res) } func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Field", Field: field, Args: nil, @@ -1387,14 +1385,14 @@ func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.Col Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Type, nil @@ -1404,18 +1402,18 @@ func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.Col return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(*introspection.Type) - rctx.Result = res + fc.Result = res return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Field", Field: field, Args: nil, @@ -1423,14 +1421,14 @@ func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field gra Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.IsDeprecated(), nil @@ -1440,18 +1438,18 @@ func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field gra return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(bool) - rctx.Result = res + fc.Result = res return ec.marshalNBoolean2bool(ctx, field.Selections, res) } func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Field", Field: field, Args: nil, @@ -1459,14 +1457,14 @@ func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, fiel Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.DeprecationReason(), nil @@ -1479,12 +1477,12 @@ func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, fiel return graphql.Null } res := resTmp.(*string) - rctx.Result = res + fc.Result = res return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__InputValue", Field: field, Args: nil, @@ -1492,14 +1490,14 @@ func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphq Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Name, nil @@ -1509,18 +1507,18 @@ func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphq return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalNString2string(ctx, field.Selections, res) } func (ec *executionContext) ___InputValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__InputValue", Field: field, Args: nil, @@ -1528,14 +1526,14 @@ func (ec *executionContext) ___InputValue_description(ctx context.Context, field Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Description, nil @@ -1548,12 +1546,12 @@ func (ec *executionContext) ___InputValue_description(ctx context.Context, field return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalOString2string(ctx, field.Selections, res) } func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__InputValue", Field: field, Args: nil, @@ -1561,14 +1559,14 @@ func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphq Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Type, nil @@ -1578,18 +1576,18 @@ func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphq return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(*introspection.Type) - rctx.Result = res + fc.Result = res return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__InputValue", Field: field, Args: nil, @@ -1597,14 +1595,14 @@ func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, fiel Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.DefaultValue, nil @@ -1617,12 +1615,12 @@ func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, fiel return graphql.Null } res := resTmp.(*string) - rctx.Result = res + fc.Result = res return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Schema", Field: field, Args: nil, @@ -1630,14 +1628,14 @@ func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.C Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Types(), nil @@ -1647,18 +1645,18 @@ func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.C return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.([]introspection.Type) - rctx.Result = res + fc.Result = res return ec.marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Schema", Field: field, Args: nil, @@ -1666,14 +1664,14 @@ func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graph Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.QueryType(), nil @@ -1683,18 +1681,18 @@ func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graph return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(*introspection.Type) - rctx.Result = res + fc.Result = res return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Schema", Field: field, Args: nil, @@ -1702,14 +1700,14 @@ func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field gr Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.MutationType(), nil @@ -1722,12 +1720,12 @@ func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field gr return graphql.Null } res := resTmp.(*introspection.Type) - rctx.Result = res + fc.Result = res return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Schema", Field: field, Args: nil, @@ -1735,14 +1733,14 @@ func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, fiel Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.SubscriptionType(), nil @@ -1755,12 +1753,12 @@ func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, fiel return graphql.Null } res := resTmp.(*introspection.Type) - rctx.Result = res + fc.Result = res return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) ___Schema_directives(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Schema", Field: field, Args: nil, @@ -1768,14 +1766,14 @@ func (ec *executionContext) ___Schema_directives(ctx context.Context, field grap Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Directives(), nil @@ -1785,18 +1783,18 @@ func (ec *executionContext) ___Schema_directives(ctx context.Context, field grap return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.([]introspection.Directive) - rctx.Result = res + fc.Result = res return ec.marshalN__Directive2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirective(ctx, field.Selections, res) } func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, @@ -1804,14 +1802,14 @@ func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.Coll Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Kind(), nil @@ -1821,18 +1819,18 @@ func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.Coll return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalN__TypeKind2string(ctx, field.Selections, res) } func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, @@ -1840,14 +1838,14 @@ func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.Coll Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Name(), nil @@ -1860,12 +1858,12 @@ func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.Coll return graphql.Null } res := resTmp.(*string) - rctx.Result = res + fc.Result = res return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } func (ec *executionContext) ___Type_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, @@ -1873,14 +1871,14 @@ func (ec *executionContext) ___Type_description(ctx context.Context, field graph Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Description(), nil @@ -1893,12 +1891,12 @@ func (ec *executionContext) ___Type_description(ctx context.Context, field graph return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalOString2string(ctx, field.Selections, res) } func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, @@ -1906,21 +1904,21 @@ func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.Co Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) + ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field___Type_fields_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } - rctx.Args = args - rctx.Stats.ArgumentsCompleted = graphql.Now() + fc.Args = args + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Fields(args["includeDeprecated"].(bool)), nil @@ -1933,12 +1931,12 @@ func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.Co return graphql.Null } res := resTmp.([]introspection.Field) - rctx.Result = res + fc.Result = res return ec.marshalO__Field2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐField(ctx, field.Selections, res) } func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, @@ -1946,14 +1944,14 @@ func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphq Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Interfaces(), nil @@ -1966,12 +1964,12 @@ func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphq return graphql.Null } res := resTmp.([]introspection.Type) - rctx.Result = res + fc.Result = res return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, @@ -1979,14 +1977,14 @@ func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field gra Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.PossibleTypes(), nil @@ -1999,12 +1997,12 @@ func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field gra return graphql.Null } res := resTmp.([]introspection.Type) - rctx.Result = res + fc.Result = res return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, @@ -2012,21 +2010,21 @@ func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphq Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) + ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field___Type_enumValues_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } - rctx.Args = args - rctx.Stats.ArgumentsCompleted = graphql.Now() + fc.Args = args + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.EnumValues(args["includeDeprecated"].(bool)), nil @@ -2039,12 +2037,12 @@ func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphq return graphql.Null } res := resTmp.([]introspection.EnumValue) - rctx.Result = res + fc.Result = res return ec.marshalO__EnumValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValue(ctx, field.Selections, res) } func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, @@ -2052,14 +2050,14 @@ func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graph Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.InputFields(), nil @@ -2072,12 +2070,12 @@ func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graph return graphql.Null } res := resTmp.([]introspection.InputValue) - rctx.Result = res + fc.Result = res return ec.marshalO__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx, field.Selections, res) } func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, @@ -2085,14 +2083,14 @@ func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.Co Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.OfType(), nil @@ -2105,7 +2103,7 @@ func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.Co return graphql.Null } res := resTmp.(*introspection.Type) - rctx.Result = res + fc.Result = res return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } @@ -2292,8 +2290,9 @@ var queryImplementors = []string{"Query"} func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, queryImplementors) - ctx = graphql.WithResolverContext(ctx, &graphql.ResolverContext{ + ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{ Object: "Query", + Stats: graphql.FieldStats{Started: graphql.Now()}, }) out := graphql.NewFieldSet(fields) @@ -2602,7 +2601,7 @@ func (ec *executionContext) unmarshalNBoolean2bool(ctx context.Context, v interf func (ec *executionContext) marshalNBoolean2bool(ctx context.Context, sel ast.SelectionSet, v bool) graphql.Marshaler { res := graphql.MarshalBoolean(v) if res == graphql.Null { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } } @@ -2615,7 +2614,7 @@ func (ec *executionContext) marshalNCustomer2githubᚗcomᚋ99designsᚋgqlgen func (ec *executionContext) marshalNCustomer2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋdataloaderᚐCustomer(ctx context.Context, sel ast.SelectionSet, v *Customer) graphql.Marshaler { if v == nil { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } return graphql.Null @@ -2630,7 +2629,7 @@ func (ec *executionContext) unmarshalNFloat2float64(ctx context.Context, v inter func (ec *executionContext) marshalNFloat2float64(ctx context.Context, sel ast.SelectionSet, v float64) graphql.Marshaler { res := graphql.MarshalFloat(v) if res == graphql.Null { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } } @@ -2644,7 +2643,7 @@ func (ec *executionContext) unmarshalNInt2int(ctx context.Context, v interface{} func (ec *executionContext) marshalNInt2int(ctx context.Context, sel ast.SelectionSet, v int) graphql.Marshaler { res := graphql.MarshalInt(v) if res == graphql.Null { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } } @@ -2657,7 +2656,7 @@ func (ec *executionContext) marshalNItem2githubᚗcomᚋ99designsᚋgqlgenᚋexa func (ec *executionContext) marshalNItem2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋdataloaderᚐItem(ctx context.Context, sel ast.SelectionSet, v *Item) graphql.Marshaler { if v == nil { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } return graphql.Null @@ -2671,7 +2670,7 @@ func (ec *executionContext) marshalNOrder2githubᚗcomᚋ99designsᚋgqlgenᚋex func (ec *executionContext) marshalNOrder2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋdataloaderᚐOrder(ctx context.Context, sel ast.SelectionSet, v *Order) graphql.Marshaler { if v == nil { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } return graphql.Null @@ -2686,7 +2685,7 @@ func (ec *executionContext) unmarshalNString2string(ctx context.Context, v inter func (ec *executionContext) marshalNString2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { res := graphql.MarshalString(v) if res == graphql.Null { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } } @@ -2700,7 +2699,7 @@ func (ec *executionContext) unmarshalNTime2timeᚐTime(ctx context.Context, v in func (ec *executionContext) marshalNTime2timeᚐTime(ctx context.Context, sel ast.SelectionSet, v time.Time) graphql.Marshaler { res := graphql.MarshalTime(v) if res == graphql.Null { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } } @@ -2720,11 +2719,12 @@ func (ec *executionContext) marshalN__Directive2ᚕgithubᚗcomᚋ99designsᚋgq } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -2755,7 +2755,7 @@ func (ec *executionContext) unmarshalN__DirectiveLocation2string(ctx context.Con func (ec *executionContext) marshalN__DirectiveLocation2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { res := graphql.MarshalString(v) if res == graphql.Null { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } } @@ -2791,11 +2791,12 @@ func (ec *executionContext) marshalN__DirectiveLocation2ᚕstring(ctx context.Co } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -2840,11 +2841,12 @@ func (ec *executionContext) marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋg } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -2881,11 +2883,12 @@ func (ec *executionContext) marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgen } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -2911,7 +2914,7 @@ func (ec *executionContext) marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgen func (ec *executionContext) marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v *introspection.Type) graphql.Marshaler { if v == nil { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } return graphql.Null @@ -2926,7 +2929,7 @@ func (ec *executionContext) unmarshalN__TypeKind2string(ctx context.Context, v i func (ec *executionContext) marshalN__TypeKind2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { res := graphql.MarshalString(v) if res == graphql.Null { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } } @@ -2979,11 +2982,12 @@ func (ec *executionContext) marshalOCustomer2ᚕᚕᚖgithubᚗcomᚋ99designs } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -3019,11 +3023,12 @@ func (ec *executionContext) marshalOCustomer2ᚕᚖgithubᚗcomᚋ99designsᚋgq } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -3123,11 +3128,12 @@ func (ec *executionContext) marshalOItem2ᚕᚖgithubᚗcomᚋ99designsᚋgqlgen } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -3163,11 +3169,12 @@ func (ec *executionContext) marshalOOrder2ᚕᚖgithubᚗcomᚋ99designsᚋgqlge } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -3226,11 +3233,12 @@ func (ec *executionContext) marshalO__EnumValue2ᚕgithubᚗcomᚋ99designsᚋgq } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -3266,11 +3274,12 @@ func (ec *executionContext) marshalO__Field2ᚕgithubᚗcomᚋ99designsᚋgqlgen } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -3306,11 +3315,12 @@ func (ec *executionContext) marshalO__InputValue2ᚕgithubᚗcomᚋ99designsᚋg } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -3361,11 +3371,12 @@ func (ec *executionContext) marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgen } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { diff --git a/example/fileupload/generated.go b/example/fileupload/generated.go index 508239c88c0..221b473e638 100644 --- a/example/fileupload/generated.go +++ b/example/fileupload/generated.go @@ -1,5 +1,3 @@ -// Code generated by github.com/99designs/gqlgen, DO NOT EDIT. - package fileupload import ( @@ -369,7 +367,7 @@ func (ec *executionContext) field___Type_fields_args(ctx context.Context, rawArg // region **************************** field.gotpl ***************************** func (ec *executionContext) _File_id(ctx context.Context, field graphql.CollectedField, obj *model.File) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "File", Field: field, Args: nil, @@ -377,14 +375,14 @@ func (ec *executionContext) _File_id(ctx context.Context, field graphql.Collecte Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.ID, nil @@ -394,18 +392,18 @@ func (ec *executionContext) _File_id(ctx context.Context, field graphql.Collecte return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(int) - rctx.Result = res + fc.Result = res return ec.marshalNInt2int(ctx, field.Selections, res) } func (ec *executionContext) _File_name(ctx context.Context, field graphql.CollectedField, obj *model.File) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "File", Field: field, Args: nil, @@ -413,14 +411,14 @@ func (ec *executionContext) _File_name(ctx context.Context, field graphql.Collec Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Name, nil @@ -430,18 +428,18 @@ func (ec *executionContext) _File_name(ctx context.Context, field graphql.Collec return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalNString2string(ctx, field.Selections, res) } func (ec *executionContext) _File_content(ctx context.Context, field graphql.CollectedField, obj *model.File) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "File", Field: field, Args: nil, @@ -449,14 +447,14 @@ func (ec *executionContext) _File_content(ctx context.Context, field graphql.Col Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Content, nil @@ -466,18 +464,18 @@ func (ec *executionContext) _File_content(ctx context.Context, field graphql.Col return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalNString2string(ctx, field.Selections, res) } func (ec *executionContext) _Mutation_singleUpload(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Mutation", Field: field, Args: nil, @@ -485,21 +483,21 @@ func (ec *executionContext) _Mutation_singleUpload(ctx context.Context, field gr Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) + ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field_Mutation_singleUpload_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } - rctx.Args = args - rctx.Stats.ArgumentsCompleted = graphql.Now() + fc.Args = args + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().SingleUpload(rctx, args["file"].(graphql.Upload)) @@ -509,18 +507,18 @@ func (ec *executionContext) _Mutation_singleUpload(ctx context.Context, field gr return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(*model.File) - rctx.Result = res + fc.Result = res return ec.marshalNFile2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋfileuploadᚋmodelᚐFile(ctx, field.Selections, res) } func (ec *executionContext) _Mutation_singleUploadWithPayload(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Mutation", Field: field, Args: nil, @@ -528,21 +526,21 @@ func (ec *executionContext) _Mutation_singleUploadWithPayload(ctx context.Contex Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) + ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field_Mutation_singleUploadWithPayload_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } - rctx.Args = args - rctx.Stats.ArgumentsCompleted = graphql.Now() + fc.Args = args + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().SingleUploadWithPayload(rctx, args["req"].(model.UploadFile)) @@ -552,18 +550,18 @@ func (ec *executionContext) _Mutation_singleUploadWithPayload(ctx context.Contex return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(*model.File) - rctx.Result = res + fc.Result = res return ec.marshalNFile2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋfileuploadᚋmodelᚐFile(ctx, field.Selections, res) } func (ec *executionContext) _Mutation_multipleUpload(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Mutation", Field: field, Args: nil, @@ -571,21 +569,21 @@ func (ec *executionContext) _Mutation_multipleUpload(ctx context.Context, field Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) + ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field_Mutation_multipleUpload_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } - rctx.Args = args - rctx.Stats.ArgumentsCompleted = graphql.Now() + fc.Args = args + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().MultipleUpload(rctx, args["files"].([]*graphql.Upload)) @@ -595,18 +593,18 @@ func (ec *executionContext) _Mutation_multipleUpload(ctx context.Context, field return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.([]*model.File) - rctx.Result = res + fc.Result = res return ec.marshalNFile2ᚕᚖgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋfileuploadᚋmodelᚐFile(ctx, field.Selections, res) } func (ec *executionContext) _Mutation_multipleUploadWithPayload(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Mutation", Field: field, Args: nil, @@ -614,21 +612,21 @@ func (ec *executionContext) _Mutation_multipleUploadWithPayload(ctx context.Cont Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) + ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field_Mutation_multipleUploadWithPayload_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } - rctx.Args = args - rctx.Stats.ArgumentsCompleted = graphql.Now() + fc.Args = args + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().MultipleUploadWithPayload(rctx, args["req"].([]*model.UploadFile)) @@ -638,18 +636,18 @@ func (ec *executionContext) _Mutation_multipleUploadWithPayload(ctx context.Cont return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.([]*model.File) - rctx.Result = res + fc.Result = res return ec.marshalNFile2ᚕᚖgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋfileuploadᚋmodelᚐFile(ctx, field.Selections, res) } func (ec *executionContext) _Query_empty(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Query", Field: field, Args: nil, @@ -657,14 +655,14 @@ func (ec *executionContext) _Query_empty(ctx context.Context, field graphql.Coll Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().Empty(rctx) @@ -674,18 +672,18 @@ func (ec *executionContext) _Query_empty(ctx context.Context, field graphql.Coll return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalNString2string(ctx, field.Selections, res) } func (ec *executionContext) _Query___type(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Query", Field: field, Args: nil, @@ -693,21 +691,21 @@ func (ec *executionContext) _Query___type(ctx context.Context, field graphql.Col Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) + ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field_Query___type_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } - rctx.Args = args - rctx.Stats.ArgumentsCompleted = graphql.Now() + fc.Args = args + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.introspectType(args["name"].(string)) @@ -720,12 +718,12 @@ func (ec *executionContext) _Query___type(ctx context.Context, field graphql.Col return graphql.Null } res := resTmp.(*introspection.Type) - rctx.Result = res + fc.Result = res return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Query", Field: field, Args: nil, @@ -733,14 +731,14 @@ func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.C Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.introspectSchema() @@ -753,12 +751,12 @@ func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.C return graphql.Null } res := resTmp.(*introspection.Schema) - rctx.Result = res + fc.Result = res return ec.marshalO__Schema2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐSchema(ctx, field.Selections, res) } func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Directive", Field: field, Args: nil, @@ -766,14 +764,14 @@ func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Name, nil @@ -783,18 +781,18 @@ func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalNString2string(ctx, field.Selections, res) } func (ec *executionContext) ___Directive_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Directive", Field: field, Args: nil, @@ -802,14 +800,14 @@ func (ec *executionContext) ___Directive_description(ctx context.Context, field Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Description, nil @@ -822,12 +820,12 @@ func (ec *executionContext) ___Directive_description(ctx context.Context, field return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalOString2string(ctx, field.Selections, res) } func (ec *executionContext) ___Directive_locations(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Directive", Field: field, Args: nil, @@ -835,14 +833,14 @@ func (ec *executionContext) ___Directive_locations(ctx context.Context, field gr Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Locations, nil @@ -852,18 +850,18 @@ func (ec *executionContext) ___Directive_locations(ctx context.Context, field gr return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.([]string) - rctx.Result = res + fc.Result = res return ec.marshalN__DirectiveLocation2ᚕstring(ctx, field.Selections, res) } func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Directive", Field: field, Args: nil, @@ -871,14 +869,14 @@ func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Args, nil @@ -888,18 +886,18 @@ func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.([]introspection.InputValue) - rctx.Result = res + fc.Result = res return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx, field.Selections, res) } func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__EnumValue", Field: field, Args: nil, @@ -907,14 +905,14 @@ func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Name, nil @@ -924,18 +922,18 @@ func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalNString2string(ctx, field.Selections, res) } func (ec *executionContext) ___EnumValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__EnumValue", Field: field, Args: nil, @@ -943,14 +941,14 @@ func (ec *executionContext) ___EnumValue_description(ctx context.Context, field Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Description, nil @@ -963,12 +961,12 @@ func (ec *executionContext) ___EnumValue_description(ctx context.Context, field return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalOString2string(ctx, field.Selections, res) } func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__EnumValue", Field: field, Args: nil, @@ -976,14 +974,14 @@ func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.IsDeprecated(), nil @@ -993,18 +991,18 @@ func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(bool) - rctx.Result = res + fc.Result = res return ec.marshalNBoolean2bool(ctx, field.Selections, res) } func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__EnumValue", Field: field, Args: nil, @@ -1012,14 +1010,14 @@ func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.DeprecationReason(), nil @@ -1032,12 +1030,12 @@ func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, return graphql.Null } res := resTmp.(*string) - rctx.Result = res + fc.Result = res return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Field", Field: field, Args: nil, @@ -1045,14 +1043,14 @@ func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.Col Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Name, nil @@ -1062,18 +1060,18 @@ func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.Col return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalNString2string(ctx, field.Selections, res) } func (ec *executionContext) ___Field_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Field", Field: field, Args: nil, @@ -1081,14 +1079,14 @@ func (ec *executionContext) ___Field_description(ctx context.Context, field grap Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Description, nil @@ -1101,12 +1099,12 @@ func (ec *executionContext) ___Field_description(ctx context.Context, field grap return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalOString2string(ctx, field.Selections, res) } func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Field", Field: field, Args: nil, @@ -1114,14 +1112,14 @@ func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.Col Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Args, nil @@ -1131,18 +1129,18 @@ func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.Col return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.([]introspection.InputValue) - rctx.Result = res + fc.Result = res return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx, field.Selections, res) } func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Field", Field: field, Args: nil, @@ -1150,14 +1148,14 @@ func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.Col Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Type, nil @@ -1167,18 +1165,18 @@ func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.Col return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(*introspection.Type) - rctx.Result = res + fc.Result = res return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Field", Field: field, Args: nil, @@ -1186,14 +1184,14 @@ func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field gra Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.IsDeprecated(), nil @@ -1203,18 +1201,18 @@ func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field gra return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(bool) - rctx.Result = res + fc.Result = res return ec.marshalNBoolean2bool(ctx, field.Selections, res) } func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Field", Field: field, Args: nil, @@ -1222,14 +1220,14 @@ func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, fiel Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.DeprecationReason(), nil @@ -1242,12 +1240,12 @@ func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, fiel return graphql.Null } res := resTmp.(*string) - rctx.Result = res + fc.Result = res return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__InputValue", Field: field, Args: nil, @@ -1255,14 +1253,14 @@ func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphq Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Name, nil @@ -1272,18 +1270,18 @@ func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphq return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalNString2string(ctx, field.Selections, res) } func (ec *executionContext) ___InputValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__InputValue", Field: field, Args: nil, @@ -1291,14 +1289,14 @@ func (ec *executionContext) ___InputValue_description(ctx context.Context, field Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Description, nil @@ -1311,12 +1309,12 @@ func (ec *executionContext) ___InputValue_description(ctx context.Context, field return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalOString2string(ctx, field.Selections, res) } func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__InputValue", Field: field, Args: nil, @@ -1324,14 +1322,14 @@ func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphq Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Type, nil @@ -1341,18 +1339,18 @@ func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphq return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(*introspection.Type) - rctx.Result = res + fc.Result = res return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__InputValue", Field: field, Args: nil, @@ -1360,14 +1358,14 @@ func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, fiel Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.DefaultValue, nil @@ -1380,12 +1378,12 @@ func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, fiel return graphql.Null } res := resTmp.(*string) - rctx.Result = res + fc.Result = res return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Schema", Field: field, Args: nil, @@ -1393,14 +1391,14 @@ func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.C Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Types(), nil @@ -1410,18 +1408,18 @@ func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.C return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.([]introspection.Type) - rctx.Result = res + fc.Result = res return ec.marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Schema", Field: field, Args: nil, @@ -1429,14 +1427,14 @@ func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graph Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.QueryType(), nil @@ -1446,18 +1444,18 @@ func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graph return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(*introspection.Type) - rctx.Result = res + fc.Result = res return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Schema", Field: field, Args: nil, @@ -1465,14 +1463,14 @@ func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field gr Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.MutationType(), nil @@ -1485,12 +1483,12 @@ func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field gr return graphql.Null } res := resTmp.(*introspection.Type) - rctx.Result = res + fc.Result = res return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Schema", Field: field, Args: nil, @@ -1498,14 +1496,14 @@ func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, fiel Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.SubscriptionType(), nil @@ -1518,12 +1516,12 @@ func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, fiel return graphql.Null } res := resTmp.(*introspection.Type) - rctx.Result = res + fc.Result = res return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) ___Schema_directives(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Schema", Field: field, Args: nil, @@ -1531,14 +1529,14 @@ func (ec *executionContext) ___Schema_directives(ctx context.Context, field grap Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Directives(), nil @@ -1548,18 +1546,18 @@ func (ec *executionContext) ___Schema_directives(ctx context.Context, field grap return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.([]introspection.Directive) - rctx.Result = res + fc.Result = res return ec.marshalN__Directive2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirective(ctx, field.Selections, res) } func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, @@ -1567,14 +1565,14 @@ func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.Coll Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Kind(), nil @@ -1584,18 +1582,18 @@ func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.Coll return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalN__TypeKind2string(ctx, field.Selections, res) } func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, @@ -1603,14 +1601,14 @@ func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.Coll Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Name(), nil @@ -1623,12 +1621,12 @@ func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.Coll return graphql.Null } res := resTmp.(*string) - rctx.Result = res + fc.Result = res return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } func (ec *executionContext) ___Type_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, @@ -1636,14 +1634,14 @@ func (ec *executionContext) ___Type_description(ctx context.Context, field graph Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Description(), nil @@ -1656,12 +1654,12 @@ func (ec *executionContext) ___Type_description(ctx context.Context, field graph return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalOString2string(ctx, field.Selections, res) } func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, @@ -1669,21 +1667,21 @@ func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.Co Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) + ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field___Type_fields_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } - rctx.Args = args - rctx.Stats.ArgumentsCompleted = graphql.Now() + fc.Args = args + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Fields(args["includeDeprecated"].(bool)), nil @@ -1696,12 +1694,12 @@ func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.Co return graphql.Null } res := resTmp.([]introspection.Field) - rctx.Result = res + fc.Result = res return ec.marshalO__Field2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐField(ctx, field.Selections, res) } func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, @@ -1709,14 +1707,14 @@ func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphq Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Interfaces(), nil @@ -1729,12 +1727,12 @@ func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphq return graphql.Null } res := resTmp.([]introspection.Type) - rctx.Result = res + fc.Result = res return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, @@ -1742,14 +1740,14 @@ func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field gra Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.PossibleTypes(), nil @@ -1762,12 +1760,12 @@ func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field gra return graphql.Null } res := resTmp.([]introspection.Type) - rctx.Result = res + fc.Result = res return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, @@ -1775,21 +1773,21 @@ func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphq Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) + ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field___Type_enumValues_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } - rctx.Args = args - rctx.Stats.ArgumentsCompleted = graphql.Now() + fc.Args = args + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.EnumValues(args["includeDeprecated"].(bool)), nil @@ -1802,12 +1800,12 @@ func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphq return graphql.Null } res := resTmp.([]introspection.EnumValue) - rctx.Result = res + fc.Result = res return ec.marshalO__EnumValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValue(ctx, field.Selections, res) } func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, @@ -1815,14 +1813,14 @@ func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graph Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.InputFields(), nil @@ -1835,12 +1833,12 @@ func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graph return graphql.Null } res := resTmp.([]introspection.InputValue) - rctx.Result = res + fc.Result = res return ec.marshalO__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx, field.Selections, res) } func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, @@ -1848,14 +1846,14 @@ func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.Co Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.OfType(), nil @@ -1868,7 +1866,7 @@ func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.Co return graphql.Null } res := resTmp.(*introspection.Type) - rctx.Result = res + fc.Result = res return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } @@ -1950,8 +1948,9 @@ var mutationImplementors = []string{"Mutation"} func (ec *executionContext) _Mutation(ctx context.Context, sel ast.SelectionSet) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, mutationImplementors) - ctx = graphql.WithResolverContext(ctx, &graphql.ResolverContext{ + ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{ Object: "Mutation", + Stats: graphql.FieldStats{Started: graphql.Now()}, }) out := graphql.NewFieldSet(fields) @@ -1996,8 +1995,9 @@ var queryImplementors = []string{"Query"} func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, queryImplementors) - ctx = graphql.WithResolverContext(ctx, &graphql.ResolverContext{ + ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{ Object: "Query", + Stats: graphql.FieldStats{Started: graphql.Now()}, }) out := graphql.NewFieldSet(fields) @@ -2287,7 +2287,7 @@ func (ec *executionContext) unmarshalNBoolean2bool(ctx context.Context, v interf func (ec *executionContext) marshalNBoolean2bool(ctx context.Context, sel ast.SelectionSet, v bool) graphql.Marshaler { res := graphql.MarshalBoolean(v) if res == graphql.Null { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } } @@ -2307,11 +2307,12 @@ func (ec *executionContext) marshalNFile2ᚕᚖgithubᚗcomᚋ99designsᚋgqlgen } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -2337,7 +2338,7 @@ func (ec *executionContext) marshalNFile2ᚕᚖgithubᚗcomᚋ99designsᚋgqlgen func (ec *executionContext) marshalNFile2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋfileuploadᚋmodelᚐFile(ctx context.Context, sel ast.SelectionSet, v *model.File) graphql.Marshaler { if v == nil { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } return graphql.Null @@ -2352,7 +2353,7 @@ func (ec *executionContext) unmarshalNInt2int(ctx context.Context, v interface{} func (ec *executionContext) marshalNInt2int(ctx context.Context, sel ast.SelectionSet, v int) graphql.Marshaler { res := graphql.MarshalInt(v) if res == graphql.Null { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } } @@ -2366,7 +2367,7 @@ func (ec *executionContext) unmarshalNString2string(ctx context.Context, v inter func (ec *executionContext) marshalNString2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { res := graphql.MarshalString(v) if res == graphql.Null { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } } @@ -2380,7 +2381,7 @@ func (ec *executionContext) unmarshalNUpload2githubᚗcomᚋ99designsᚋgqlgen func (ec *executionContext) marshalNUpload2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚐUpload(ctx context.Context, sel ast.SelectionSet, v graphql.Upload) graphql.Marshaler { res := graphql.MarshalUpload(v) if res == graphql.Null { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } } @@ -2426,7 +2427,7 @@ func (ec *executionContext) unmarshalNUpload2ᚖgithubᚗcomᚋ99designsᚋgqlge func (ec *executionContext) marshalNUpload2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚐUpload(ctx context.Context, sel ast.SelectionSet, v *graphql.Upload) graphql.Marshaler { if v == nil { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } return graphql.Null @@ -2479,11 +2480,12 @@ func (ec *executionContext) marshalN__Directive2ᚕgithubᚗcomᚋ99designsᚋgq } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -2514,7 +2516,7 @@ func (ec *executionContext) unmarshalN__DirectiveLocation2string(ctx context.Con func (ec *executionContext) marshalN__DirectiveLocation2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { res := graphql.MarshalString(v) if res == graphql.Null { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } } @@ -2550,11 +2552,12 @@ func (ec *executionContext) marshalN__DirectiveLocation2ᚕstring(ctx context.Co } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -2599,11 +2602,12 @@ func (ec *executionContext) marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋg } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -2640,11 +2644,12 @@ func (ec *executionContext) marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgen } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -2670,7 +2675,7 @@ func (ec *executionContext) marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgen func (ec *executionContext) marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v *introspection.Type) graphql.Marshaler { if v == nil { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } return graphql.Null @@ -2685,7 +2690,7 @@ func (ec *executionContext) unmarshalN__TypeKind2string(ctx context.Context, v i func (ec *executionContext) marshalN__TypeKind2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { res := graphql.MarshalString(v) if res == graphql.Null { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } } @@ -2750,11 +2755,12 @@ func (ec *executionContext) marshalO__EnumValue2ᚕgithubᚗcomᚋ99designsᚋgq } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -2790,11 +2796,12 @@ func (ec *executionContext) marshalO__Field2ᚕgithubᚗcomᚋ99designsᚋgqlgen } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -2830,11 +2837,12 @@ func (ec *executionContext) marshalO__InputValue2ᚕgithubᚗcomᚋ99designsᚋg } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -2885,11 +2893,12 @@ func (ec *executionContext) marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgen } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { diff --git a/example/scalars/generated.go b/example/scalars/generated.go index 9c78136c4de..4f735596fd3 100644 --- a/example/scalars/generated.go +++ b/example/scalars/generated.go @@ -1,5 +1,3 @@ -// Code generated by github.com/99designs/gqlgen, DO NOT EDIT. - package scalars import ( @@ -357,7 +355,7 @@ func (ec *executionContext) field___Type_fields_args(ctx context.Context, rawArg // region **************************** field.gotpl ***************************** func (ec *executionContext) _Address_id(ctx context.Context, field graphql.CollectedField, obj *model.Address) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Address", Field: field, Args: nil, @@ -365,14 +363,14 @@ func (ec *executionContext) _Address_id(ctx context.Context, field graphql.Colle Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.ID, nil @@ -382,18 +380,18 @@ func (ec *executionContext) _Address_id(ctx context.Context, field graphql.Colle return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(external.ObjectID) - rctx.Result = res + fc.Result = res return ec.marshalNID2githubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋscalarsᚋexternalᚐObjectID(ctx, field.Selections, res) } func (ec *executionContext) _Address_location(ctx context.Context, field graphql.CollectedField, obj *model.Address) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Address", Field: field, Args: nil, @@ -401,14 +399,14 @@ func (ec *executionContext) _Address_location(ctx context.Context, field graphql Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Location, nil @@ -421,12 +419,12 @@ func (ec *executionContext) _Address_location(ctx context.Context, field graphql return graphql.Null } res := resTmp.(*model.Point) - rctx.Result = res + fc.Result = res return ec.marshalOPoint2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋscalarsᚋmodelᚐPoint(ctx, field.Selections, res) } func (ec *executionContext) _Query_user(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Query", Field: field, Args: nil, @@ -434,21 +432,21 @@ func (ec *executionContext) _Query_user(ctx context.Context, field graphql.Colle Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) + ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field_Query_user_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } - rctx.Args = args - rctx.Stats.ArgumentsCompleted = graphql.Now() + fc.Args = args + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().User(rctx, args["id"].(external.ObjectID)) @@ -461,12 +459,12 @@ func (ec *executionContext) _Query_user(ctx context.Context, field graphql.Colle return graphql.Null } res := resTmp.(*model.User) - rctx.Result = res + fc.Result = res return ec.marshalOUser2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋscalarsᚋmodelᚐUser(ctx, field.Selections, res) } func (ec *executionContext) _Query_search(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Query", Field: field, Args: nil, @@ -474,21 +472,21 @@ func (ec *executionContext) _Query_search(ctx context.Context, field graphql.Col Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) + ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field_Query_search_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } - rctx.Args = args - rctx.Stats.ArgumentsCompleted = graphql.Now() + fc.Args = args + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().Search(rctx, args["input"].(*model.SearchArgs)) @@ -498,18 +496,18 @@ func (ec *executionContext) _Query_search(ctx context.Context, field graphql.Col return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.([]*model.User) - rctx.Result = res + fc.Result = res return ec.marshalNUser2ᚕᚖgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋscalarsᚋmodelᚐUser(ctx, field.Selections, res) } func (ec *executionContext) _Query___type(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Query", Field: field, Args: nil, @@ -517,21 +515,21 @@ func (ec *executionContext) _Query___type(ctx context.Context, field graphql.Col Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) + ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field_Query___type_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } - rctx.Args = args - rctx.Stats.ArgumentsCompleted = graphql.Now() + fc.Args = args + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.introspectType(args["name"].(string)) @@ -544,12 +542,12 @@ func (ec *executionContext) _Query___type(ctx context.Context, field graphql.Col return graphql.Null } res := resTmp.(*introspection.Type) - rctx.Result = res + fc.Result = res return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Query", Field: field, Args: nil, @@ -557,14 +555,14 @@ func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.C Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.introspectSchema() @@ -577,12 +575,12 @@ func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.C return graphql.Null } res := resTmp.(*introspection.Schema) - rctx.Result = res + fc.Result = res return ec.marshalO__Schema2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐSchema(ctx, field.Selections, res) } func (ec *executionContext) _User_id(ctx context.Context, field graphql.CollectedField, obj *model.User) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "User", Field: field, Args: nil, @@ -590,14 +588,14 @@ func (ec *executionContext) _User_id(ctx context.Context, field graphql.Collecte Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.ID, nil @@ -607,18 +605,18 @@ func (ec *executionContext) _User_id(ctx context.Context, field graphql.Collecte return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(external.ObjectID) - rctx.Result = res + fc.Result = res return ec.marshalNID2githubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋscalarsᚋexternalᚐObjectID(ctx, field.Selections, res) } func (ec *executionContext) _User_name(ctx context.Context, field graphql.CollectedField, obj *model.User) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "User", Field: field, Args: nil, @@ -626,14 +624,14 @@ func (ec *executionContext) _User_name(ctx context.Context, field graphql.Collec Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Name, nil @@ -643,18 +641,18 @@ func (ec *executionContext) _User_name(ctx context.Context, field graphql.Collec return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalNString2string(ctx, field.Selections, res) } func (ec *executionContext) _User_created(ctx context.Context, field graphql.CollectedField, obj *model.User) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "User", Field: field, Args: nil, @@ -662,14 +660,14 @@ func (ec *executionContext) _User_created(ctx context.Context, field graphql.Col Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Created, nil @@ -682,12 +680,12 @@ func (ec *executionContext) _User_created(ctx context.Context, field graphql.Col return graphql.Null } res := resTmp.(time.Time) - rctx.Result = res + fc.Result = res return ec.marshalOTimestamp2timeᚐTime(ctx, field.Selections, res) } func (ec *executionContext) _User_isBanned(ctx context.Context, field graphql.CollectedField, obj *model.User) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "User", Field: field, Args: nil, @@ -695,14 +693,14 @@ func (ec *executionContext) _User_isBanned(ctx context.Context, field graphql.Co Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.IsBanned, nil @@ -712,18 +710,18 @@ func (ec *executionContext) _User_isBanned(ctx context.Context, field graphql.Co return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(model.Banned) - rctx.Result = res + fc.Result = res return ec.marshalNBanned2githubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋscalarsᚋmodelᚐBanned(ctx, field.Selections, res) } func (ec *executionContext) _User_primitiveResolver(ctx context.Context, field graphql.CollectedField, obj *model.User) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "User", Field: field, Args: nil, @@ -731,14 +729,14 @@ func (ec *executionContext) _User_primitiveResolver(ctx context.Context, field g Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.User().PrimitiveResolver(rctx, obj) @@ -748,18 +746,18 @@ func (ec *executionContext) _User_primitiveResolver(ctx context.Context, field g return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalNString2string(ctx, field.Selections, res) } func (ec *executionContext) _User_customResolver(ctx context.Context, field graphql.CollectedField, obj *model.User) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "User", Field: field, Args: nil, @@ -767,14 +765,14 @@ func (ec *executionContext) _User_customResolver(ctx context.Context, field grap Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.User().CustomResolver(rctx, obj) @@ -784,18 +782,18 @@ func (ec *executionContext) _User_customResolver(ctx context.Context, field grap return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(*model.Point) - rctx.Result = res + fc.Result = res return ec.marshalNPoint2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋscalarsᚋmodelᚐPoint(ctx, field.Selections, res) } func (ec *executionContext) _User_address(ctx context.Context, field graphql.CollectedField, obj *model.User) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "User", Field: field, Args: nil, @@ -803,14 +801,14 @@ func (ec *executionContext) _User_address(ctx context.Context, field graphql.Col Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Address, nil @@ -823,12 +821,12 @@ func (ec *executionContext) _User_address(ctx context.Context, field graphql.Col return graphql.Null } res := resTmp.(model.Address) - rctx.Result = res + fc.Result = res return ec.marshalOAddress2githubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋscalarsᚋmodelᚐAddress(ctx, field.Selections, res) } func (ec *executionContext) _User_tier(ctx context.Context, field graphql.CollectedField, obj *model.User) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "User", Field: field, Args: nil, @@ -836,14 +834,14 @@ func (ec *executionContext) _User_tier(ctx context.Context, field graphql.Collec Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Tier, nil @@ -856,12 +854,12 @@ func (ec *executionContext) _User_tier(ctx context.Context, field graphql.Collec return graphql.Null } res := resTmp.(model.Tier) - rctx.Result = res + fc.Result = res return ec.marshalOTier2githubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋscalarsᚋmodelᚐTier(ctx, field.Selections, res) } func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Directive", Field: field, Args: nil, @@ -869,14 +867,14 @@ func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Name, nil @@ -886,18 +884,18 @@ func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalNString2string(ctx, field.Selections, res) } func (ec *executionContext) ___Directive_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Directive", Field: field, Args: nil, @@ -905,14 +903,14 @@ func (ec *executionContext) ___Directive_description(ctx context.Context, field Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Description, nil @@ -925,12 +923,12 @@ func (ec *executionContext) ___Directive_description(ctx context.Context, field return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalOString2string(ctx, field.Selections, res) } func (ec *executionContext) ___Directive_locations(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Directive", Field: field, Args: nil, @@ -938,14 +936,14 @@ func (ec *executionContext) ___Directive_locations(ctx context.Context, field gr Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Locations, nil @@ -955,18 +953,18 @@ func (ec *executionContext) ___Directive_locations(ctx context.Context, field gr return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.([]string) - rctx.Result = res + fc.Result = res return ec.marshalN__DirectiveLocation2ᚕstring(ctx, field.Selections, res) } func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Directive", Field: field, Args: nil, @@ -974,14 +972,14 @@ func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Args, nil @@ -991,18 +989,18 @@ func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.([]introspection.InputValue) - rctx.Result = res + fc.Result = res return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx, field.Selections, res) } func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__EnumValue", Field: field, Args: nil, @@ -1010,14 +1008,14 @@ func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Name, nil @@ -1027,18 +1025,18 @@ func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalNString2string(ctx, field.Selections, res) } func (ec *executionContext) ___EnumValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__EnumValue", Field: field, Args: nil, @@ -1046,14 +1044,14 @@ func (ec *executionContext) ___EnumValue_description(ctx context.Context, field Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Description, nil @@ -1066,12 +1064,12 @@ func (ec *executionContext) ___EnumValue_description(ctx context.Context, field return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalOString2string(ctx, field.Selections, res) } func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__EnumValue", Field: field, Args: nil, @@ -1079,14 +1077,14 @@ func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.IsDeprecated(), nil @@ -1096,18 +1094,18 @@ func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(bool) - rctx.Result = res + fc.Result = res return ec.marshalNBoolean2bool(ctx, field.Selections, res) } func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__EnumValue", Field: field, Args: nil, @@ -1115,14 +1113,14 @@ func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.DeprecationReason(), nil @@ -1135,12 +1133,12 @@ func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, return graphql.Null } res := resTmp.(*string) - rctx.Result = res + fc.Result = res return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Field", Field: field, Args: nil, @@ -1148,14 +1146,14 @@ func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.Col Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Name, nil @@ -1165,18 +1163,18 @@ func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.Col return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalNString2string(ctx, field.Selections, res) } func (ec *executionContext) ___Field_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Field", Field: field, Args: nil, @@ -1184,14 +1182,14 @@ func (ec *executionContext) ___Field_description(ctx context.Context, field grap Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Description, nil @@ -1204,12 +1202,12 @@ func (ec *executionContext) ___Field_description(ctx context.Context, field grap return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalOString2string(ctx, field.Selections, res) } func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Field", Field: field, Args: nil, @@ -1217,14 +1215,14 @@ func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.Col Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Args, nil @@ -1234,18 +1232,18 @@ func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.Col return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.([]introspection.InputValue) - rctx.Result = res + fc.Result = res return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx, field.Selections, res) } func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Field", Field: field, Args: nil, @@ -1253,14 +1251,14 @@ func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.Col Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Type, nil @@ -1270,18 +1268,18 @@ func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.Col return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(*introspection.Type) - rctx.Result = res + fc.Result = res return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Field", Field: field, Args: nil, @@ -1289,14 +1287,14 @@ func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field gra Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.IsDeprecated(), nil @@ -1306,18 +1304,18 @@ func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field gra return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(bool) - rctx.Result = res + fc.Result = res return ec.marshalNBoolean2bool(ctx, field.Selections, res) } func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Field", Field: field, Args: nil, @@ -1325,14 +1323,14 @@ func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, fiel Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.DeprecationReason(), nil @@ -1345,12 +1343,12 @@ func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, fiel return graphql.Null } res := resTmp.(*string) - rctx.Result = res + fc.Result = res return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__InputValue", Field: field, Args: nil, @@ -1358,14 +1356,14 @@ func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphq Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Name, nil @@ -1375,18 +1373,18 @@ func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphq return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalNString2string(ctx, field.Selections, res) } func (ec *executionContext) ___InputValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__InputValue", Field: field, Args: nil, @@ -1394,14 +1392,14 @@ func (ec *executionContext) ___InputValue_description(ctx context.Context, field Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Description, nil @@ -1414,12 +1412,12 @@ func (ec *executionContext) ___InputValue_description(ctx context.Context, field return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalOString2string(ctx, field.Selections, res) } func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__InputValue", Field: field, Args: nil, @@ -1427,14 +1425,14 @@ func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphq Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Type, nil @@ -1444,18 +1442,18 @@ func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphq return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(*introspection.Type) - rctx.Result = res + fc.Result = res return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__InputValue", Field: field, Args: nil, @@ -1463,14 +1461,14 @@ func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, fiel Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.DefaultValue, nil @@ -1483,12 +1481,12 @@ func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, fiel return graphql.Null } res := resTmp.(*string) - rctx.Result = res + fc.Result = res return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Schema", Field: field, Args: nil, @@ -1496,14 +1494,14 @@ func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.C Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Types(), nil @@ -1513,18 +1511,18 @@ func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.C return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.([]introspection.Type) - rctx.Result = res + fc.Result = res return ec.marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Schema", Field: field, Args: nil, @@ -1532,14 +1530,14 @@ func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graph Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.QueryType(), nil @@ -1549,18 +1547,18 @@ func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graph return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(*introspection.Type) - rctx.Result = res + fc.Result = res return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Schema", Field: field, Args: nil, @@ -1568,14 +1566,14 @@ func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field gr Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.MutationType(), nil @@ -1588,12 +1586,12 @@ func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field gr return graphql.Null } res := resTmp.(*introspection.Type) - rctx.Result = res + fc.Result = res return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Schema", Field: field, Args: nil, @@ -1601,14 +1599,14 @@ func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, fiel Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.SubscriptionType(), nil @@ -1621,12 +1619,12 @@ func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, fiel return graphql.Null } res := resTmp.(*introspection.Type) - rctx.Result = res + fc.Result = res return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) ___Schema_directives(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Schema", Field: field, Args: nil, @@ -1634,14 +1632,14 @@ func (ec *executionContext) ___Schema_directives(ctx context.Context, field grap Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Directives(), nil @@ -1651,18 +1649,18 @@ func (ec *executionContext) ___Schema_directives(ctx context.Context, field grap return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.([]introspection.Directive) - rctx.Result = res + fc.Result = res return ec.marshalN__Directive2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirective(ctx, field.Selections, res) } func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, @@ -1670,14 +1668,14 @@ func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.Coll Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Kind(), nil @@ -1687,18 +1685,18 @@ func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.Coll return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalN__TypeKind2string(ctx, field.Selections, res) } func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, @@ -1706,14 +1704,14 @@ func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.Coll Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Name(), nil @@ -1726,12 +1724,12 @@ func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.Coll return graphql.Null } res := resTmp.(*string) - rctx.Result = res + fc.Result = res return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } func (ec *executionContext) ___Type_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, @@ -1739,14 +1737,14 @@ func (ec *executionContext) ___Type_description(ctx context.Context, field graph Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Description(), nil @@ -1759,12 +1757,12 @@ func (ec *executionContext) ___Type_description(ctx context.Context, field graph return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalOString2string(ctx, field.Selections, res) } func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, @@ -1772,21 +1770,21 @@ func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.Co Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) + ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field___Type_fields_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } - rctx.Args = args - rctx.Stats.ArgumentsCompleted = graphql.Now() + fc.Args = args + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Fields(args["includeDeprecated"].(bool)), nil @@ -1799,12 +1797,12 @@ func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.Co return graphql.Null } res := resTmp.([]introspection.Field) - rctx.Result = res + fc.Result = res return ec.marshalO__Field2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐField(ctx, field.Selections, res) } func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, @@ -1812,14 +1810,14 @@ func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphq Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Interfaces(), nil @@ -1832,12 +1830,12 @@ func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphq return graphql.Null } res := resTmp.([]introspection.Type) - rctx.Result = res + fc.Result = res return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, @@ -1845,14 +1843,14 @@ func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field gra Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.PossibleTypes(), nil @@ -1865,12 +1863,12 @@ func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field gra return graphql.Null } res := resTmp.([]introspection.Type) - rctx.Result = res + fc.Result = res return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, @@ -1878,21 +1876,21 @@ func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphq Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) + ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field___Type_enumValues_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } - rctx.Args = args - rctx.Stats.ArgumentsCompleted = graphql.Now() + fc.Args = args + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.EnumValues(args["includeDeprecated"].(bool)), nil @@ -1905,12 +1903,12 @@ func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphq return graphql.Null } res := resTmp.([]introspection.EnumValue) - rctx.Result = res + fc.Result = res return ec.marshalO__EnumValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValue(ctx, field.Selections, res) } func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, @@ -1918,14 +1916,14 @@ func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graph Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.InputFields(), nil @@ -1938,12 +1936,12 @@ func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graph return graphql.Null } res := resTmp.([]introspection.InputValue) - rctx.Result = res + fc.Result = res return ec.marshalO__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx, field.Selections, res) } func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, @@ -1951,14 +1949,14 @@ func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.Co Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.OfType(), nil @@ -1971,7 +1969,7 @@ func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.Co return graphql.Null } res := resTmp.(*introspection.Type) - rctx.Result = res + fc.Result = res return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } @@ -2051,8 +2049,9 @@ var queryImplementors = []string{"Query"} func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, queryImplementors) - ctx = graphql.WithResolverContext(ctx, &graphql.ResolverContext{ + ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{ Object: "Query", + Stats: graphql.FieldStats{Started: graphql.Now()}, }) out := graphql.NewFieldSet(fields) @@ -2433,7 +2432,7 @@ func (ec *executionContext) unmarshalNBoolean2bool(ctx context.Context, v interf func (ec *executionContext) marshalNBoolean2bool(ctx context.Context, sel ast.SelectionSet, v bool) graphql.Marshaler { res := graphql.MarshalBoolean(v) if res == graphql.Null { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } } @@ -2447,7 +2446,7 @@ func (ec *executionContext) unmarshalNID2githubᚗcomᚋ99designsᚋgqlgenᚋexa func (ec *executionContext) marshalNID2githubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋscalarsᚋexternalᚐObjectID(ctx context.Context, sel ast.SelectionSet, v external.ObjectID) graphql.Marshaler { res := model.MarshalID(v) if res == graphql.Null { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } } @@ -2473,7 +2472,7 @@ func (ec *executionContext) unmarshalNPoint2ᚖgithubᚗcomᚋ99designsᚋgqlgen func (ec *executionContext) marshalNPoint2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋscalarsᚋmodelᚐPoint(ctx context.Context, sel ast.SelectionSet, v *model.Point) graphql.Marshaler { if v == nil { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } return graphql.Null @@ -2488,7 +2487,7 @@ func (ec *executionContext) unmarshalNString2string(ctx context.Context, v inter func (ec *executionContext) marshalNString2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { res := graphql.MarshalString(v) if res == graphql.Null { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } } @@ -2508,11 +2507,12 @@ func (ec *executionContext) marshalNUser2ᚕᚖgithubᚗcomᚋ99designsᚋgqlgen } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -2538,7 +2538,7 @@ func (ec *executionContext) marshalNUser2ᚕᚖgithubᚗcomᚋ99designsᚋgqlgen func (ec *executionContext) marshalNUser2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋscalarsᚋmodelᚐUser(ctx context.Context, sel ast.SelectionSet, v *model.User) graphql.Marshaler { if v == nil { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } return graphql.Null @@ -2559,11 +2559,12 @@ func (ec *executionContext) marshalN__Directive2ᚕgithubᚗcomᚋ99designsᚋgq } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -2594,7 +2595,7 @@ func (ec *executionContext) unmarshalN__DirectiveLocation2string(ctx context.Con func (ec *executionContext) marshalN__DirectiveLocation2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { res := graphql.MarshalString(v) if res == graphql.Null { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } } @@ -2630,11 +2631,12 @@ func (ec *executionContext) marshalN__DirectiveLocation2ᚕstring(ctx context.Co } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -2679,11 +2681,12 @@ func (ec *executionContext) marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋg } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -2720,11 +2723,12 @@ func (ec *executionContext) marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgen } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -2750,7 +2754,7 @@ func (ec *executionContext) marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgen func (ec *executionContext) marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v *introspection.Type) graphql.Marshaler { if v == nil { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } return graphql.Null @@ -2765,7 +2769,7 @@ func (ec *executionContext) unmarshalN__TypeKind2string(ctx context.Context, v i func (ec *executionContext) marshalN__TypeKind2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { res := graphql.MarshalString(v) if res == graphql.Null { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } } @@ -2922,11 +2926,12 @@ func (ec *executionContext) marshalO__EnumValue2ᚕgithubᚗcomᚋ99designsᚋgq } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -2962,11 +2967,12 @@ func (ec *executionContext) marshalO__Field2ᚕgithubᚗcomᚋ99designsᚋgqlgen } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -3002,11 +3008,12 @@ func (ec *executionContext) marshalO__InputValue2ᚕgithubᚗcomᚋ99designsᚋg } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -3057,11 +3064,12 @@ func (ec *executionContext) marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgen } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { diff --git a/example/selection/generated.go b/example/selection/generated.go index ad1e4e88af6..4bdbb5c278d 100644 --- a/example/selection/generated.go +++ b/example/selection/generated.go @@ -1,5 +1,3 @@ -// Code generated by github.com/99designs/gqlgen, DO NOT EDIT. - package selection import ( @@ -275,7 +273,7 @@ func (ec *executionContext) field___Type_fields_args(ctx context.Context, rawArg // region **************************** field.gotpl ***************************** func (ec *executionContext) _Like_reaction(ctx context.Context, field graphql.CollectedField, obj *Like) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Like", Field: field, Args: nil, @@ -283,14 +281,14 @@ func (ec *executionContext) _Like_reaction(ctx context.Context, field graphql.Co Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Reaction, nil @@ -300,18 +298,18 @@ func (ec *executionContext) _Like_reaction(ctx context.Context, field graphql.Co return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalNString2string(ctx, field.Selections, res) } func (ec *executionContext) _Like_sent(ctx context.Context, field graphql.CollectedField, obj *Like) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Like", Field: field, Args: nil, @@ -319,14 +317,14 @@ func (ec *executionContext) _Like_sent(ctx context.Context, field graphql.Collec Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Sent, nil @@ -336,18 +334,18 @@ func (ec *executionContext) _Like_sent(ctx context.Context, field graphql.Collec return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(time.Time) - rctx.Result = res + fc.Result = res return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res) } func (ec *executionContext) _Like_selection(ctx context.Context, field graphql.CollectedField, obj *Like) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Like", Field: field, Args: nil, @@ -355,14 +353,14 @@ func (ec *executionContext) _Like_selection(ctx context.Context, field graphql.C Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Selection, nil @@ -375,12 +373,12 @@ func (ec *executionContext) _Like_selection(ctx context.Context, field graphql.C return graphql.Null } res := resTmp.([]string) - rctx.Result = res + fc.Result = res return ec.marshalOString2ᚕstring(ctx, field.Selections, res) } func (ec *executionContext) _Like_collected(ctx context.Context, field graphql.CollectedField, obj *Like) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Like", Field: field, Args: nil, @@ -388,14 +386,14 @@ func (ec *executionContext) _Like_collected(ctx context.Context, field graphql.C Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Collected, nil @@ -408,12 +406,12 @@ func (ec *executionContext) _Like_collected(ctx context.Context, field graphql.C return graphql.Null } res := resTmp.([]string) - rctx.Result = res + fc.Result = res return ec.marshalOString2ᚕstring(ctx, field.Selections, res) } func (ec *executionContext) _Post_message(ctx context.Context, field graphql.CollectedField, obj *Post) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Post", Field: field, Args: nil, @@ -421,14 +419,14 @@ func (ec *executionContext) _Post_message(ctx context.Context, field graphql.Col Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Message, nil @@ -438,18 +436,18 @@ func (ec *executionContext) _Post_message(ctx context.Context, field graphql.Col return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalNString2string(ctx, field.Selections, res) } func (ec *executionContext) _Post_sent(ctx context.Context, field graphql.CollectedField, obj *Post) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Post", Field: field, Args: nil, @@ -457,14 +455,14 @@ func (ec *executionContext) _Post_sent(ctx context.Context, field graphql.Collec Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Sent, nil @@ -474,18 +472,18 @@ func (ec *executionContext) _Post_sent(ctx context.Context, field graphql.Collec return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(time.Time) - rctx.Result = res + fc.Result = res return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res) } func (ec *executionContext) _Post_selection(ctx context.Context, field graphql.CollectedField, obj *Post) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Post", Field: field, Args: nil, @@ -493,14 +491,14 @@ func (ec *executionContext) _Post_selection(ctx context.Context, field graphql.C Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Selection, nil @@ -513,12 +511,12 @@ func (ec *executionContext) _Post_selection(ctx context.Context, field graphql.C return graphql.Null } res := resTmp.([]string) - rctx.Result = res + fc.Result = res return ec.marshalOString2ᚕstring(ctx, field.Selections, res) } func (ec *executionContext) _Post_collected(ctx context.Context, field graphql.CollectedField, obj *Post) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Post", Field: field, Args: nil, @@ -526,14 +524,14 @@ func (ec *executionContext) _Post_collected(ctx context.Context, field graphql.C Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Collected, nil @@ -546,12 +544,12 @@ func (ec *executionContext) _Post_collected(ctx context.Context, field graphql.C return graphql.Null } res := resTmp.([]string) - rctx.Result = res + fc.Result = res return ec.marshalOString2ᚕstring(ctx, field.Selections, res) } func (ec *executionContext) _Query_events(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Query", Field: field, Args: nil, @@ -559,14 +557,14 @@ func (ec *executionContext) _Query_events(ctx context.Context, field graphql.Col Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().Events(rctx) @@ -579,12 +577,12 @@ func (ec *executionContext) _Query_events(ctx context.Context, field graphql.Col return graphql.Null } res := resTmp.([]Event) - rctx.Result = res + fc.Result = res return ec.marshalOEvent2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋselectionᚐEvent(ctx, field.Selections, res) } func (ec *executionContext) _Query___type(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Query", Field: field, Args: nil, @@ -592,21 +590,21 @@ func (ec *executionContext) _Query___type(ctx context.Context, field graphql.Col Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) + ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field_Query___type_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } - rctx.Args = args - rctx.Stats.ArgumentsCompleted = graphql.Now() + fc.Args = args + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.introspectType(args["name"].(string)) @@ -619,12 +617,12 @@ func (ec *executionContext) _Query___type(ctx context.Context, field graphql.Col return graphql.Null } res := resTmp.(*introspection.Type) - rctx.Result = res + fc.Result = res return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Query", Field: field, Args: nil, @@ -632,14 +630,14 @@ func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.C Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.introspectSchema() @@ -652,12 +650,12 @@ func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.C return graphql.Null } res := resTmp.(*introspection.Schema) - rctx.Result = res + fc.Result = res return ec.marshalO__Schema2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐSchema(ctx, field.Selections, res) } func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Directive", Field: field, Args: nil, @@ -665,14 +663,14 @@ func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Name, nil @@ -682,18 +680,18 @@ func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalNString2string(ctx, field.Selections, res) } func (ec *executionContext) ___Directive_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Directive", Field: field, Args: nil, @@ -701,14 +699,14 @@ func (ec *executionContext) ___Directive_description(ctx context.Context, field Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Description, nil @@ -721,12 +719,12 @@ func (ec *executionContext) ___Directive_description(ctx context.Context, field return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalOString2string(ctx, field.Selections, res) } func (ec *executionContext) ___Directive_locations(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Directive", Field: field, Args: nil, @@ -734,14 +732,14 @@ func (ec *executionContext) ___Directive_locations(ctx context.Context, field gr Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Locations, nil @@ -751,18 +749,18 @@ func (ec *executionContext) ___Directive_locations(ctx context.Context, field gr return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.([]string) - rctx.Result = res + fc.Result = res return ec.marshalN__DirectiveLocation2ᚕstring(ctx, field.Selections, res) } func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Directive", Field: field, Args: nil, @@ -770,14 +768,14 @@ func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Args, nil @@ -787,18 +785,18 @@ func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.([]introspection.InputValue) - rctx.Result = res + fc.Result = res return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx, field.Selections, res) } func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__EnumValue", Field: field, Args: nil, @@ -806,14 +804,14 @@ func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Name, nil @@ -823,18 +821,18 @@ func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalNString2string(ctx, field.Selections, res) } func (ec *executionContext) ___EnumValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__EnumValue", Field: field, Args: nil, @@ -842,14 +840,14 @@ func (ec *executionContext) ___EnumValue_description(ctx context.Context, field Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Description, nil @@ -862,12 +860,12 @@ func (ec *executionContext) ___EnumValue_description(ctx context.Context, field return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalOString2string(ctx, field.Selections, res) } func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__EnumValue", Field: field, Args: nil, @@ -875,14 +873,14 @@ func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.IsDeprecated(), nil @@ -892,18 +890,18 @@ func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(bool) - rctx.Result = res + fc.Result = res return ec.marshalNBoolean2bool(ctx, field.Selections, res) } func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__EnumValue", Field: field, Args: nil, @@ -911,14 +909,14 @@ func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.DeprecationReason(), nil @@ -931,12 +929,12 @@ func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, return graphql.Null } res := resTmp.(*string) - rctx.Result = res + fc.Result = res return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Field", Field: field, Args: nil, @@ -944,14 +942,14 @@ func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.Col Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Name, nil @@ -961,18 +959,18 @@ func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.Col return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalNString2string(ctx, field.Selections, res) } func (ec *executionContext) ___Field_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Field", Field: field, Args: nil, @@ -980,14 +978,14 @@ func (ec *executionContext) ___Field_description(ctx context.Context, field grap Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Description, nil @@ -1000,12 +998,12 @@ func (ec *executionContext) ___Field_description(ctx context.Context, field grap return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalOString2string(ctx, field.Selections, res) } func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Field", Field: field, Args: nil, @@ -1013,14 +1011,14 @@ func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.Col Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Args, nil @@ -1030,18 +1028,18 @@ func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.Col return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.([]introspection.InputValue) - rctx.Result = res + fc.Result = res return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx, field.Selections, res) } func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Field", Field: field, Args: nil, @@ -1049,14 +1047,14 @@ func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.Col Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Type, nil @@ -1066,18 +1064,18 @@ func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.Col return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(*introspection.Type) - rctx.Result = res + fc.Result = res return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Field", Field: field, Args: nil, @@ -1085,14 +1083,14 @@ func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field gra Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.IsDeprecated(), nil @@ -1102,18 +1100,18 @@ func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field gra return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(bool) - rctx.Result = res + fc.Result = res return ec.marshalNBoolean2bool(ctx, field.Selections, res) } func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Field", Field: field, Args: nil, @@ -1121,14 +1119,14 @@ func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, fiel Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.DeprecationReason(), nil @@ -1141,12 +1139,12 @@ func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, fiel return graphql.Null } res := resTmp.(*string) - rctx.Result = res + fc.Result = res return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__InputValue", Field: field, Args: nil, @@ -1154,14 +1152,14 @@ func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphq Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Name, nil @@ -1171,18 +1169,18 @@ func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphq return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalNString2string(ctx, field.Selections, res) } func (ec *executionContext) ___InputValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__InputValue", Field: field, Args: nil, @@ -1190,14 +1188,14 @@ func (ec *executionContext) ___InputValue_description(ctx context.Context, field Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Description, nil @@ -1210,12 +1208,12 @@ func (ec *executionContext) ___InputValue_description(ctx context.Context, field return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalOString2string(ctx, field.Selections, res) } func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__InputValue", Field: field, Args: nil, @@ -1223,14 +1221,14 @@ func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphq Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Type, nil @@ -1240,18 +1238,18 @@ func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphq return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(*introspection.Type) - rctx.Result = res + fc.Result = res return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__InputValue", Field: field, Args: nil, @@ -1259,14 +1257,14 @@ func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, fiel Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.DefaultValue, nil @@ -1279,12 +1277,12 @@ func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, fiel return graphql.Null } res := resTmp.(*string) - rctx.Result = res + fc.Result = res return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Schema", Field: field, Args: nil, @@ -1292,14 +1290,14 @@ func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.C Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Types(), nil @@ -1309,18 +1307,18 @@ func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.C return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.([]introspection.Type) - rctx.Result = res + fc.Result = res return ec.marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Schema", Field: field, Args: nil, @@ -1328,14 +1326,14 @@ func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graph Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.QueryType(), nil @@ -1345,18 +1343,18 @@ func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graph return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(*introspection.Type) - rctx.Result = res + fc.Result = res return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Schema", Field: field, Args: nil, @@ -1364,14 +1362,14 @@ func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field gr Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.MutationType(), nil @@ -1384,12 +1382,12 @@ func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field gr return graphql.Null } res := resTmp.(*introspection.Type) - rctx.Result = res + fc.Result = res return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Schema", Field: field, Args: nil, @@ -1397,14 +1395,14 @@ func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, fiel Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.SubscriptionType(), nil @@ -1417,12 +1415,12 @@ func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, fiel return graphql.Null } res := resTmp.(*introspection.Type) - rctx.Result = res + fc.Result = res return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) ___Schema_directives(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Schema", Field: field, Args: nil, @@ -1430,14 +1428,14 @@ func (ec *executionContext) ___Schema_directives(ctx context.Context, field grap Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Directives(), nil @@ -1447,18 +1445,18 @@ func (ec *executionContext) ___Schema_directives(ctx context.Context, field grap return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.([]introspection.Directive) - rctx.Result = res + fc.Result = res return ec.marshalN__Directive2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirective(ctx, field.Selections, res) } func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, @@ -1466,14 +1464,14 @@ func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.Coll Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Kind(), nil @@ -1483,18 +1481,18 @@ func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.Coll return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalN__TypeKind2string(ctx, field.Selections, res) } func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, @@ -1502,14 +1500,14 @@ func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.Coll Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Name(), nil @@ -1522,12 +1520,12 @@ func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.Coll return graphql.Null } res := resTmp.(*string) - rctx.Result = res + fc.Result = res return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } func (ec *executionContext) ___Type_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, @@ -1535,14 +1533,14 @@ func (ec *executionContext) ___Type_description(ctx context.Context, field graph Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Description(), nil @@ -1555,12 +1553,12 @@ func (ec *executionContext) ___Type_description(ctx context.Context, field graph return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalOString2string(ctx, field.Selections, res) } func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, @@ -1568,21 +1566,21 @@ func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.Co Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) + ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field___Type_fields_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } - rctx.Args = args - rctx.Stats.ArgumentsCompleted = graphql.Now() + fc.Args = args + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Fields(args["includeDeprecated"].(bool)), nil @@ -1595,12 +1593,12 @@ func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.Co return graphql.Null } res := resTmp.([]introspection.Field) - rctx.Result = res + fc.Result = res return ec.marshalO__Field2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐField(ctx, field.Selections, res) } func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, @@ -1608,14 +1606,14 @@ func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphq Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Interfaces(), nil @@ -1628,12 +1626,12 @@ func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphq return graphql.Null } res := resTmp.([]introspection.Type) - rctx.Result = res + fc.Result = res return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, @@ -1641,14 +1639,14 @@ func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field gra Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.PossibleTypes(), nil @@ -1661,12 +1659,12 @@ func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field gra return graphql.Null } res := resTmp.([]introspection.Type) - rctx.Result = res + fc.Result = res return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, @@ -1674,21 +1672,21 @@ func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphq Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) + ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field___Type_enumValues_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } - rctx.Args = args - rctx.Stats.ArgumentsCompleted = graphql.Now() + fc.Args = args + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.EnumValues(args["includeDeprecated"].(bool)), nil @@ -1701,12 +1699,12 @@ func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphq return graphql.Null } res := resTmp.([]introspection.EnumValue) - rctx.Result = res + fc.Result = res return ec.marshalO__EnumValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValue(ctx, field.Selections, res) } func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, @@ -1714,14 +1712,14 @@ func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graph Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.InputFields(), nil @@ -1734,12 +1732,12 @@ func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graph return graphql.Null } res := resTmp.([]introspection.InputValue) - rctx.Result = res + fc.Result = res return ec.marshalO__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx, field.Selections, res) } func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, @@ -1747,14 +1745,14 @@ func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.Co Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.OfType(), nil @@ -1767,7 +1765,7 @@ func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.Co return graphql.Null } res := resTmp.(*introspection.Type) - rctx.Result = res + fc.Result = res return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } @@ -1877,8 +1875,9 @@ var queryImplementors = []string{"Query"} func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, queryImplementors) - ctx = graphql.WithResolverContext(ctx, &graphql.ResolverContext{ + ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{ Object: "Query", + Stats: graphql.FieldStats{Started: graphql.Now()}, }) out := graphql.NewFieldSet(fields) @@ -2165,7 +2164,7 @@ func (ec *executionContext) unmarshalNBoolean2bool(ctx context.Context, v interf func (ec *executionContext) marshalNBoolean2bool(ctx context.Context, sel ast.SelectionSet, v bool) graphql.Marshaler { res := graphql.MarshalBoolean(v) if res == graphql.Null { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } } @@ -2174,7 +2173,7 @@ func (ec *executionContext) marshalNBoolean2bool(ctx context.Context, sel ast.Se func (ec *executionContext) marshalNEvent2githubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋselectionᚐEvent(ctx context.Context, sel ast.SelectionSet, v Event) graphql.Marshaler { if v == nil { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } return graphql.Null @@ -2189,7 +2188,7 @@ func (ec *executionContext) unmarshalNString2string(ctx context.Context, v inter func (ec *executionContext) marshalNString2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { res := graphql.MarshalString(v) if res == graphql.Null { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } } @@ -2203,7 +2202,7 @@ func (ec *executionContext) unmarshalNTime2timeᚐTime(ctx context.Context, v in func (ec *executionContext) marshalNTime2timeᚐTime(ctx context.Context, sel ast.SelectionSet, v time.Time) graphql.Marshaler { res := graphql.MarshalTime(v) if res == graphql.Null { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } } @@ -2223,11 +2222,12 @@ func (ec *executionContext) marshalN__Directive2ᚕgithubᚗcomᚋ99designsᚋgq } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -2258,7 +2258,7 @@ func (ec *executionContext) unmarshalN__DirectiveLocation2string(ctx context.Con func (ec *executionContext) marshalN__DirectiveLocation2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { res := graphql.MarshalString(v) if res == graphql.Null { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } } @@ -2294,11 +2294,12 @@ func (ec *executionContext) marshalN__DirectiveLocation2ᚕstring(ctx context.Co } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -2343,11 +2344,12 @@ func (ec *executionContext) marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋg } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -2384,11 +2386,12 @@ func (ec *executionContext) marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgen } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -2414,7 +2417,7 @@ func (ec *executionContext) marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgen func (ec *executionContext) marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v *introspection.Type) graphql.Marshaler { if v == nil { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } return graphql.Null @@ -2429,7 +2432,7 @@ func (ec *executionContext) unmarshalN__TypeKind2string(ctx context.Context, v i func (ec *executionContext) marshalN__TypeKind2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { res := graphql.MarshalString(v) if res == graphql.Null { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } } @@ -2471,11 +2474,12 @@ func (ec *executionContext) marshalOEvent2ᚕgithubᚗcomᚋ99designsᚋgqlgen } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -2566,11 +2570,12 @@ func (ec *executionContext) marshalO__EnumValue2ᚕgithubᚗcomᚋ99designsᚋgq } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -2606,11 +2611,12 @@ func (ec *executionContext) marshalO__Field2ᚕgithubᚗcomᚋ99designsᚋgqlgen } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -2646,11 +2652,12 @@ func (ec *executionContext) marshalO__InputValue2ᚕgithubᚗcomᚋ99designsᚋg } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -2701,11 +2708,12 @@ func (ec *executionContext) marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgen } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { diff --git a/example/selection/selection.go b/example/selection/selection.go index ed6e8995e14..f0b163dd1fc 100644 --- a/example/selection/selection.go +++ b/example/selection/selection.go @@ -23,7 +23,7 @@ func (r *queryResolver) Events(ctx context.Context) ([]Event, error) { var sels []string reqCtx := graphql.GetOperationContext(ctx) - fieldSelections := graphql.GetResolverContext(ctx).Field.Selections + fieldSelections := graphql.GetFieldContext(ctx).Field.Selections for _, sel := range fieldSelections { switch sel := sel.(type) { case *ast.Field: diff --git a/example/starwars/generated/exec.go b/example/starwars/generated/exec.go index 16880c51e42..c24b9bbdf16 100644 --- a/example/starwars/generated/exec.go +++ b/example/starwars/generated/exec.go @@ -1,5 +1,3 @@ -// Code generated by github.com/99designs/gqlgen, DO NOT EDIT. - package generated import ( @@ -939,7 +937,7 @@ func (ec *executionContext) field___Type_fields_args(ctx context.Context, rawArg // region **************************** field.gotpl ***************************** func (ec *executionContext) _Droid_id(ctx context.Context, field graphql.CollectedField, obj *models.Droid) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Droid", Field: field, Args: nil, @@ -947,14 +945,14 @@ func (ec *executionContext) _Droid_id(ctx context.Context, field graphql.Collect Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.ID, nil @@ -964,18 +962,18 @@ func (ec *executionContext) _Droid_id(ctx context.Context, field graphql.Collect return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalNID2string(ctx, field.Selections, res) } func (ec *executionContext) _Droid_name(ctx context.Context, field graphql.CollectedField, obj *models.Droid) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Droid", Field: field, Args: nil, @@ -983,14 +981,14 @@ func (ec *executionContext) _Droid_name(ctx context.Context, field graphql.Colle Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Name, nil @@ -1000,18 +998,18 @@ func (ec *executionContext) _Droid_name(ctx context.Context, field graphql.Colle return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalNString2string(ctx, field.Selections, res) } func (ec *executionContext) _Droid_friends(ctx context.Context, field graphql.CollectedField, obj *models.Droid) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Droid", Field: field, Args: nil, @@ -1019,14 +1017,14 @@ func (ec *executionContext) _Droid_friends(ctx context.Context, field graphql.Co Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Droid().Friends(rctx, obj) @@ -1039,12 +1037,12 @@ func (ec *executionContext) _Droid_friends(ctx context.Context, field graphql.Co return graphql.Null } res := resTmp.([]models.Character) - rctx.Result = res + fc.Result = res return ec.marshalOCharacter2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋstarwarsᚋmodelsᚐCharacter(ctx, field.Selections, res) } func (ec *executionContext) _Droid_friendsConnection(ctx context.Context, field graphql.CollectedField, obj *models.Droid) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Droid", Field: field, Args: nil, @@ -1052,21 +1050,21 @@ func (ec *executionContext) _Droid_friendsConnection(ctx context.Context, field Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) + ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field_Droid_friendsConnection_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } - rctx.Args = args - rctx.Stats.ArgumentsCompleted = graphql.Now() + fc.Args = args + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Droid().FriendsConnection(rctx, obj, args["first"].(*int), args["after"].(*string)) @@ -1076,18 +1074,18 @@ func (ec *executionContext) _Droid_friendsConnection(ctx context.Context, field return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(*models.FriendsConnection) - rctx.Result = res + fc.Result = res return ec.marshalNFriendsConnection2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋstarwarsᚋmodelsᚐFriendsConnection(ctx, field.Selections, res) } func (ec *executionContext) _Droid_appearsIn(ctx context.Context, field graphql.CollectedField, obj *models.Droid) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Droid", Field: field, Args: nil, @@ -1095,14 +1093,14 @@ func (ec *executionContext) _Droid_appearsIn(ctx context.Context, field graphql. Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.AppearsIn, nil @@ -1112,18 +1110,18 @@ func (ec *executionContext) _Droid_appearsIn(ctx context.Context, field graphql. return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.([]models.Episode) - rctx.Result = res + fc.Result = res return ec.marshalNEpisode2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋstarwarsᚋmodelsᚐEpisode(ctx, field.Selections, res) } func (ec *executionContext) _Droid_primaryFunction(ctx context.Context, field graphql.CollectedField, obj *models.Droid) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Droid", Field: field, Args: nil, @@ -1131,14 +1129,14 @@ func (ec *executionContext) _Droid_primaryFunction(ctx context.Context, field gr Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.PrimaryFunction, nil @@ -1151,12 +1149,12 @@ func (ec *executionContext) _Droid_primaryFunction(ctx context.Context, field gr return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalOString2string(ctx, field.Selections, res) } func (ec *executionContext) _FriendsConnection_totalCount(ctx context.Context, field graphql.CollectedField, obj *models.FriendsConnection) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "FriendsConnection", Field: field, Args: nil, @@ -1164,14 +1162,14 @@ func (ec *executionContext) _FriendsConnection_totalCount(ctx context.Context, f Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.TotalCount(), nil @@ -1181,18 +1179,18 @@ func (ec *executionContext) _FriendsConnection_totalCount(ctx context.Context, f return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(int) - rctx.Result = res + fc.Result = res return ec.marshalNInt2int(ctx, field.Selections, res) } func (ec *executionContext) _FriendsConnection_edges(ctx context.Context, field graphql.CollectedField, obj *models.FriendsConnection) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "FriendsConnection", Field: field, Args: nil, @@ -1200,14 +1198,14 @@ func (ec *executionContext) _FriendsConnection_edges(ctx context.Context, field Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.FriendsConnection().Edges(rctx, obj) @@ -1220,12 +1218,12 @@ func (ec *executionContext) _FriendsConnection_edges(ctx context.Context, field return graphql.Null } res := resTmp.([]*models.FriendsEdge) - rctx.Result = res + fc.Result = res return ec.marshalOFriendsEdge2ᚕᚖgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋstarwarsᚋmodelsᚐFriendsEdge(ctx, field.Selections, res) } func (ec *executionContext) _FriendsConnection_friends(ctx context.Context, field graphql.CollectedField, obj *models.FriendsConnection) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "FriendsConnection", Field: field, Args: nil, @@ -1233,14 +1231,14 @@ func (ec *executionContext) _FriendsConnection_friends(ctx context.Context, fiel Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.FriendsConnection().Friends(rctx, obj) @@ -1253,12 +1251,12 @@ func (ec *executionContext) _FriendsConnection_friends(ctx context.Context, fiel return graphql.Null } res := resTmp.([]models.Character) - rctx.Result = res + fc.Result = res return ec.marshalOCharacter2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋstarwarsᚋmodelsᚐCharacter(ctx, field.Selections, res) } func (ec *executionContext) _FriendsConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *models.FriendsConnection) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "FriendsConnection", Field: field, Args: nil, @@ -1266,14 +1264,14 @@ func (ec *executionContext) _FriendsConnection_pageInfo(ctx context.Context, fie Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.PageInfo(), nil @@ -1283,18 +1281,18 @@ func (ec *executionContext) _FriendsConnection_pageInfo(ctx context.Context, fie return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(models.PageInfo) - rctx.Result = res + fc.Result = res return ec.marshalNPageInfo2githubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋstarwarsᚋmodelsᚐPageInfo(ctx, field.Selections, res) } func (ec *executionContext) _FriendsEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *models.FriendsEdge) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "FriendsEdge", Field: field, Args: nil, @@ -1302,14 +1300,14 @@ func (ec *executionContext) _FriendsEdge_cursor(ctx context.Context, field graph Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Cursor, nil @@ -1319,18 +1317,18 @@ func (ec *executionContext) _FriendsEdge_cursor(ctx context.Context, field graph return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalNID2string(ctx, field.Selections, res) } func (ec *executionContext) _FriendsEdge_node(ctx context.Context, field graphql.CollectedField, obj *models.FriendsEdge) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "FriendsEdge", Field: field, Args: nil, @@ -1338,14 +1336,14 @@ func (ec *executionContext) _FriendsEdge_node(ctx context.Context, field graphql Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Node, nil @@ -1358,12 +1356,12 @@ func (ec *executionContext) _FriendsEdge_node(ctx context.Context, field graphql return graphql.Null } res := resTmp.(models.Character) - rctx.Result = res + fc.Result = res return ec.marshalOCharacter2githubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋstarwarsᚋmodelsᚐCharacter(ctx, field.Selections, res) } func (ec *executionContext) _Human_id(ctx context.Context, field graphql.CollectedField, obj *models.Human) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Human", Field: field, Args: nil, @@ -1371,14 +1369,14 @@ func (ec *executionContext) _Human_id(ctx context.Context, field graphql.Collect Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.ID, nil @@ -1388,18 +1386,18 @@ func (ec *executionContext) _Human_id(ctx context.Context, field graphql.Collect return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalNID2string(ctx, field.Selections, res) } func (ec *executionContext) _Human_name(ctx context.Context, field graphql.CollectedField, obj *models.Human) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Human", Field: field, Args: nil, @@ -1407,14 +1405,14 @@ func (ec *executionContext) _Human_name(ctx context.Context, field graphql.Colle Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Name, nil @@ -1424,18 +1422,18 @@ func (ec *executionContext) _Human_name(ctx context.Context, field graphql.Colle return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalNString2string(ctx, field.Selections, res) } func (ec *executionContext) _Human_height(ctx context.Context, field graphql.CollectedField, obj *models.Human) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Human", Field: field, Args: nil, @@ -1443,21 +1441,21 @@ func (ec *executionContext) _Human_height(ctx context.Context, field graphql.Col Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) + ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field_Human_height_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } - rctx.Args = args - rctx.Stats.ArgumentsCompleted = graphql.Now() + fc.Args = args + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Height(args["unit"].(models.LengthUnit)), nil @@ -1467,18 +1465,18 @@ func (ec *executionContext) _Human_height(ctx context.Context, field graphql.Col return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(float64) - rctx.Result = res + fc.Result = res return ec.marshalNFloat2float64(ctx, field.Selections, res) } func (ec *executionContext) _Human_mass(ctx context.Context, field graphql.CollectedField, obj *models.Human) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Human", Field: field, Args: nil, @@ -1486,14 +1484,14 @@ func (ec *executionContext) _Human_mass(ctx context.Context, field graphql.Colle Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Mass, nil @@ -1506,12 +1504,12 @@ func (ec *executionContext) _Human_mass(ctx context.Context, field graphql.Colle return graphql.Null } res := resTmp.(float64) - rctx.Result = res + fc.Result = res return ec.marshalOFloat2float64(ctx, field.Selections, res) } func (ec *executionContext) _Human_friends(ctx context.Context, field graphql.CollectedField, obj *models.Human) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Human", Field: field, Args: nil, @@ -1519,14 +1517,14 @@ func (ec *executionContext) _Human_friends(ctx context.Context, field graphql.Co Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Human().Friends(rctx, obj) @@ -1539,12 +1537,12 @@ func (ec *executionContext) _Human_friends(ctx context.Context, field graphql.Co return graphql.Null } res := resTmp.([]models.Character) - rctx.Result = res + fc.Result = res return ec.marshalOCharacter2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋstarwarsᚋmodelsᚐCharacter(ctx, field.Selections, res) } func (ec *executionContext) _Human_friendsConnection(ctx context.Context, field graphql.CollectedField, obj *models.Human) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Human", Field: field, Args: nil, @@ -1552,21 +1550,21 @@ func (ec *executionContext) _Human_friendsConnection(ctx context.Context, field Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) + ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field_Human_friendsConnection_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } - rctx.Args = args - rctx.Stats.ArgumentsCompleted = graphql.Now() + fc.Args = args + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Human().FriendsConnection(rctx, obj, args["first"].(*int), args["after"].(*string)) @@ -1576,18 +1574,18 @@ func (ec *executionContext) _Human_friendsConnection(ctx context.Context, field return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(*models.FriendsConnection) - rctx.Result = res + fc.Result = res return ec.marshalNFriendsConnection2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋstarwarsᚋmodelsᚐFriendsConnection(ctx, field.Selections, res) } func (ec *executionContext) _Human_appearsIn(ctx context.Context, field graphql.CollectedField, obj *models.Human) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Human", Field: field, Args: nil, @@ -1595,14 +1593,14 @@ func (ec *executionContext) _Human_appearsIn(ctx context.Context, field graphql. Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.AppearsIn, nil @@ -1612,18 +1610,18 @@ func (ec *executionContext) _Human_appearsIn(ctx context.Context, field graphql. return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.([]models.Episode) - rctx.Result = res + fc.Result = res return ec.marshalNEpisode2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋstarwarsᚋmodelsᚐEpisode(ctx, field.Selections, res) } func (ec *executionContext) _Human_starships(ctx context.Context, field graphql.CollectedField, obj *models.Human) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Human", Field: field, Args: nil, @@ -1631,14 +1629,14 @@ func (ec *executionContext) _Human_starships(ctx context.Context, field graphql. Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Human().Starships(rctx, obj) @@ -1651,12 +1649,12 @@ func (ec *executionContext) _Human_starships(ctx context.Context, field graphql. return graphql.Null } res := resTmp.([]*models.Starship) - rctx.Result = res + fc.Result = res return ec.marshalOStarship2ᚕᚖgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋstarwarsᚋmodelsᚐStarship(ctx, field.Selections, res) } func (ec *executionContext) _Mutation_createReview(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Mutation", Field: field, Args: nil, @@ -1664,21 +1662,21 @@ func (ec *executionContext) _Mutation_createReview(ctx context.Context, field gr Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) + ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field_Mutation_createReview_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } - rctx.Args = args - rctx.Stats.ArgumentsCompleted = graphql.Now() + fc.Args = args + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().CreateReview(rctx, args["episode"].(models.Episode), args["review"].(models.Review)) @@ -1691,12 +1689,12 @@ func (ec *executionContext) _Mutation_createReview(ctx context.Context, field gr return graphql.Null } res := resTmp.(*models.Review) - rctx.Result = res + fc.Result = res return ec.marshalOReview2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋstarwarsᚋmodelsᚐReview(ctx, field.Selections, res) } func (ec *executionContext) _PageInfo_startCursor(ctx context.Context, field graphql.CollectedField, obj *models.PageInfo) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "PageInfo", Field: field, Args: nil, @@ -1704,14 +1702,14 @@ func (ec *executionContext) _PageInfo_startCursor(ctx context.Context, field gra Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.StartCursor, nil @@ -1721,18 +1719,18 @@ func (ec *executionContext) _PageInfo_startCursor(ctx context.Context, field gra return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalNID2string(ctx, field.Selections, res) } func (ec *executionContext) _PageInfo_endCursor(ctx context.Context, field graphql.CollectedField, obj *models.PageInfo) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "PageInfo", Field: field, Args: nil, @@ -1740,14 +1738,14 @@ func (ec *executionContext) _PageInfo_endCursor(ctx context.Context, field graph Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.EndCursor, nil @@ -1757,18 +1755,18 @@ func (ec *executionContext) _PageInfo_endCursor(ctx context.Context, field graph return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalNID2string(ctx, field.Selections, res) } func (ec *executionContext) _PageInfo_hasNextPage(ctx context.Context, field graphql.CollectedField, obj *models.PageInfo) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "PageInfo", Field: field, Args: nil, @@ -1776,14 +1774,14 @@ func (ec *executionContext) _PageInfo_hasNextPage(ctx context.Context, field gra Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.HasNextPage, nil @@ -1793,18 +1791,18 @@ func (ec *executionContext) _PageInfo_hasNextPage(ctx context.Context, field gra return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(bool) - rctx.Result = res + fc.Result = res return ec.marshalNBoolean2bool(ctx, field.Selections, res) } func (ec *executionContext) _Query_hero(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Query", Field: field, Args: nil, @@ -1812,21 +1810,21 @@ func (ec *executionContext) _Query_hero(ctx context.Context, field graphql.Colle Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) + ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field_Query_hero_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } - rctx.Args = args - rctx.Stats.ArgumentsCompleted = graphql.Now() + fc.Args = args + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().Hero(rctx, args["episode"].(*models.Episode)) @@ -1839,12 +1837,12 @@ func (ec *executionContext) _Query_hero(ctx context.Context, field graphql.Colle return graphql.Null } res := resTmp.(models.Character) - rctx.Result = res + fc.Result = res return ec.marshalOCharacter2githubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋstarwarsᚋmodelsᚐCharacter(ctx, field.Selections, res) } func (ec *executionContext) _Query_reviews(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Query", Field: field, Args: nil, @@ -1852,21 +1850,21 @@ func (ec *executionContext) _Query_reviews(ctx context.Context, field graphql.Co Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) + ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field_Query_reviews_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } - rctx.Args = args - rctx.Stats.ArgumentsCompleted = graphql.Now() + fc.Args = args + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().Reviews(rctx, args["episode"].(models.Episode), args["since"].(*time.Time)) @@ -1876,18 +1874,18 @@ func (ec *executionContext) _Query_reviews(ctx context.Context, field graphql.Co return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.([]*models.Review) - rctx.Result = res + fc.Result = res return ec.marshalNReview2ᚕᚖgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋstarwarsᚋmodelsᚐReview(ctx, field.Selections, res) } func (ec *executionContext) _Query_search(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Query", Field: field, Args: nil, @@ -1895,21 +1893,21 @@ func (ec *executionContext) _Query_search(ctx context.Context, field graphql.Col Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) + ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field_Query_search_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } - rctx.Args = args - rctx.Stats.ArgumentsCompleted = graphql.Now() + fc.Args = args + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().Search(rctx, args["text"].(string)) @@ -1919,18 +1917,18 @@ func (ec *executionContext) _Query_search(ctx context.Context, field graphql.Col return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.([]models.SearchResult) - rctx.Result = res + fc.Result = res return ec.marshalNSearchResult2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋstarwarsᚋmodelsᚐSearchResult(ctx, field.Selections, res) } func (ec *executionContext) _Query_character(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Query", Field: field, Args: nil, @@ -1938,21 +1936,21 @@ func (ec *executionContext) _Query_character(ctx context.Context, field graphql. Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) + ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field_Query_character_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } - rctx.Args = args - rctx.Stats.ArgumentsCompleted = graphql.Now() + fc.Args = args + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().Character(rctx, args["id"].(string)) @@ -1965,12 +1963,12 @@ func (ec *executionContext) _Query_character(ctx context.Context, field graphql. return graphql.Null } res := resTmp.(models.Character) - rctx.Result = res + fc.Result = res return ec.marshalOCharacter2githubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋstarwarsᚋmodelsᚐCharacter(ctx, field.Selections, res) } func (ec *executionContext) _Query_droid(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Query", Field: field, Args: nil, @@ -1978,21 +1976,21 @@ func (ec *executionContext) _Query_droid(ctx context.Context, field graphql.Coll Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) + ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field_Query_droid_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } - rctx.Args = args - rctx.Stats.ArgumentsCompleted = graphql.Now() + fc.Args = args + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().Droid(rctx, args["id"].(string)) @@ -2005,12 +2003,12 @@ func (ec *executionContext) _Query_droid(ctx context.Context, field graphql.Coll return graphql.Null } res := resTmp.(*models.Droid) - rctx.Result = res + fc.Result = res return ec.marshalODroid2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋstarwarsᚋmodelsᚐDroid(ctx, field.Selections, res) } func (ec *executionContext) _Query_human(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Query", Field: field, Args: nil, @@ -2018,21 +2016,21 @@ func (ec *executionContext) _Query_human(ctx context.Context, field graphql.Coll Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) + ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field_Query_human_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } - rctx.Args = args - rctx.Stats.ArgumentsCompleted = graphql.Now() + fc.Args = args + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().Human(rctx, args["id"].(string)) @@ -2045,12 +2043,12 @@ func (ec *executionContext) _Query_human(ctx context.Context, field graphql.Coll return graphql.Null } res := resTmp.(*models.Human) - rctx.Result = res + fc.Result = res return ec.marshalOHuman2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋstarwarsᚋmodelsᚐHuman(ctx, field.Selections, res) } func (ec *executionContext) _Query_starship(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Query", Field: field, Args: nil, @@ -2058,21 +2056,21 @@ func (ec *executionContext) _Query_starship(ctx context.Context, field graphql.C Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) + ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field_Query_starship_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } - rctx.Args = args - rctx.Stats.ArgumentsCompleted = graphql.Now() + fc.Args = args + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().Starship(rctx, args["id"].(string)) @@ -2085,12 +2083,12 @@ func (ec *executionContext) _Query_starship(ctx context.Context, field graphql.C return graphql.Null } res := resTmp.(*models.Starship) - rctx.Result = res + fc.Result = res return ec.marshalOStarship2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋstarwarsᚋmodelsᚐStarship(ctx, field.Selections, res) } func (ec *executionContext) _Query___type(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Query", Field: field, Args: nil, @@ -2098,21 +2096,21 @@ func (ec *executionContext) _Query___type(ctx context.Context, field graphql.Col Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) + ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field_Query___type_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } - rctx.Args = args - rctx.Stats.ArgumentsCompleted = graphql.Now() + fc.Args = args + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.introspectType(args["name"].(string)) @@ -2125,12 +2123,12 @@ func (ec *executionContext) _Query___type(ctx context.Context, field graphql.Col return graphql.Null } res := resTmp.(*introspection.Type) - rctx.Result = res + fc.Result = res return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Query", Field: field, Args: nil, @@ -2138,14 +2136,14 @@ func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.C Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.introspectSchema() @@ -2158,12 +2156,12 @@ func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.C return graphql.Null } res := resTmp.(*introspection.Schema) - rctx.Result = res + fc.Result = res return ec.marshalO__Schema2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐSchema(ctx, field.Selections, res) } func (ec *executionContext) _Review_stars(ctx context.Context, field graphql.CollectedField, obj *models.Review) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Review", Field: field, Args: nil, @@ -2171,14 +2169,14 @@ func (ec *executionContext) _Review_stars(ctx context.Context, field graphql.Col Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Stars, nil @@ -2188,18 +2186,18 @@ func (ec *executionContext) _Review_stars(ctx context.Context, field graphql.Col return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(int) - rctx.Result = res + fc.Result = res return ec.marshalNInt2int(ctx, field.Selections, res) } func (ec *executionContext) _Review_commentary(ctx context.Context, field graphql.CollectedField, obj *models.Review) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Review", Field: field, Args: nil, @@ -2207,14 +2205,14 @@ func (ec *executionContext) _Review_commentary(ctx context.Context, field graphq Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Commentary, nil @@ -2227,12 +2225,12 @@ func (ec *executionContext) _Review_commentary(ctx context.Context, field graphq return graphql.Null } res := resTmp.(*string) - rctx.Result = res + fc.Result = res return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } func (ec *executionContext) _Review_time(ctx context.Context, field graphql.CollectedField, obj *models.Review) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Review", Field: field, Args: nil, @@ -2240,14 +2238,14 @@ func (ec *executionContext) _Review_time(ctx context.Context, field graphql.Coll Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Time, nil @@ -2260,12 +2258,12 @@ func (ec *executionContext) _Review_time(ctx context.Context, field graphql.Coll return graphql.Null } res := resTmp.(time.Time) - rctx.Result = res + fc.Result = res return ec.marshalOTime2timeᚐTime(ctx, field.Selections, res) } func (ec *executionContext) _Starship_id(ctx context.Context, field graphql.CollectedField, obj *models.Starship) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Starship", Field: field, Args: nil, @@ -2273,14 +2271,14 @@ func (ec *executionContext) _Starship_id(ctx context.Context, field graphql.Coll Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.ID, nil @@ -2290,18 +2288,18 @@ func (ec *executionContext) _Starship_id(ctx context.Context, field graphql.Coll return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalNID2string(ctx, field.Selections, res) } func (ec *executionContext) _Starship_name(ctx context.Context, field graphql.CollectedField, obj *models.Starship) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Starship", Field: field, Args: nil, @@ -2309,14 +2307,14 @@ func (ec *executionContext) _Starship_name(ctx context.Context, field graphql.Co Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Name, nil @@ -2326,18 +2324,18 @@ func (ec *executionContext) _Starship_name(ctx context.Context, field graphql.Co return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalNString2string(ctx, field.Selections, res) } func (ec *executionContext) _Starship_length(ctx context.Context, field graphql.CollectedField, obj *models.Starship) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Starship", Field: field, Args: nil, @@ -2345,21 +2343,21 @@ func (ec *executionContext) _Starship_length(ctx context.Context, field graphql. Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) + ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field_Starship_length_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } - rctx.Args = args - rctx.Stats.ArgumentsCompleted = graphql.Now() + fc.Args = args + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Starship().Length(rctx, obj, args["unit"].(*models.LengthUnit)) @@ -2369,18 +2367,18 @@ func (ec *executionContext) _Starship_length(ctx context.Context, field graphql. return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(float64) - rctx.Result = res + fc.Result = res return ec.marshalNFloat2float64(ctx, field.Selections, res) } func (ec *executionContext) _Starship_history(ctx context.Context, field graphql.CollectedField, obj *models.Starship) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Starship", Field: field, Args: nil, @@ -2388,14 +2386,14 @@ func (ec *executionContext) _Starship_history(ctx context.Context, field graphql Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.History, nil @@ -2405,18 +2403,18 @@ func (ec *executionContext) _Starship_history(ctx context.Context, field graphql return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.([][]int) - rctx.Result = res + fc.Result = res return ec.marshalNInt2ᚕᚕint(ctx, field.Selections, res) } func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Directive", Field: field, Args: nil, @@ -2424,14 +2422,14 @@ func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Name, nil @@ -2441,18 +2439,18 @@ func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalNString2string(ctx, field.Selections, res) } func (ec *executionContext) ___Directive_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Directive", Field: field, Args: nil, @@ -2460,14 +2458,14 @@ func (ec *executionContext) ___Directive_description(ctx context.Context, field Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Description, nil @@ -2480,12 +2478,12 @@ func (ec *executionContext) ___Directive_description(ctx context.Context, field return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalOString2string(ctx, field.Selections, res) } func (ec *executionContext) ___Directive_locations(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Directive", Field: field, Args: nil, @@ -2493,14 +2491,14 @@ func (ec *executionContext) ___Directive_locations(ctx context.Context, field gr Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Locations, nil @@ -2510,18 +2508,18 @@ func (ec *executionContext) ___Directive_locations(ctx context.Context, field gr return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.([]string) - rctx.Result = res + fc.Result = res return ec.marshalN__DirectiveLocation2ᚕstring(ctx, field.Selections, res) } func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Directive", Field: field, Args: nil, @@ -2529,14 +2527,14 @@ func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Args, nil @@ -2546,18 +2544,18 @@ func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.([]introspection.InputValue) - rctx.Result = res + fc.Result = res return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx, field.Selections, res) } func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__EnumValue", Field: field, Args: nil, @@ -2565,14 +2563,14 @@ func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Name, nil @@ -2582,18 +2580,18 @@ func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalNString2string(ctx, field.Selections, res) } func (ec *executionContext) ___EnumValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__EnumValue", Field: field, Args: nil, @@ -2601,14 +2599,14 @@ func (ec *executionContext) ___EnumValue_description(ctx context.Context, field Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Description, nil @@ -2621,12 +2619,12 @@ func (ec *executionContext) ___EnumValue_description(ctx context.Context, field return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalOString2string(ctx, field.Selections, res) } func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__EnumValue", Field: field, Args: nil, @@ -2634,14 +2632,14 @@ func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.IsDeprecated(), nil @@ -2651,18 +2649,18 @@ func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(bool) - rctx.Result = res + fc.Result = res return ec.marshalNBoolean2bool(ctx, field.Selections, res) } func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__EnumValue", Field: field, Args: nil, @@ -2670,14 +2668,14 @@ func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.DeprecationReason(), nil @@ -2690,12 +2688,12 @@ func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, return graphql.Null } res := resTmp.(*string) - rctx.Result = res + fc.Result = res return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Field", Field: field, Args: nil, @@ -2703,14 +2701,14 @@ func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.Col Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Name, nil @@ -2720,18 +2718,18 @@ func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.Col return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalNString2string(ctx, field.Selections, res) } func (ec *executionContext) ___Field_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Field", Field: field, Args: nil, @@ -2739,14 +2737,14 @@ func (ec *executionContext) ___Field_description(ctx context.Context, field grap Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Description, nil @@ -2759,12 +2757,12 @@ func (ec *executionContext) ___Field_description(ctx context.Context, field grap return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalOString2string(ctx, field.Selections, res) } func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Field", Field: field, Args: nil, @@ -2772,14 +2770,14 @@ func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.Col Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Args, nil @@ -2789,18 +2787,18 @@ func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.Col return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.([]introspection.InputValue) - rctx.Result = res + fc.Result = res return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx, field.Selections, res) } func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Field", Field: field, Args: nil, @@ -2808,14 +2806,14 @@ func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.Col Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Type, nil @@ -2825,18 +2823,18 @@ func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.Col return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(*introspection.Type) - rctx.Result = res + fc.Result = res return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Field", Field: field, Args: nil, @@ -2844,14 +2842,14 @@ func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field gra Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.IsDeprecated(), nil @@ -2861,18 +2859,18 @@ func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field gra return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(bool) - rctx.Result = res + fc.Result = res return ec.marshalNBoolean2bool(ctx, field.Selections, res) } func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Field", Field: field, Args: nil, @@ -2880,14 +2878,14 @@ func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, fiel Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.DeprecationReason(), nil @@ -2900,12 +2898,12 @@ func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, fiel return graphql.Null } res := resTmp.(*string) - rctx.Result = res + fc.Result = res return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__InputValue", Field: field, Args: nil, @@ -2913,14 +2911,14 @@ func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphq Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Name, nil @@ -2930,18 +2928,18 @@ func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphq return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalNString2string(ctx, field.Selections, res) } func (ec *executionContext) ___InputValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__InputValue", Field: field, Args: nil, @@ -2949,14 +2947,14 @@ func (ec *executionContext) ___InputValue_description(ctx context.Context, field Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Description, nil @@ -2969,12 +2967,12 @@ func (ec *executionContext) ___InputValue_description(ctx context.Context, field return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalOString2string(ctx, field.Selections, res) } func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__InputValue", Field: field, Args: nil, @@ -2982,14 +2980,14 @@ func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphq Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Type, nil @@ -2999,18 +2997,18 @@ func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphq return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(*introspection.Type) - rctx.Result = res + fc.Result = res return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__InputValue", Field: field, Args: nil, @@ -3018,14 +3016,14 @@ func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, fiel Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.DefaultValue, nil @@ -3038,12 +3036,12 @@ func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, fiel return graphql.Null } res := resTmp.(*string) - rctx.Result = res + fc.Result = res return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Schema", Field: field, Args: nil, @@ -3051,14 +3049,14 @@ func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.C Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Types(), nil @@ -3068,18 +3066,18 @@ func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.C return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.([]introspection.Type) - rctx.Result = res + fc.Result = res return ec.marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Schema", Field: field, Args: nil, @@ -3087,14 +3085,14 @@ func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graph Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.QueryType(), nil @@ -3104,18 +3102,18 @@ func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graph return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(*introspection.Type) - rctx.Result = res + fc.Result = res return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Schema", Field: field, Args: nil, @@ -3123,14 +3121,14 @@ func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field gr Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.MutationType(), nil @@ -3143,12 +3141,12 @@ func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field gr return graphql.Null } res := resTmp.(*introspection.Type) - rctx.Result = res + fc.Result = res return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Schema", Field: field, Args: nil, @@ -3156,14 +3154,14 @@ func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, fiel Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.SubscriptionType(), nil @@ -3176,12 +3174,12 @@ func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, fiel return graphql.Null } res := resTmp.(*introspection.Type) - rctx.Result = res + fc.Result = res return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) ___Schema_directives(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Schema", Field: field, Args: nil, @@ -3189,14 +3187,14 @@ func (ec *executionContext) ___Schema_directives(ctx context.Context, field grap Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Directives(), nil @@ -3206,18 +3204,18 @@ func (ec *executionContext) ___Schema_directives(ctx context.Context, field grap return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.([]introspection.Directive) - rctx.Result = res + fc.Result = res return ec.marshalN__Directive2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirective(ctx, field.Selections, res) } func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, @@ -3225,14 +3223,14 @@ func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.Coll Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Kind(), nil @@ -3242,18 +3240,18 @@ func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.Coll return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalN__TypeKind2string(ctx, field.Selections, res) } func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, @@ -3261,14 +3259,14 @@ func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.Coll Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Name(), nil @@ -3281,12 +3279,12 @@ func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.Coll return graphql.Null } res := resTmp.(*string) - rctx.Result = res + fc.Result = res return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } func (ec *executionContext) ___Type_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, @@ -3294,14 +3292,14 @@ func (ec *executionContext) ___Type_description(ctx context.Context, field graph Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Description(), nil @@ -3314,12 +3312,12 @@ func (ec *executionContext) ___Type_description(ctx context.Context, field graph return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalOString2string(ctx, field.Selections, res) } func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, @@ -3327,21 +3325,21 @@ func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.Co Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) + ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field___Type_fields_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } - rctx.Args = args - rctx.Stats.ArgumentsCompleted = graphql.Now() + fc.Args = args + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Fields(args["includeDeprecated"].(bool)), nil @@ -3354,12 +3352,12 @@ func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.Co return graphql.Null } res := resTmp.([]introspection.Field) - rctx.Result = res + fc.Result = res return ec.marshalO__Field2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐField(ctx, field.Selections, res) } func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, @@ -3367,14 +3365,14 @@ func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphq Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Interfaces(), nil @@ -3387,12 +3385,12 @@ func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphq return graphql.Null } res := resTmp.([]introspection.Type) - rctx.Result = res + fc.Result = res return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, @@ -3400,14 +3398,14 @@ func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field gra Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.PossibleTypes(), nil @@ -3420,12 +3418,12 @@ func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field gra return graphql.Null } res := resTmp.([]introspection.Type) - rctx.Result = res + fc.Result = res return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, @@ -3433,21 +3431,21 @@ func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphq Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) + ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field___Type_enumValues_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } - rctx.Args = args - rctx.Stats.ArgumentsCompleted = graphql.Now() + fc.Args = args + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.EnumValues(args["includeDeprecated"].(bool)), nil @@ -3460,12 +3458,12 @@ func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphq return graphql.Null } res := resTmp.([]introspection.EnumValue) - rctx.Result = res + fc.Result = res return ec.marshalO__EnumValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValue(ctx, field.Selections, res) } func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, @@ -3473,14 +3471,14 @@ func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graph Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.InputFields(), nil @@ -3493,12 +3491,12 @@ func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graph return graphql.Null } res := resTmp.([]introspection.InputValue) - rctx.Result = res + fc.Result = res return ec.marshalO__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx, field.Selections, res) } func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, @@ -3506,14 +3504,14 @@ func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.Co Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.OfType(), nil @@ -3526,7 +3524,7 @@ func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.Co return graphql.Null } res := resTmp.(*introspection.Type) - rctx.Result = res + fc.Result = res return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } @@ -3842,8 +3840,9 @@ var mutationImplementors = []string{"Mutation"} func (ec *executionContext) _Mutation(ctx context.Context, sel ast.SelectionSet) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, mutationImplementors) - ctx = graphql.WithResolverContext(ctx, &graphql.ResolverContext{ + ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{ Object: "Mutation", + Stats: graphql.FieldStats{Started: graphql.Now()}, }) out := graphql.NewFieldSet(fields) @@ -3907,8 +3906,9 @@ var queryImplementors = []string{"Query"} func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, queryImplementors) - ctx = graphql.WithResolverContext(ctx, &graphql.ResolverContext{ + ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{ Object: "Query", + Stats: graphql.FieldStats{Started: graphql.Now()}, }) out := graphql.NewFieldSet(fields) @@ -4349,7 +4349,7 @@ func (ec *executionContext) unmarshalNBoolean2bool(ctx context.Context, v interf func (ec *executionContext) marshalNBoolean2bool(ctx context.Context, sel ast.SelectionSet, v bool) graphql.Marshaler { res := graphql.MarshalBoolean(v) if res == graphql.Null { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } } @@ -4358,7 +4358,7 @@ func (ec *executionContext) marshalNBoolean2bool(ctx context.Context, sel ast.Se func (ec *executionContext) marshalNCharacter2githubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋstarwarsᚋmodelsᚐCharacter(ctx context.Context, sel ast.SelectionSet, v models.Character) graphql.Marshaler { if v == nil { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } return graphql.Null @@ -4404,11 +4404,12 @@ func (ec *executionContext) marshalNEpisode2ᚕgithubᚗcomᚋ99designsᚋgqlgen } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -4439,7 +4440,7 @@ func (ec *executionContext) unmarshalNFloat2float64(ctx context.Context, v inter func (ec *executionContext) marshalNFloat2float64(ctx context.Context, sel ast.SelectionSet, v float64) graphql.Marshaler { res := graphql.MarshalFloat(v) if res == graphql.Null { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } } @@ -4452,7 +4453,7 @@ func (ec *executionContext) marshalNFriendsConnection2githubᚗcomᚋ99designs func (ec *executionContext) marshalNFriendsConnection2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋstarwarsᚋmodelsᚐFriendsConnection(ctx context.Context, sel ast.SelectionSet, v *models.FriendsConnection) graphql.Marshaler { if v == nil { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } return graphql.Null @@ -4466,7 +4467,7 @@ func (ec *executionContext) marshalNFriendsEdge2githubᚗcomᚋ99designsᚋgqlge func (ec *executionContext) marshalNFriendsEdge2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋstarwarsᚋmodelsᚐFriendsEdge(ctx context.Context, sel ast.SelectionSet, v *models.FriendsEdge) graphql.Marshaler { if v == nil { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } return graphql.Null @@ -4481,7 +4482,7 @@ func (ec *executionContext) unmarshalNID2string(ctx context.Context, v interface func (ec *executionContext) marshalNID2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { res := graphql.MarshalID(v) if res == graphql.Null { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } } @@ -4495,7 +4496,7 @@ func (ec *executionContext) unmarshalNInt2int(ctx context.Context, v interface{} func (ec *executionContext) marshalNInt2int(ctx context.Context, sel ast.SelectionSet, v int) graphql.Marshaler { res := graphql.MarshalInt(v) if res == graphql.Null { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } } @@ -4577,11 +4578,12 @@ func (ec *executionContext) marshalNReview2ᚕᚖgithubᚗcomᚋ99designsᚋgqlg } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -4607,7 +4609,7 @@ func (ec *executionContext) marshalNReview2ᚕᚖgithubᚗcomᚋ99designsᚋgqlg func (ec *executionContext) marshalNReview2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋstarwarsᚋmodelsᚐReview(ctx context.Context, sel ast.SelectionSet, v *models.Review) graphql.Marshaler { if v == nil { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } return graphql.Null @@ -4621,7 +4623,7 @@ func (ec *executionContext) unmarshalNReviewInput2githubᚗcomᚋ99designsᚋgql func (ec *executionContext) marshalNSearchResult2githubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋstarwarsᚋmodelsᚐSearchResult(ctx context.Context, sel ast.SelectionSet, v models.SearchResult) graphql.Marshaler { if v == nil { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } return graphql.Null @@ -4638,11 +4640,12 @@ func (ec *executionContext) marshalNSearchResult2ᚕgithubᚗcomᚋ99designsᚋg } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -4672,7 +4675,7 @@ func (ec *executionContext) marshalNStarship2githubᚗcomᚋ99designsᚋgqlgen func (ec *executionContext) marshalNStarship2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋstarwarsᚋmodelsᚐStarship(ctx context.Context, sel ast.SelectionSet, v *models.Starship) graphql.Marshaler { if v == nil { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } return graphql.Null @@ -4687,7 +4690,7 @@ func (ec *executionContext) unmarshalNString2string(ctx context.Context, v inter func (ec *executionContext) marshalNString2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { res := graphql.MarshalString(v) if res == graphql.Null { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } } @@ -4707,11 +4710,12 @@ func (ec *executionContext) marshalN__Directive2ᚕgithubᚗcomᚋ99designsᚋgq } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -4742,7 +4746,7 @@ func (ec *executionContext) unmarshalN__DirectiveLocation2string(ctx context.Con func (ec *executionContext) marshalN__DirectiveLocation2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { res := graphql.MarshalString(v) if res == graphql.Null { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } } @@ -4778,11 +4782,12 @@ func (ec *executionContext) marshalN__DirectiveLocation2ᚕstring(ctx context.Co } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -4827,11 +4832,12 @@ func (ec *executionContext) marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋg } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -4868,11 +4874,12 @@ func (ec *executionContext) marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgen } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -4898,7 +4905,7 @@ func (ec *executionContext) marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgen func (ec *executionContext) marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v *introspection.Type) graphql.Marshaler { if v == nil { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } return graphql.Null @@ -4913,7 +4920,7 @@ func (ec *executionContext) unmarshalN__TypeKind2string(ctx context.Context, v i func (ec *executionContext) marshalN__TypeKind2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { res := graphql.MarshalString(v) if res == graphql.Null { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } } @@ -4962,11 +4969,12 @@ func (ec *executionContext) marshalOCharacter2ᚕgithubᚗcomᚋ99designsᚋgqlg } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -5045,11 +5053,12 @@ func (ec *executionContext) marshalOFriendsEdge2ᚕᚖgithubᚗcomᚋ99designs } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -5181,11 +5190,12 @@ func (ec *executionContext) marshalOStarship2ᚕᚖgithubᚗcomᚋ99designsᚋgq } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -5274,11 +5284,12 @@ func (ec *executionContext) marshalO__EnumValue2ᚕgithubᚗcomᚋ99designsᚋgq } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -5314,11 +5325,12 @@ func (ec *executionContext) marshalO__Field2ᚕgithubᚗcomᚋ99designsᚋgqlgen } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -5354,11 +5366,12 @@ func (ec *executionContext) marshalO__InputValue2ᚕgithubᚗcomᚋ99designsᚋg } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -5409,11 +5422,12 @@ func (ec *executionContext) marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgen } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { diff --git a/example/starwars/server/server.go b/example/starwars/server/server.go index 13734ceff74..73c7bebca30 100644 --- a/example/starwars/server/server.go +++ b/example/starwars/server/server.go @@ -18,7 +18,7 @@ func main() { http.Handle("/", playground.Handler("Starwars", "/query")) http.Handle("/query", handler.GraphQL(generated.NewExecutableSchema(starwars.NewResolver()), handler.ResolverMiddleware(func(ctx context.Context, next graphql.Resolver) (res interface{}, err error) { - rc := graphql.GetResolverContext(ctx) + rc := graphql.GetFieldContext(ctx) fmt.Println("Entered", rc.Object, rc.Field.Name) res, err = next(ctx) fmt.Println("Left", rc.Object, rc.Field.Name, "=>", res, err) diff --git a/example/todo/generated.go b/example/todo/generated.go index 57fc9dc6fa4..b59f468dc56 100644 --- a/example/todo/generated.go +++ b/example/todo/generated.go @@ -1,5 +1,3 @@ -// Code generated by github.com/99designs/gqlgen, DO NOT EDIT. - package todo import ( @@ -466,8 +464,8 @@ func (ec *executionContext) _mutationMiddleware(ctx context.Context, obj *ast.Op } func (ec *executionContext) _fieldMiddleware(ctx context.Context, obj interface{}, next graphql.Resolver) interface{} { - rctx := graphql.GetResolverContext(ctx) - for _, d := range rctx.Field.Directives { + fc := graphql.GetFieldContext(ctx) + for _, d := range fc.Field.Directives { switch d.Name { case "user": rawArgs := d.ArgumentMap(ec.Variables) @@ -498,7 +496,7 @@ func (ec *executionContext) _fieldMiddleware(ctx context.Context, obj interface{ // region **************************** field.gotpl ***************************** func (ec *executionContext) _MyMutation_createTodo(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "MyMutation", Field: field, Args: nil, @@ -506,39 +504,39 @@ func (ec *executionContext) _MyMutation_createTodo(ctx context.Context, field gr Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) + ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field_MyMutation_createTodo_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } - rctx.Args = args - rctx.Stats.ArgumentsCompleted = graphql.Now() + fc.Args = args + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.MyMutation().CreateTodo(rctx, args["todo"].(TodoInput)) }) if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(*Todo) - rctx.Result = res + fc.Result = res return ec.marshalNTodo2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋtodoᚐTodo(ctx, field.Selections, res) } func (ec *executionContext) _MyMutation_updateTodo(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "MyMutation", Field: field, Args: nil, @@ -546,21 +544,21 @@ func (ec *executionContext) _MyMutation_updateTodo(ctx context.Context, field gr Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) + ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field_MyMutation_updateTodo_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } - rctx.Args = args - rctx.Stats.ArgumentsCompleted = graphql.Now() + fc.Args = args + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.MyMutation().UpdateTodo(rctx, args["id"].(int), args["changes"].(map[string]interface{})) @@ -570,12 +568,12 @@ func (ec *executionContext) _MyMutation_updateTodo(ctx context.Context, field gr return graphql.Null } res := resTmp.(*Todo) - rctx.Result = res + fc.Result = res return ec.marshalOTodo2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋtodoᚐTodo(ctx, field.Selections, res) } func (ec *executionContext) _MyQuery_todo(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "MyQuery", Field: field, Args: nil, @@ -583,21 +581,21 @@ func (ec *executionContext) _MyQuery_todo(ctx context.Context, field graphql.Col Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) + ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field_MyQuery_todo_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } - rctx.Args = args - rctx.Stats.ArgumentsCompleted = graphql.Now() + fc.Args = args + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.MyQuery().Todo(rctx, args["id"].(int)) @@ -607,12 +605,12 @@ func (ec *executionContext) _MyQuery_todo(ctx context.Context, field graphql.Col return graphql.Null } res := resTmp.(*Todo) - rctx.Result = res + fc.Result = res return ec.marshalOTodo2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋtodoᚐTodo(ctx, field.Selections, res) } func (ec *executionContext) _MyQuery_lastTodo(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "MyQuery", Field: field, Args: nil, @@ -620,14 +618,14 @@ func (ec *executionContext) _MyQuery_lastTodo(ctx context.Context, field graphql Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.MyQuery().LastTodo(rctx) @@ -637,12 +635,12 @@ func (ec *executionContext) _MyQuery_lastTodo(ctx context.Context, field graphql return graphql.Null } res := resTmp.(*Todo) - rctx.Result = res + fc.Result = res return ec.marshalOTodo2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋtodoᚐTodo(ctx, field.Selections, res) } func (ec *executionContext) _MyQuery_todos(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "MyQuery", Field: field, Args: nil, @@ -650,32 +648,32 @@ func (ec *executionContext) _MyQuery_todos(ctx context.Context, field graphql.Co Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.MyQuery().Todos(rctx) }) if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.([]*Todo) - rctx.Result = res + fc.Result = res return ec.marshalNTodo2ᚕᚖgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋtodoᚐTodo(ctx, field.Selections, res) } func (ec *executionContext) _MyQuery___type(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "MyQuery", Field: field, Args: nil, @@ -683,21 +681,21 @@ func (ec *executionContext) _MyQuery___type(ctx context.Context, field graphql.C Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) + ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field_MyQuery___type_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } - rctx.Args = args - rctx.Stats.ArgumentsCompleted = graphql.Now() + fc.Args = args + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.introspectType(args["name"].(string)) @@ -707,12 +705,12 @@ func (ec *executionContext) _MyQuery___type(ctx context.Context, field graphql.C return graphql.Null } res := resTmp.(*introspection.Type) - rctx.Result = res + fc.Result = res return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) _MyQuery___schema(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "MyQuery", Field: field, Args: nil, @@ -720,14 +718,14 @@ func (ec *executionContext) _MyQuery___schema(ctx context.Context, field graphql Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.introspectSchema() @@ -737,12 +735,12 @@ func (ec *executionContext) _MyQuery___schema(ctx context.Context, field graphql return graphql.Null } res := resTmp.(*introspection.Schema) - rctx.Result = res + fc.Result = res return ec.marshalO__Schema2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐSchema(ctx, field.Selections, res) } func (ec *executionContext) _Todo_id(ctx context.Context, field graphql.CollectedField, obj *Todo) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Todo", Field: field, Args: nil, @@ -750,32 +748,32 @@ func (ec *executionContext) _Todo_id(ctx context.Context, field graphql.Collecte Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.ID, nil }) if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(int) - rctx.Result = res + fc.Result = res return ec.marshalNID2int(ctx, field.Selections, res) } func (ec *executionContext) _Todo_text(ctx context.Context, field graphql.CollectedField, obj *Todo) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Todo", Field: field, Args: nil, @@ -783,32 +781,32 @@ func (ec *executionContext) _Todo_text(ctx context.Context, field graphql.Collec Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Text, nil }) if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalNString2string(ctx, field.Selections, res) } func (ec *executionContext) _Todo_done(ctx context.Context, field graphql.CollectedField, obj *Todo) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Todo", Field: field, Args: nil, @@ -816,14 +814,14 @@ func (ec *executionContext) _Todo_done(ctx context.Context, field graphql.Collec Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { directive0 := func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children @@ -854,18 +852,18 @@ func (ec *executionContext) _Todo_done(ctx context.Context, field graphql.Collec }) if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(bool) - rctx.Result = res + fc.Result = res return ec.marshalNBoolean2bool(ctx, field.Selections, res) } func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Directive", Field: field, Args: nil, @@ -873,32 +871,32 @@ func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Name, nil }) if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalNString2string(ctx, field.Selections, res) } func (ec *executionContext) ___Directive_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Directive", Field: field, Args: nil, @@ -906,14 +904,14 @@ func (ec *executionContext) ___Directive_description(ctx context.Context, field Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Description, nil @@ -923,12 +921,12 @@ func (ec *executionContext) ___Directive_description(ctx context.Context, field return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalOString2string(ctx, field.Selections, res) } func (ec *executionContext) ___Directive_locations(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Directive", Field: field, Args: nil, @@ -936,32 +934,32 @@ func (ec *executionContext) ___Directive_locations(ctx context.Context, field gr Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Locations, nil }) if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.([]string) - rctx.Result = res + fc.Result = res return ec.marshalN__DirectiveLocation2ᚕstring(ctx, field.Selections, res) } func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Directive", Field: field, Args: nil, @@ -969,32 +967,32 @@ func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Args, nil }) if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.([]introspection.InputValue) - rctx.Result = res + fc.Result = res return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx, field.Selections, res) } func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__EnumValue", Field: field, Args: nil, @@ -1002,32 +1000,32 @@ func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Name, nil }) if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalNString2string(ctx, field.Selections, res) } func (ec *executionContext) ___EnumValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__EnumValue", Field: field, Args: nil, @@ -1035,14 +1033,14 @@ func (ec *executionContext) ___EnumValue_description(ctx context.Context, field Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Description, nil @@ -1052,12 +1050,12 @@ func (ec *executionContext) ___EnumValue_description(ctx context.Context, field return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalOString2string(ctx, field.Selections, res) } func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__EnumValue", Field: field, Args: nil, @@ -1065,32 +1063,32 @@ func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.IsDeprecated(), nil }) if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(bool) - rctx.Result = res + fc.Result = res return ec.marshalNBoolean2bool(ctx, field.Selections, res) } func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__EnumValue", Field: field, Args: nil, @@ -1098,14 +1096,14 @@ func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.DeprecationReason(), nil @@ -1115,12 +1113,12 @@ func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, return graphql.Null } res := resTmp.(*string) - rctx.Result = res + fc.Result = res return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Field", Field: field, Args: nil, @@ -1128,32 +1126,32 @@ func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.Col Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Name, nil }) if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalNString2string(ctx, field.Selections, res) } func (ec *executionContext) ___Field_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Field", Field: field, Args: nil, @@ -1161,14 +1159,14 @@ func (ec *executionContext) ___Field_description(ctx context.Context, field grap Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Description, nil @@ -1178,12 +1176,12 @@ func (ec *executionContext) ___Field_description(ctx context.Context, field grap return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalOString2string(ctx, field.Selections, res) } func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Field", Field: field, Args: nil, @@ -1191,32 +1189,32 @@ func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.Col Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Args, nil }) if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.([]introspection.InputValue) - rctx.Result = res + fc.Result = res return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx, field.Selections, res) } func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Field", Field: field, Args: nil, @@ -1224,32 +1222,32 @@ func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.Col Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Type, nil }) if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(*introspection.Type) - rctx.Result = res + fc.Result = res return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Field", Field: field, Args: nil, @@ -1257,32 +1255,32 @@ func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field gra Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.IsDeprecated(), nil }) if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(bool) - rctx.Result = res + fc.Result = res return ec.marshalNBoolean2bool(ctx, field.Selections, res) } func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Field", Field: field, Args: nil, @@ -1290,14 +1288,14 @@ func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, fiel Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.DeprecationReason(), nil @@ -1307,12 +1305,12 @@ func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, fiel return graphql.Null } res := resTmp.(*string) - rctx.Result = res + fc.Result = res return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__InputValue", Field: field, Args: nil, @@ -1320,32 +1318,32 @@ func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphq Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Name, nil }) if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalNString2string(ctx, field.Selections, res) } func (ec *executionContext) ___InputValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__InputValue", Field: field, Args: nil, @@ -1353,14 +1351,14 @@ func (ec *executionContext) ___InputValue_description(ctx context.Context, field Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Description, nil @@ -1370,12 +1368,12 @@ func (ec *executionContext) ___InputValue_description(ctx context.Context, field return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalOString2string(ctx, field.Selections, res) } func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__InputValue", Field: field, Args: nil, @@ -1383,32 +1381,32 @@ func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphq Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Type, nil }) if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(*introspection.Type) - rctx.Result = res + fc.Result = res return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__InputValue", Field: field, Args: nil, @@ -1416,14 +1414,14 @@ func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, fiel Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.DefaultValue, nil @@ -1433,12 +1431,12 @@ func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, fiel return graphql.Null } res := resTmp.(*string) - rctx.Result = res + fc.Result = res return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Schema", Field: field, Args: nil, @@ -1446,32 +1444,32 @@ func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.C Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Types(), nil }) if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.([]introspection.Type) - rctx.Result = res + fc.Result = res return ec.marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Schema", Field: field, Args: nil, @@ -1479,32 +1477,32 @@ func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graph Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.QueryType(), nil }) if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(*introspection.Type) - rctx.Result = res + fc.Result = res return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Schema", Field: field, Args: nil, @@ -1512,14 +1510,14 @@ func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field gr Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.MutationType(), nil @@ -1529,12 +1527,12 @@ func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field gr return graphql.Null } res := resTmp.(*introspection.Type) - rctx.Result = res + fc.Result = res return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Schema", Field: field, Args: nil, @@ -1542,14 +1540,14 @@ func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, fiel Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.SubscriptionType(), nil @@ -1559,12 +1557,12 @@ func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, fiel return graphql.Null } res := resTmp.(*introspection.Type) - rctx.Result = res + fc.Result = res return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) ___Schema_directives(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Schema", Field: field, Args: nil, @@ -1572,32 +1570,32 @@ func (ec *executionContext) ___Schema_directives(ctx context.Context, field grap Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Directives(), nil }) if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.([]introspection.Directive) - rctx.Result = res + fc.Result = res return ec.marshalN__Directive2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirective(ctx, field.Selections, res) } func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, @@ -1605,32 +1603,32 @@ func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.Coll Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Kind(), nil }) if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalN__TypeKind2string(ctx, field.Selections, res) } func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, @@ -1638,14 +1636,14 @@ func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.Coll Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Name(), nil @@ -1655,12 +1653,12 @@ func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.Coll return graphql.Null } res := resTmp.(*string) - rctx.Result = res + fc.Result = res return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } func (ec *executionContext) ___Type_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, @@ -1668,14 +1666,14 @@ func (ec *executionContext) ___Type_description(ctx context.Context, field graph Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Description(), nil @@ -1685,12 +1683,12 @@ func (ec *executionContext) ___Type_description(ctx context.Context, field graph return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalOString2string(ctx, field.Selections, res) } func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, @@ -1698,21 +1696,21 @@ func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.Co Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) + ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field___Type_fields_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } - rctx.Args = args - rctx.Stats.ArgumentsCompleted = graphql.Now() + fc.Args = args + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Fields(args["includeDeprecated"].(bool)), nil @@ -1722,12 +1720,12 @@ func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.Co return graphql.Null } res := resTmp.([]introspection.Field) - rctx.Result = res + fc.Result = res return ec.marshalO__Field2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐField(ctx, field.Selections, res) } func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, @@ -1735,14 +1733,14 @@ func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphq Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Interfaces(), nil @@ -1752,12 +1750,12 @@ func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphq return graphql.Null } res := resTmp.([]introspection.Type) - rctx.Result = res + fc.Result = res return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, @@ -1765,14 +1763,14 @@ func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field gra Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.PossibleTypes(), nil @@ -1782,12 +1780,12 @@ func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field gra return graphql.Null } res := resTmp.([]introspection.Type) - rctx.Result = res + fc.Result = res return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, @@ -1795,21 +1793,21 @@ func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphq Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) + ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field___Type_enumValues_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } - rctx.Args = args - rctx.Stats.ArgumentsCompleted = graphql.Now() + fc.Args = args + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.EnumValues(args["includeDeprecated"].(bool)), nil @@ -1819,12 +1817,12 @@ func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphq return graphql.Null } res := resTmp.([]introspection.EnumValue) - rctx.Result = res + fc.Result = res return ec.marshalO__EnumValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValue(ctx, field.Selections, res) } func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, @@ -1832,14 +1830,14 @@ func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graph Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.InputFields(), nil @@ -1849,12 +1847,12 @@ func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graph return graphql.Null } res := resTmp.([]introspection.InputValue) - rctx.Result = res + fc.Result = res return ec.marshalO__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx, field.Selections, res) } func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, @@ -1862,14 +1860,14 @@ func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.Co Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.OfType(), nil @@ -1879,7 +1877,7 @@ func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.Co return graphql.Null } res := resTmp.(*introspection.Type) - rctx.Result = res + fc.Result = res return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } @@ -1924,8 +1922,9 @@ var myMutationImplementors = []string{"MyMutation"} func (ec *executionContext) _MyMutation(ctx context.Context, sel ast.SelectionSet) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, myMutationImplementors) - ctx = graphql.WithResolverContext(ctx, &graphql.ResolverContext{ + ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{ Object: "MyMutation", + Stats: graphql.FieldStats{Started: graphql.Now()}, }) out := graphql.NewFieldSet(fields) @@ -1957,8 +1956,9 @@ var myQueryImplementors = []string{"MyQuery"} func (ec *executionContext) _MyQuery(ctx context.Context, sel ast.SelectionSet) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, myQueryImplementors) - ctx = graphql.WithResolverContext(ctx, &graphql.ResolverContext{ + ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{ Object: "MyQuery", + Stats: graphql.FieldStats{Started: graphql.Now()}, }) out := graphql.NewFieldSet(fields) @@ -2307,7 +2307,7 @@ func (ec *executionContext) unmarshalNBoolean2bool(ctx context.Context, v interf func (ec *executionContext) marshalNBoolean2bool(ctx context.Context, sel ast.SelectionSet, v bool) graphql.Marshaler { res := graphql.MarshalBoolean(v) if res == graphql.Null { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } } @@ -2321,7 +2321,7 @@ func (ec *executionContext) unmarshalNID2int(ctx context.Context, v interface{}) func (ec *executionContext) marshalNID2int(ctx context.Context, sel ast.SelectionSet, v int) graphql.Marshaler { res := graphql.MarshalIntID(v) if res == graphql.Null { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } } @@ -2337,14 +2337,14 @@ func (ec *executionContext) unmarshalNMap2map(ctx context.Context, v interface{} func (ec *executionContext) marshalNMap2map(ctx context.Context, sel ast.SelectionSet, v map[string]interface{}) graphql.Marshaler { if v == nil { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := graphql.MarshalMap(v) if res == graphql.Null { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } } @@ -2367,7 +2367,7 @@ func (ec *executionContext) unmarshalNString2string(ctx context.Context, v inter func (ec *executionContext) marshalNString2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { res := graphql.MarshalString(v) if res == graphql.Null { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } } @@ -2387,11 +2387,12 @@ func (ec *executionContext) marshalNTodo2ᚕᚖgithubᚗcomᚋ99designsᚋgqlgen } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -2417,7 +2418,7 @@ func (ec *executionContext) marshalNTodo2ᚕᚖgithubᚗcomᚋ99designsᚋgqlgen func (ec *executionContext) marshalNTodo2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋtodoᚐTodo(ctx context.Context, sel ast.SelectionSet, v *Todo) graphql.Marshaler { if v == nil { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } return graphql.Null @@ -2442,11 +2443,12 @@ func (ec *executionContext) marshalN__Directive2ᚕgithubᚗcomᚋ99designsᚋgq } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -2477,7 +2479,7 @@ func (ec *executionContext) unmarshalN__DirectiveLocation2string(ctx context.Con func (ec *executionContext) marshalN__DirectiveLocation2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { res := graphql.MarshalString(v) if res == graphql.Null { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } } @@ -2513,11 +2515,12 @@ func (ec *executionContext) marshalN__DirectiveLocation2ᚕstring(ctx context.Co } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -2562,11 +2565,12 @@ func (ec *executionContext) marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋg } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -2603,11 +2607,12 @@ func (ec *executionContext) marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgen } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -2633,7 +2638,7 @@ func (ec *executionContext) marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgen func (ec *executionContext) marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v *introspection.Type) graphql.Marshaler { if v == nil { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } return graphql.Null @@ -2648,7 +2653,7 @@ func (ec *executionContext) unmarshalN__TypeKind2string(ctx context.Context, v i func (ec *executionContext) marshalN__TypeKind2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { res := graphql.MarshalString(v) if res == graphql.Null { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } } @@ -2724,11 +2729,12 @@ func (ec *executionContext) marshalO__EnumValue2ᚕgithubᚗcomᚋ99designsᚋgq } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -2764,11 +2770,12 @@ func (ec *executionContext) marshalO__Field2ᚕgithubᚗcomᚋ99designsᚋgqlgen } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -2804,11 +2811,12 @@ func (ec *executionContext) marshalO__InputValue2ᚕgithubᚗcomᚋ99designsᚋg } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -2859,11 +2867,12 @@ func (ec *executionContext) marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgen } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { diff --git a/example/type-system-extension/directive.go b/example/type-system-extension/directive.go index 8b49e929ecd..2b3ff918cec 100644 --- a/example/type-system-extension/directive.go +++ b/example/type-system-extension/directive.go @@ -8,37 +8,37 @@ import ( ) func EnumLogging(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error) { - rc := graphql.GetResolverContext(ctx) + rc := graphql.GetFieldContext(ctx) log.Printf("enum logging: %v, %s, %T, %+v", rc.Path(), rc.Field.Name, obj, obj) return next(ctx) } func FieldLogging(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error) { - rc := graphql.GetResolverContext(ctx) + rc := graphql.GetFieldContext(ctx) log.Printf("field logging: %v, %s, %T, %+v", rc.Path(), rc.Field.Name, obj, obj) return next(ctx) } func InputLogging(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error) { - rc := graphql.GetResolverContext(ctx) + rc := graphql.GetFieldContext(ctx) log.Printf("input object logging: %v, %s, %T, %+v", rc.Path(), rc.Field.Name, obj, obj) return next(ctx) } func ObjectLogging(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error) { - rc := graphql.GetResolverContext(ctx) + rc := graphql.GetFieldContext(ctx) log.Printf("object logging: %v, %s, %T, %+v", rc.Path(), rc.Field.Name, obj, obj) return next(ctx) } func ScalarLogging(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error) { - rc := graphql.GetResolverContext(ctx) + rc := graphql.GetFieldContext(ctx) log.Printf("scalar logging: %v, %s, %T, %+v", rc.Path(), rc.Field.Name, obj, obj) return next(ctx) } func UnionLogging(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error) { - rc := graphql.GetResolverContext(ctx) + rc := graphql.GetFieldContext(ctx) log.Printf("union logging: %v, %s, %T, %+v", rc.Path(), rc.Field.Name, obj, obj) return next(ctx) } diff --git a/example/type-system-extension/generated.go b/example/type-system-extension/generated.go index 90f8337cf93..b8dde8dfc0c 100644 --- a/example/type-system-extension/generated.go +++ b/example/type-system-extension/generated.go @@ -1,5 +1,3 @@ -// Code generated by github.com/99designs/gqlgen, DO NOT EDIT. - package type_system_extension import ( @@ -379,7 +377,7 @@ func (ec *executionContext) field___Type_fields_args(ctx context.Context, rawArg // region **************************** field.gotpl ***************************** func (ec *executionContext) _MyMutation_createTodo(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "MyMutation", Field: field, Args: nil, @@ -387,21 +385,21 @@ func (ec *executionContext) _MyMutation_createTodo(ctx context.Context, field gr Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) + ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field_MyMutation_createTodo_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } - rctx.Args = args - rctx.Stats.ArgumentsCompleted = graphql.Now() + fc.Args = args + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.MyMutation().CreateTodo(rctx, args["todo"].(TodoInput)) @@ -411,18 +409,18 @@ func (ec *executionContext) _MyMutation_createTodo(ctx context.Context, field gr return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(*Todo) - rctx.Result = res + fc.Result = res return ec.marshalNTodo2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋtypeᚑsystemᚑextensionᚐTodo(ctx, field.Selections, res) } func (ec *executionContext) _MyQuery_todos(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "MyQuery", Field: field, Args: nil, @@ -430,14 +428,14 @@ func (ec *executionContext) _MyQuery_todos(ctx context.Context, field graphql.Co Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.MyQuery().Todos(rctx) @@ -447,18 +445,18 @@ func (ec *executionContext) _MyQuery_todos(ctx context.Context, field graphql.Co return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.([]*Todo) - rctx.Result = res + fc.Result = res return ec.marshalNTodo2ᚕᚖgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋtypeᚑsystemᚑextensionᚐTodo(ctx, field.Selections, res) } func (ec *executionContext) _MyQuery_todo(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "MyQuery", Field: field, Args: nil, @@ -466,21 +464,21 @@ func (ec *executionContext) _MyQuery_todo(ctx context.Context, field graphql.Col Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) + ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field_MyQuery_todo_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } - rctx.Args = args - rctx.Stats.ArgumentsCompleted = graphql.Now() + fc.Args = args + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.MyQuery().Todo(rctx, args["id"].(string)) @@ -493,12 +491,12 @@ func (ec *executionContext) _MyQuery_todo(ctx context.Context, field graphql.Col return graphql.Null } res := resTmp.(*Todo) - rctx.Result = res + fc.Result = res return ec.marshalOTodo2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋtypeᚑsystemᚑextensionᚐTodo(ctx, field.Selections, res) } func (ec *executionContext) _MyQuery___type(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "MyQuery", Field: field, Args: nil, @@ -506,21 +504,21 @@ func (ec *executionContext) _MyQuery___type(ctx context.Context, field graphql.C Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) + ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field_MyQuery___type_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } - rctx.Args = args - rctx.Stats.ArgumentsCompleted = graphql.Now() + fc.Args = args + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.introspectType(args["name"].(string)) @@ -533,12 +531,12 @@ func (ec *executionContext) _MyQuery___type(ctx context.Context, field graphql.C return graphql.Null } res := resTmp.(*introspection.Type) - rctx.Result = res + fc.Result = res return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) _MyQuery___schema(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "MyQuery", Field: field, Args: nil, @@ -546,14 +544,14 @@ func (ec *executionContext) _MyQuery___schema(ctx context.Context, field graphql Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.introspectSchema() @@ -566,12 +564,12 @@ func (ec *executionContext) _MyQuery___schema(ctx context.Context, field graphql return graphql.Null } res := resTmp.(*introspection.Schema) - rctx.Result = res + fc.Result = res return ec.marshalO__Schema2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐSchema(ctx, field.Selections, res) } func (ec *executionContext) _Todo_id(ctx context.Context, field graphql.CollectedField, obj *Todo) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Todo", Field: field, Args: nil, @@ -579,14 +577,14 @@ func (ec *executionContext) _Todo_id(ctx context.Context, field graphql.Collecte Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.ID, nil @@ -596,18 +594,18 @@ func (ec *executionContext) _Todo_id(ctx context.Context, field graphql.Collecte return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalNID2string(ctx, field.Selections, res) } func (ec *executionContext) _Todo_text(ctx context.Context, field graphql.CollectedField, obj *Todo) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Todo", Field: field, Args: nil, @@ -615,14 +613,14 @@ func (ec *executionContext) _Todo_text(ctx context.Context, field graphql.Collec Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Text, nil @@ -632,18 +630,18 @@ func (ec *executionContext) _Todo_text(ctx context.Context, field graphql.Collec return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalNString2string(ctx, field.Selections, res) } func (ec *executionContext) _Todo_state(ctx context.Context, field graphql.CollectedField, obj *Todo) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Todo", Field: field, Args: nil, @@ -651,14 +649,14 @@ func (ec *executionContext) _Todo_state(ctx context.Context, field graphql.Colle Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.State, nil @@ -668,18 +666,18 @@ func (ec *executionContext) _Todo_state(ctx context.Context, field graphql.Colle return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(State) - rctx.Result = res + fc.Result = res return ec.marshalNState2githubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋtypeᚑsystemᚑextensionᚐState(ctx, field.Selections, res) } func (ec *executionContext) _Todo_verified(ctx context.Context, field graphql.CollectedField, obj *Todo) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Todo", Field: field, Args: nil, @@ -687,14 +685,14 @@ func (ec *executionContext) _Todo_verified(ctx context.Context, field graphql.Co Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { directive0 := func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children @@ -724,18 +722,18 @@ func (ec *executionContext) _Todo_verified(ctx context.Context, field graphql.Co return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(bool) - rctx.Result = res + fc.Result = res return ec.marshalNBoolean2bool(ctx, field.Selections, res) } func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Directive", Field: field, Args: nil, @@ -743,14 +741,14 @@ func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Name, nil @@ -760,18 +758,18 @@ func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalNString2string(ctx, field.Selections, res) } func (ec *executionContext) ___Directive_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Directive", Field: field, Args: nil, @@ -779,14 +777,14 @@ func (ec *executionContext) ___Directive_description(ctx context.Context, field Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Description, nil @@ -799,12 +797,12 @@ func (ec *executionContext) ___Directive_description(ctx context.Context, field return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalOString2string(ctx, field.Selections, res) } func (ec *executionContext) ___Directive_locations(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Directive", Field: field, Args: nil, @@ -812,14 +810,14 @@ func (ec *executionContext) ___Directive_locations(ctx context.Context, field gr Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Locations, nil @@ -829,18 +827,18 @@ func (ec *executionContext) ___Directive_locations(ctx context.Context, field gr return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.([]string) - rctx.Result = res + fc.Result = res return ec.marshalN__DirectiveLocation2ᚕstring(ctx, field.Selections, res) } func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Directive", Field: field, Args: nil, @@ -848,14 +846,14 @@ func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Args, nil @@ -865,18 +863,18 @@ func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.([]introspection.InputValue) - rctx.Result = res + fc.Result = res return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx, field.Selections, res) } func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__EnumValue", Field: field, Args: nil, @@ -884,14 +882,14 @@ func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Name, nil @@ -901,18 +899,18 @@ func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalNString2string(ctx, field.Selections, res) } func (ec *executionContext) ___EnumValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__EnumValue", Field: field, Args: nil, @@ -920,14 +918,14 @@ func (ec *executionContext) ___EnumValue_description(ctx context.Context, field Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Description, nil @@ -940,12 +938,12 @@ func (ec *executionContext) ___EnumValue_description(ctx context.Context, field return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalOString2string(ctx, field.Selections, res) } func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__EnumValue", Field: field, Args: nil, @@ -953,14 +951,14 @@ func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.IsDeprecated(), nil @@ -970,18 +968,18 @@ func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(bool) - rctx.Result = res + fc.Result = res return ec.marshalNBoolean2bool(ctx, field.Selections, res) } func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__EnumValue", Field: field, Args: nil, @@ -989,14 +987,14 @@ func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.DeprecationReason(), nil @@ -1009,12 +1007,12 @@ func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, return graphql.Null } res := resTmp.(*string) - rctx.Result = res + fc.Result = res return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Field", Field: field, Args: nil, @@ -1022,14 +1020,14 @@ func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.Col Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Name, nil @@ -1039,18 +1037,18 @@ func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.Col return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalNString2string(ctx, field.Selections, res) } func (ec *executionContext) ___Field_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Field", Field: field, Args: nil, @@ -1058,14 +1056,14 @@ func (ec *executionContext) ___Field_description(ctx context.Context, field grap Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Description, nil @@ -1078,12 +1076,12 @@ func (ec *executionContext) ___Field_description(ctx context.Context, field grap return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalOString2string(ctx, field.Selections, res) } func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Field", Field: field, Args: nil, @@ -1091,14 +1089,14 @@ func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.Col Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Args, nil @@ -1108,18 +1106,18 @@ func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.Col return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.([]introspection.InputValue) - rctx.Result = res + fc.Result = res return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx, field.Selections, res) } func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Field", Field: field, Args: nil, @@ -1127,14 +1125,14 @@ func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.Col Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Type, nil @@ -1144,18 +1142,18 @@ func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.Col return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(*introspection.Type) - rctx.Result = res + fc.Result = res return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Field", Field: field, Args: nil, @@ -1163,14 +1161,14 @@ func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field gra Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.IsDeprecated(), nil @@ -1180,18 +1178,18 @@ func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field gra return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(bool) - rctx.Result = res + fc.Result = res return ec.marshalNBoolean2bool(ctx, field.Selections, res) } func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Field", Field: field, Args: nil, @@ -1199,14 +1197,14 @@ func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, fiel Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.DeprecationReason(), nil @@ -1219,12 +1217,12 @@ func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, fiel return graphql.Null } res := resTmp.(*string) - rctx.Result = res + fc.Result = res return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__InputValue", Field: field, Args: nil, @@ -1232,14 +1230,14 @@ func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphq Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Name, nil @@ -1249,18 +1247,18 @@ func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphq return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalNString2string(ctx, field.Selections, res) } func (ec *executionContext) ___InputValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__InputValue", Field: field, Args: nil, @@ -1268,14 +1266,14 @@ func (ec *executionContext) ___InputValue_description(ctx context.Context, field Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Description, nil @@ -1288,12 +1286,12 @@ func (ec *executionContext) ___InputValue_description(ctx context.Context, field return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalOString2string(ctx, field.Selections, res) } func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__InputValue", Field: field, Args: nil, @@ -1301,14 +1299,14 @@ func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphq Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Type, nil @@ -1318,18 +1316,18 @@ func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphq return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(*introspection.Type) - rctx.Result = res + fc.Result = res return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__InputValue", Field: field, Args: nil, @@ -1337,14 +1335,14 @@ func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, fiel Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.DefaultValue, nil @@ -1357,12 +1355,12 @@ func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, fiel return graphql.Null } res := resTmp.(*string) - rctx.Result = res + fc.Result = res return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Schema", Field: field, Args: nil, @@ -1370,14 +1368,14 @@ func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.C Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Types(), nil @@ -1387,18 +1385,18 @@ func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.C return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.([]introspection.Type) - rctx.Result = res + fc.Result = res return ec.marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Schema", Field: field, Args: nil, @@ -1406,14 +1404,14 @@ func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graph Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.QueryType(), nil @@ -1423,18 +1421,18 @@ func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graph return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(*introspection.Type) - rctx.Result = res + fc.Result = res return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Schema", Field: field, Args: nil, @@ -1442,14 +1440,14 @@ func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field gr Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.MutationType(), nil @@ -1462,12 +1460,12 @@ func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field gr return graphql.Null } res := resTmp.(*introspection.Type) - rctx.Result = res + fc.Result = res return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Schema", Field: field, Args: nil, @@ -1475,14 +1473,14 @@ func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, fiel Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.SubscriptionType(), nil @@ -1495,12 +1493,12 @@ func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, fiel return graphql.Null } res := resTmp.(*introspection.Type) - rctx.Result = res + fc.Result = res return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) ___Schema_directives(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Schema", Field: field, Args: nil, @@ -1508,14 +1506,14 @@ func (ec *executionContext) ___Schema_directives(ctx context.Context, field grap Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Directives(), nil @@ -1525,18 +1523,18 @@ func (ec *executionContext) ___Schema_directives(ctx context.Context, field grap return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.([]introspection.Directive) - rctx.Result = res + fc.Result = res return ec.marshalN__Directive2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirective(ctx, field.Selections, res) } func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, @@ -1544,14 +1542,14 @@ func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.Coll Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Kind(), nil @@ -1561,18 +1559,18 @@ func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.Coll return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalN__TypeKind2string(ctx, field.Selections, res) } func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, @@ -1580,14 +1578,14 @@ func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.Coll Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Name(), nil @@ -1600,12 +1598,12 @@ func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.Coll return graphql.Null } res := resTmp.(*string) - rctx.Result = res + fc.Result = res return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } func (ec *executionContext) ___Type_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, @@ -1613,14 +1611,14 @@ func (ec *executionContext) ___Type_description(ctx context.Context, field graph Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Description(), nil @@ -1633,12 +1631,12 @@ func (ec *executionContext) ___Type_description(ctx context.Context, field graph return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalOString2string(ctx, field.Selections, res) } func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, @@ -1646,21 +1644,21 @@ func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.Co Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) + ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field___Type_fields_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } - rctx.Args = args - rctx.Stats.ArgumentsCompleted = graphql.Now() + fc.Args = args + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Fields(args["includeDeprecated"].(bool)), nil @@ -1673,12 +1671,12 @@ func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.Co return graphql.Null } res := resTmp.([]introspection.Field) - rctx.Result = res + fc.Result = res return ec.marshalO__Field2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐField(ctx, field.Selections, res) } func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, @@ -1686,14 +1684,14 @@ func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphq Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Interfaces(), nil @@ -1706,12 +1704,12 @@ func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphq return graphql.Null } res := resTmp.([]introspection.Type) - rctx.Result = res + fc.Result = res return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, @@ -1719,14 +1717,14 @@ func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field gra Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.PossibleTypes(), nil @@ -1739,12 +1737,12 @@ func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field gra return graphql.Null } res := resTmp.([]introspection.Type) - rctx.Result = res + fc.Result = res return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, @@ -1752,21 +1750,21 @@ func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphq Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) + ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field___Type_enumValues_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } - rctx.Args = args - rctx.Stats.ArgumentsCompleted = graphql.Now() + fc.Args = args + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.EnumValues(args["includeDeprecated"].(bool)), nil @@ -1779,12 +1777,12 @@ func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphq return graphql.Null } res := resTmp.([]introspection.EnumValue) - rctx.Result = res + fc.Result = res return ec.marshalO__EnumValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValue(ctx, field.Selections, res) } func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, @@ -1792,14 +1790,14 @@ func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graph Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.InputFields(), nil @@ -1812,12 +1810,12 @@ func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graph return graphql.Null } res := resTmp.([]introspection.InputValue) - rctx.Result = res + fc.Result = res return ec.marshalO__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx, field.Selections, res) } func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, @@ -1825,14 +1823,14 @@ func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.Co Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.OfType(), nil @@ -1845,7 +1843,7 @@ func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.Co return graphql.Null } res := resTmp.(*introspection.Type) - rctx.Result = res + fc.Result = res return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } @@ -1910,8 +1908,9 @@ var myMutationImplementors = []string{"MyMutation"} func (ec *executionContext) _MyMutation(ctx context.Context, sel ast.SelectionSet) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, myMutationImplementors) - ctx = graphql.WithResolverContext(ctx, &graphql.ResolverContext{ + ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{ Object: "MyMutation", + Stats: graphql.FieldStats{Started: graphql.Now()}, }) out := graphql.NewFieldSet(fields) @@ -1941,8 +1940,9 @@ var myQueryImplementors = []string{"MyQuery"} func (ec *executionContext) _MyQuery(ctx context.Context, sel ast.SelectionSet) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, myQueryImplementors) - ctx = graphql.WithResolverContext(ctx, &graphql.ResolverContext{ + ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{ Object: "MyQuery", + Stats: graphql.FieldStats{Started: graphql.Now()}, }) out := graphql.NewFieldSet(fields) @@ -2285,7 +2285,7 @@ func (ec *executionContext) unmarshalNBoolean2bool(ctx context.Context, v interf func (ec *executionContext) marshalNBoolean2bool(ctx context.Context, sel ast.SelectionSet, v bool) graphql.Marshaler { res := graphql.MarshalBoolean(v) if res == graphql.Null { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } } @@ -2299,7 +2299,7 @@ func (ec *executionContext) unmarshalNID2string(ctx context.Context, v interface func (ec *executionContext) marshalNID2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { res := graphql.MarshalID(v) if res == graphql.Null { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } } @@ -2322,7 +2322,7 @@ func (ec *executionContext) unmarshalNString2string(ctx context.Context, v inter func (ec *executionContext) marshalNString2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { res := graphql.MarshalString(v) if res == graphql.Null { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } } @@ -2342,11 +2342,12 @@ func (ec *executionContext) marshalNTodo2ᚕᚖgithubᚗcomᚋ99designsᚋgqlgen } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -2372,7 +2373,7 @@ func (ec *executionContext) marshalNTodo2ᚕᚖgithubᚗcomᚋ99designsᚋgqlgen func (ec *executionContext) marshalNTodo2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋtypeᚑsystemᚑextensionᚐTodo(ctx context.Context, sel ast.SelectionSet, v *Todo) graphql.Marshaler { if v == nil { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } return graphql.Null @@ -2397,11 +2398,12 @@ func (ec *executionContext) marshalN__Directive2ᚕgithubᚗcomᚋ99designsᚋgq } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -2432,7 +2434,7 @@ func (ec *executionContext) unmarshalN__DirectiveLocation2string(ctx context.Con func (ec *executionContext) marshalN__DirectiveLocation2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { res := graphql.MarshalString(v) if res == graphql.Null { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } } @@ -2468,11 +2470,12 @@ func (ec *executionContext) marshalN__DirectiveLocation2ᚕstring(ctx context.Co } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -2517,11 +2520,12 @@ func (ec *executionContext) marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋg } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -2558,11 +2562,12 @@ func (ec *executionContext) marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgen } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -2588,7 +2593,7 @@ func (ec *executionContext) marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgen func (ec *executionContext) marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v *introspection.Type) graphql.Marshaler { if v == nil { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } return graphql.Null @@ -2603,7 +2608,7 @@ func (ec *executionContext) unmarshalN__TypeKind2string(ctx context.Context, v i func (ec *executionContext) marshalN__TypeKind2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { res := graphql.MarshalString(v) if res == graphql.Null { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } } @@ -2679,11 +2684,12 @@ func (ec *executionContext) marshalO__EnumValue2ᚕgithubᚗcomᚋ99designsᚋgq } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -2719,11 +2725,12 @@ func (ec *executionContext) marshalO__Field2ᚕgithubᚗcomᚋ99designsᚋgqlgen } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -2759,11 +2766,12 @@ func (ec *executionContext) marshalO__InputValue2ᚕgithubᚗcomᚋ99designsᚋg } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -2814,11 +2822,12 @@ func (ec *executionContext) marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgen } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { diff --git a/graphql/context_resolver.go b/graphql/context_field.go similarity index 77% rename from graphql/context_resolver.go rename to graphql/context_field.go index eb963ef840e..5471adfaccd 100644 --- a/graphql/context_resolver.go +++ b/graphql/context_field.go @@ -9,8 +9,11 @@ type key string const resolverCtx key = "resolver_context" -type ResolverContext struct { - Parent *ResolverContext +// Deprecated: Use FieldContext instead +type ResolverContext = FieldContext + +type FieldContext struct { + Parent *FieldContext // The name of the type this field belongs to Object string // These are the args after processing, they can be mutated in middleware to change what the resolver will get. @@ -39,7 +42,7 @@ type FieldStats struct { Completed time.Time } -func (r *ResolverContext) Path() []interface{} { +func (r *FieldContext) Path() []interface{} { var path []interface{} for it := r; it != nil; it = it.Parent { if it.Index != nil { @@ -58,15 +61,20 @@ func (r *ResolverContext) Path() []interface{} { return path } +// Deprecated: Use GetFieldContext instead func GetResolverContext(ctx context.Context) *ResolverContext { - if val, ok := ctx.Value(resolverCtx).(*ResolverContext); ok { + return GetFieldContext(ctx) +} + +func GetFieldContext(ctx context.Context) *FieldContext { + if val, ok := ctx.Value(resolverCtx).(*FieldContext); ok { return val } return nil } -func WithResolverContext(ctx context.Context, rc *ResolverContext) context.Context { - rc.Parent = GetResolverContext(ctx) +func WithFieldContext(ctx context.Context, rc *FieldContext) context.Context { + rc.Parent = GetFieldContext(ctx) return context.WithValue(ctx, resolverCtx, rc) } diff --git a/graphql/context_resolver_test.go b/graphql/context_field_test.go similarity index 62% rename from graphql/context_resolver_test.go rename to graphql/context_field_test.go index de59bc505d1..05e6cd1a741 100644 --- a/graphql/context_resolver_test.go +++ b/graphql/context_field_test.go @@ -9,10 +9,10 @@ import ( ) func TestGetResolverContext(t *testing.T) { - require.Nil(t, GetResolverContext(context.Background())) + require.Nil(t, GetFieldContext(context.Background())) - rc := &ResolverContext{} - require.Equal(t, rc, GetResolverContext(WithResolverContext(context.Background(), rc))) + rc := &FieldContext{} + require.Equal(t, rc, GetFieldContext(WithFieldContext(context.Background(), rc))) } func testContext(sel ast.SelectionSet) context.Context { @@ -22,12 +22,12 @@ func testContext(sel ast.SelectionSet) context.Context { rqCtx := &OperationContext{} ctx = WithOperationContext(ctx, rqCtx) - root := &ResolverContext{ + root := &FieldContext{ Field: CollectedField{ Selections: sel, }, } - ctx = WithResolverContext(ctx, root) + ctx = WithFieldContext(ctx, root) return ctx } diff --git a/graphql/context_operation.go b/graphql/context_operation.go index daf077a3cba..8d6142ec3ff 100644 --- a/graphql/context_operation.go +++ b/graphql/context_operation.go @@ -64,14 +64,14 @@ func WithOperationContext(ctx context.Context, rc *OperationContext) context.Con // This is just a convenient wrapper method for CollectFields func CollectFieldsCtx(ctx context.Context, satisfies []string) []CollectedField { - resctx := GetResolverContext(ctx) + resctx := GetFieldContext(ctx) return CollectFields(GetOperationContext(ctx), resctx.Field.Selections, satisfies) } // CollectAllFields returns a slice of all GraphQL field names that were selected for the current resolver context. // The slice will contain the unique set of all field names requested regardless of fragment type conditions. func CollectAllFields(ctx context.Context) []string { - resctx := GetResolverContext(ctx) + resctx := GetFieldContext(ctx) collected := CollectFields(GetOperationContext(ctx), resctx.Field.Selections, nil) uniq := make([]string, 0, len(collected)) Next: diff --git a/graphql/context_response.go b/graphql/context_response.go index e88e2b6c1b2..4031752b871 100644 --- a/graphql/context_response.go +++ b/graphql/context_response.go @@ -62,7 +62,7 @@ func Recover(ctx context.Context, err interface{}) (userMessage error) { } // HasFieldError returns true if the given field has already errored -func HasFieldError(ctx context.Context, rctx *ResolverContext) bool { +func HasFieldError(ctx context.Context, rctx *FieldContext) bool { c := getResponseContext(ctx) c.errorsMu.Lock() @@ -78,7 +78,7 @@ func HasFieldError(ctx context.Context, rctx *ResolverContext) bool { } // GetFieldErrors returns a list of errors that occurred in the given field -func GetFieldErrors(ctx context.Context, rctx *ResolverContext) gqlerror.List { +func GetFieldErrors(ctx context.Context, rctx *FieldContext) gqlerror.List { c := getResponseContext(ctx) c.errorsMu.Lock() diff --git a/graphql/context_response_test.go b/graphql/context_response_test.go index a4e16cc86d7..59d80f4403a 100644 --- a/graphql/context_response_test.go +++ b/graphql/context_response_test.go @@ -14,23 +14,23 @@ import ( func TestAddError(t *testing.T) { ctx := WithResponseContext(context.Background(), DefaultErrorPresenter, nil) - root := &ResolverContext{ + root := &FieldContext{ Field: CollectedField{ Field: &ast.Field{ Alias: "foo", }, }, } - ctx = WithResolverContext(ctx, root) + ctx = WithFieldContext(ctx, root) AddError(ctx, errors.New("foo1")) AddError(ctx, errors.New("foo2")) index := 1 - child := &ResolverContext{ + child := &FieldContext{ Parent: root, Index: &index, } - userProvidedPath := &ResolverContext{ + userProvidedPath := &FieldContext{ Parent: child, Field: CollectedField{ Field: &ast.Field{ @@ -39,7 +39,7 @@ func TestAddError(t *testing.T) { }, } - ctx = WithResolverContext(ctx, child) + ctx = WithFieldContext(ctx, child) AddError(ctx, errors.New("bar")) AddError(ctx, &gqlerror.Error{ Message: "foo3", @@ -48,16 +48,16 @@ func TestAddError(t *testing.T) { specs := []struct { Name string - RCtx *ResolverContext + RCtx *FieldContext Messages []string }{ { - Name: "with root ResolverContext", + Name: "with root FieldContext", RCtx: root, Messages: []string{"foo1", "foo2"}, }, { - Name: "with child ResolverContext", + Name: "with child FieldContext", RCtx: child, Messages: []string{"bar"}, }, diff --git a/graphql/error.go b/graphql/error.go index af8b4ce4088..feaf3cc6351 100644 --- a/graphql/error.go +++ b/graphql/error.go @@ -15,7 +15,7 @@ type ExtendedError interface { func DefaultErrorPresenter(ctx context.Context, err error) *gqlerror.Error { if gqlerr, ok := err.(*gqlerror.Error); ok { if gqlerr.Path == nil { - gqlerr.Path = GetResolverContext(ctx).Path() + gqlerr.Path = GetFieldContext(ctx).Path() } return gqlerr } @@ -27,7 +27,7 @@ func DefaultErrorPresenter(ctx context.Context, err error) *gqlerror.Error { return &gqlerror.Error{ Message: err.Error(), - Path: GetResolverContext(ctx).Path(), + Path: GetFieldContext(ctx).Path(), Extensions: extensions, } } diff --git a/graphql/handler/apollotracing/tracer.go b/graphql/handler/apollotracing/tracer.go index d3a10789edc..4c875fc006b 100644 --- a/graphql/handler/apollotracing/tracer.go +++ b/graphql/handler/apollotracing/tracer.go @@ -52,7 +52,7 @@ func (a Tracer) InterceptField(ctx context.Context, next graphql.Resolver) (res defer func() { td.mu.Lock() defer td.mu.Unlock() - fc := graphql.GetResolverContext(ctx) + fc := graphql.GetFieldContext(ctx) end := graphql.Now() diff --git a/graphql/handler/testserver/testserver.go b/graphql/handler/testserver/testserver.go index c4cebcbac00..878b67b7c48 100644 --- a/graphql/handler/testserver/testserver.go +++ b/graphql/handler/testserver/testserver.go @@ -53,7 +53,7 @@ func New() *TestServer { } ran = true // Field execution happens inside the generated code, lets simulate some of it. - ctx = graphql.WithResolverContext(ctx, &graphql.ResolverContext{ + ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{ Object: "Query", Field: graphql.CollectedField{ Field: &ast.Field{ diff --git a/integration/generated.go b/integration/generated.go index b63592e5189..63c52b732ed 100644 --- a/integration/generated.go +++ b/integration/generated.go @@ -1,5 +1,3 @@ -// Code generated by github.com/99designs/gqlgen, DO NOT EDIT. - package integration import ( @@ -417,7 +415,7 @@ func (ec *executionContext) field___Type_fields_args(ctx context.Context, rawArg // region **************************** field.gotpl ***************************** func (ec *executionContext) _Element_child(ctx context.Context, field graphql.CollectedField, obj *models.Element) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Element", Field: field, Args: nil, @@ -425,14 +423,14 @@ func (ec *executionContext) _Element_child(ctx context.Context, field graphql.Co Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Element().Child(rctx, obj) @@ -442,18 +440,18 @@ func (ec *executionContext) _Element_child(ctx context.Context, field graphql.Co return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(*models.Element) - rctx.Result = res + fc.Result = res return ec.marshalNElement2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋintegrationᚋmodelsᚑgoᚐElement(ctx, field.Selections, res) } func (ec *executionContext) _Element_error(ctx context.Context, field graphql.CollectedField, obj *models.Element) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Element", Field: field, Args: nil, @@ -461,14 +459,14 @@ func (ec *executionContext) _Element_error(ctx context.Context, field graphql.Co Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Element().Error(rctx, obj) @@ -478,18 +476,18 @@ func (ec *executionContext) _Element_error(ctx context.Context, field graphql.Co return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(bool) - rctx.Result = res + fc.Result = res return ec.marshalNBoolean2bool(ctx, field.Selections, res) } func (ec *executionContext) _Element_mismatched(ctx context.Context, field graphql.CollectedField, obj *models.Element) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Element", Field: field, Args: nil, @@ -497,14 +495,14 @@ func (ec *executionContext) _Element_mismatched(ctx context.Context, field graph Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Element().Mismatched(rctx, obj) @@ -517,12 +515,12 @@ func (ec *executionContext) _Element_mismatched(ctx context.Context, field graph return graphql.Null } res := resTmp.([]bool) - rctx.Result = res + fc.Result = res return ec.marshalOBoolean2ᚕbool(ctx, field.Selections, res) } func (ec *executionContext) _Query_path(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Query", Field: field, Args: nil, @@ -530,14 +528,14 @@ func (ec *executionContext) _Query_path(ctx context.Context, field graphql.Colle Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().Path(rctx) @@ -550,12 +548,12 @@ func (ec *executionContext) _Query_path(ctx context.Context, field graphql.Colle return graphql.Null } res := resTmp.([]*models.Element) - rctx.Result = res + fc.Result = res return ec.marshalOElement2ᚕᚖgithubᚗcomᚋ99designsᚋgqlgenᚋintegrationᚋmodelsᚑgoᚐElement(ctx, field.Selections, res) } func (ec *executionContext) _Query_date(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Query", Field: field, Args: nil, @@ -563,21 +561,21 @@ func (ec *executionContext) _Query_date(ctx context.Context, field graphql.Colle Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) + ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field_Query_date_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } - rctx.Args = args - rctx.Stats.ArgumentsCompleted = graphql.Now() + fc.Args = args + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().Date(rctx, args["filter"].(models.DateFilter)) @@ -587,18 +585,18 @@ func (ec *executionContext) _Query_date(ctx context.Context, field graphql.Colle return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(bool) - rctx.Result = res + fc.Result = res return ec.marshalNBoolean2bool(ctx, field.Selections, res) } func (ec *executionContext) _Query_viewer(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Query", Field: field, Args: nil, @@ -606,14 +604,14 @@ func (ec *executionContext) _Query_viewer(ctx context.Context, field graphql.Col Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().Viewer(rctx) @@ -626,12 +624,12 @@ func (ec *executionContext) _Query_viewer(ctx context.Context, field graphql.Col return graphql.Null } res := resTmp.(*models.Viewer) - rctx.Result = res + fc.Result = res return ec.marshalOViewer2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋintegrationᚋmodelsᚑgoᚐViewer(ctx, field.Selections, res) } func (ec *executionContext) _Query_jsonEncoding(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Query", Field: field, Args: nil, @@ -639,14 +637,14 @@ func (ec *executionContext) _Query_jsonEncoding(ctx context.Context, field graph Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().JSONEncoding(rctx) @@ -656,18 +654,18 @@ func (ec *executionContext) _Query_jsonEncoding(ctx context.Context, field graph return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalNString2string(ctx, field.Selections, res) } func (ec *executionContext) _Query_error(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Query", Field: field, Args: nil, @@ -675,21 +673,21 @@ func (ec *executionContext) _Query_error(ctx context.Context, field graphql.Coll Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) + ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field_Query_error_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } - rctx.Args = args - rctx.Stats.ArgumentsCompleted = graphql.Now() + fc.Args = args + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().Error(rctx, args["type"].(*models.ErrorType)) @@ -699,18 +697,18 @@ func (ec *executionContext) _Query_error(ctx context.Context, field graphql.Coll return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(bool) - rctx.Result = res + fc.Result = res return ec.marshalNBoolean2bool(ctx, field.Selections, res) } func (ec *executionContext) _Query_complexity(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Query", Field: field, Args: nil, @@ -718,21 +716,21 @@ func (ec *executionContext) _Query_complexity(ctx context.Context, field graphql Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) + ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field_Query_complexity_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } - rctx.Args = args - rctx.Stats.ArgumentsCompleted = graphql.Now() + fc.Args = args + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().Complexity(rctx, args["value"].(int)) @@ -742,18 +740,18 @@ func (ec *executionContext) _Query_complexity(ctx context.Context, field graphql return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(bool) - rctx.Result = res + fc.Result = res return ec.marshalNBoolean2bool(ctx, field.Selections, res) } func (ec *executionContext) _Query___type(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Query", Field: field, Args: nil, @@ -761,21 +759,21 @@ func (ec *executionContext) _Query___type(ctx context.Context, field graphql.Col Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) + ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field_Query___type_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } - rctx.Args = args - rctx.Stats.ArgumentsCompleted = graphql.Now() + fc.Args = args + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.introspectType(args["name"].(string)) @@ -788,12 +786,12 @@ func (ec *executionContext) _Query___type(ctx context.Context, field graphql.Col return graphql.Null } res := resTmp.(*introspection.Type) - rctx.Result = res + fc.Result = res return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Query", Field: field, Args: nil, @@ -801,14 +799,14 @@ func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.C Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.introspectSchema() @@ -821,12 +819,12 @@ func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.C return graphql.Null } res := resTmp.(*introspection.Schema) - rctx.Result = res + fc.Result = res return ec.marshalO__Schema2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐSchema(ctx, field.Selections, res) } func (ec *executionContext) _User_name(ctx context.Context, field graphql.CollectedField, obj *remote_api.User) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "User", Field: field, Args: nil, @@ -834,14 +832,14 @@ func (ec *executionContext) _User_name(ctx context.Context, field graphql.Collec Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Name, nil @@ -851,18 +849,18 @@ func (ec *executionContext) _User_name(ctx context.Context, field graphql.Collec return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalNString2string(ctx, field.Selections, res) } func (ec *executionContext) _User_likes(ctx context.Context, field graphql.CollectedField, obj *remote_api.User) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "User", Field: field, Args: nil, @@ -870,14 +868,14 @@ func (ec *executionContext) _User_likes(ctx context.Context, field graphql.Colle Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.User().Likes(rctx, obj) @@ -887,18 +885,18 @@ func (ec *executionContext) _User_likes(ctx context.Context, field graphql.Colle return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.([]string) - rctx.Result = res + fc.Result = res return ec.marshalNString2ᚕstring(ctx, field.Selections, res) } func (ec *executionContext) _Viewer_user(ctx context.Context, field graphql.CollectedField, obj *models.Viewer) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "Viewer", Field: field, Args: nil, @@ -906,14 +904,14 @@ func (ec *executionContext) _Viewer_user(ctx context.Context, field graphql.Coll Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.User, nil @@ -926,12 +924,12 @@ func (ec *executionContext) _Viewer_user(ctx context.Context, field graphql.Coll return graphql.Null } res := resTmp.(*remote_api.User) - rctx.Result = res + fc.Result = res return ec.marshalOUser2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋintegrationᚋremote_apiᚐUser(ctx, field.Selections, res) } func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Directive", Field: field, Args: nil, @@ -939,14 +937,14 @@ func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Name, nil @@ -956,18 +954,18 @@ func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalNString2string(ctx, field.Selections, res) } func (ec *executionContext) ___Directive_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Directive", Field: field, Args: nil, @@ -975,14 +973,14 @@ func (ec *executionContext) ___Directive_description(ctx context.Context, field Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Description, nil @@ -995,12 +993,12 @@ func (ec *executionContext) ___Directive_description(ctx context.Context, field return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalOString2string(ctx, field.Selections, res) } func (ec *executionContext) ___Directive_locations(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Directive", Field: field, Args: nil, @@ -1008,14 +1006,14 @@ func (ec *executionContext) ___Directive_locations(ctx context.Context, field gr Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Locations, nil @@ -1025,18 +1023,18 @@ func (ec *executionContext) ___Directive_locations(ctx context.Context, field gr return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.([]string) - rctx.Result = res + fc.Result = res return ec.marshalN__DirectiveLocation2ᚕstring(ctx, field.Selections, res) } func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Directive", Field: field, Args: nil, @@ -1044,14 +1042,14 @@ func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Args, nil @@ -1061,18 +1059,18 @@ func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.([]introspection.InputValue) - rctx.Result = res + fc.Result = res return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx, field.Selections, res) } func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__EnumValue", Field: field, Args: nil, @@ -1080,14 +1078,14 @@ func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Name, nil @@ -1097,18 +1095,18 @@ func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalNString2string(ctx, field.Selections, res) } func (ec *executionContext) ___EnumValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__EnumValue", Field: field, Args: nil, @@ -1116,14 +1114,14 @@ func (ec *executionContext) ___EnumValue_description(ctx context.Context, field Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Description, nil @@ -1136,12 +1134,12 @@ func (ec *executionContext) ___EnumValue_description(ctx context.Context, field return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalOString2string(ctx, field.Selections, res) } func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__EnumValue", Field: field, Args: nil, @@ -1149,14 +1147,14 @@ func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.IsDeprecated(), nil @@ -1166,18 +1164,18 @@ func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(bool) - rctx.Result = res + fc.Result = res return ec.marshalNBoolean2bool(ctx, field.Selections, res) } func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__EnumValue", Field: field, Args: nil, @@ -1185,14 +1183,14 @@ func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.DeprecationReason(), nil @@ -1205,12 +1203,12 @@ func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, return graphql.Null } res := resTmp.(*string) - rctx.Result = res + fc.Result = res return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Field", Field: field, Args: nil, @@ -1218,14 +1216,14 @@ func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.Col Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Name, nil @@ -1235,18 +1233,18 @@ func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.Col return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalNString2string(ctx, field.Selections, res) } func (ec *executionContext) ___Field_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Field", Field: field, Args: nil, @@ -1254,14 +1252,14 @@ func (ec *executionContext) ___Field_description(ctx context.Context, field grap Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Description, nil @@ -1274,12 +1272,12 @@ func (ec *executionContext) ___Field_description(ctx context.Context, field grap return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalOString2string(ctx, field.Selections, res) } func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Field", Field: field, Args: nil, @@ -1287,14 +1285,14 @@ func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.Col Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Args, nil @@ -1304,18 +1302,18 @@ func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.Col return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.([]introspection.InputValue) - rctx.Result = res + fc.Result = res return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx, field.Selections, res) } func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Field", Field: field, Args: nil, @@ -1323,14 +1321,14 @@ func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.Col Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Type, nil @@ -1340,18 +1338,18 @@ func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.Col return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(*introspection.Type) - rctx.Result = res + fc.Result = res return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Field", Field: field, Args: nil, @@ -1359,14 +1357,14 @@ func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field gra Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.IsDeprecated(), nil @@ -1376,18 +1374,18 @@ func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field gra return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(bool) - rctx.Result = res + fc.Result = res return ec.marshalNBoolean2bool(ctx, field.Selections, res) } func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Field", Field: field, Args: nil, @@ -1395,14 +1393,14 @@ func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, fiel Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.DeprecationReason(), nil @@ -1415,12 +1413,12 @@ func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, fiel return graphql.Null } res := resTmp.(*string) - rctx.Result = res + fc.Result = res return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__InputValue", Field: field, Args: nil, @@ -1428,14 +1426,14 @@ func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphq Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Name, nil @@ -1445,18 +1443,18 @@ func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphq return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalNString2string(ctx, field.Selections, res) } func (ec *executionContext) ___InputValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__InputValue", Field: field, Args: nil, @@ -1464,14 +1462,14 @@ func (ec *executionContext) ___InputValue_description(ctx context.Context, field Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Description, nil @@ -1484,12 +1482,12 @@ func (ec *executionContext) ___InputValue_description(ctx context.Context, field return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalOString2string(ctx, field.Selections, res) } func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__InputValue", Field: field, Args: nil, @@ -1497,14 +1495,14 @@ func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphq Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Type, nil @@ -1514,18 +1512,18 @@ func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphq return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(*introspection.Type) - rctx.Result = res + fc.Result = res return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__InputValue", Field: field, Args: nil, @@ -1533,14 +1531,14 @@ func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, fiel Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.DefaultValue, nil @@ -1553,12 +1551,12 @@ func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, fiel return graphql.Null } res := resTmp.(*string) - rctx.Result = res + fc.Result = res return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Schema", Field: field, Args: nil, @@ -1566,14 +1564,14 @@ func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.C Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Types(), nil @@ -1583,18 +1581,18 @@ func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.C return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.([]introspection.Type) - rctx.Result = res + fc.Result = res return ec.marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Schema", Field: field, Args: nil, @@ -1602,14 +1600,14 @@ func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graph Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.QueryType(), nil @@ -1619,18 +1617,18 @@ func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graph return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(*introspection.Type) - rctx.Result = res + fc.Result = res return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Schema", Field: field, Args: nil, @@ -1638,14 +1636,14 @@ func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field gr Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.MutationType(), nil @@ -1658,12 +1656,12 @@ func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field gr return graphql.Null } res := resTmp.(*introspection.Type) - rctx.Result = res + fc.Result = res return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Schema", Field: field, Args: nil, @@ -1671,14 +1669,14 @@ func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, fiel Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.SubscriptionType(), nil @@ -1691,12 +1689,12 @@ func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, fiel return graphql.Null } res := resTmp.(*introspection.Type) - rctx.Result = res + fc.Result = res return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) ___Schema_directives(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Schema", Field: field, Args: nil, @@ -1704,14 +1702,14 @@ func (ec *executionContext) ___Schema_directives(ctx context.Context, field grap Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Directives(), nil @@ -1721,18 +1719,18 @@ func (ec *executionContext) ___Schema_directives(ctx context.Context, field grap return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.([]introspection.Directive) - rctx.Result = res + fc.Result = res return ec.marshalN__Directive2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirective(ctx, field.Selections, res) } func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, @@ -1740,14 +1738,14 @@ func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.Coll Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Kind(), nil @@ -1757,18 +1755,18 @@ func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.Coll return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, rctx) { + if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalN__TypeKind2string(ctx, field.Selections, res) } func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, @@ -1776,14 +1774,14 @@ func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.Coll Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Name(), nil @@ -1796,12 +1794,12 @@ func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.Coll return graphql.Null } res := resTmp.(*string) - rctx.Result = res + fc.Result = res return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } func (ec *executionContext) ___Type_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, @@ -1809,14 +1807,14 @@ func (ec *executionContext) ___Type_description(ctx context.Context, field graph Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Description(), nil @@ -1829,12 +1827,12 @@ func (ec *executionContext) ___Type_description(ctx context.Context, field graph return graphql.Null } res := resTmp.(string) - rctx.Result = res + fc.Result = res return ec.marshalOString2string(ctx, field.Selections, res) } func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, @@ -1842,21 +1840,21 @@ func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.Co Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) + ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field___Type_fields_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } - rctx.Args = args - rctx.Stats.ArgumentsCompleted = graphql.Now() + fc.Args = args + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Fields(args["includeDeprecated"].(bool)), nil @@ -1869,12 +1867,12 @@ func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.Co return graphql.Null } res := resTmp.([]introspection.Field) - rctx.Result = res + fc.Result = res return ec.marshalO__Field2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐField(ctx, field.Selections, res) } func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, @@ -1882,14 +1880,14 @@ func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphq Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Interfaces(), nil @@ -1902,12 +1900,12 @@ func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphq return graphql.Null } res := resTmp.([]introspection.Type) - rctx.Result = res + fc.Result = res return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, @@ -1915,14 +1913,14 @@ func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field gra Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.PossibleTypes(), nil @@ -1935,12 +1933,12 @@ func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field gra return graphql.Null } res := resTmp.([]introspection.Type) - rctx.Result = res + fc.Result = res return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, @@ -1948,21 +1946,21 @@ func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphq Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) + ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field___Type_enumValues_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } - rctx.Args = args - rctx.Stats.ArgumentsCompleted = graphql.Now() + fc.Args = args + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.EnumValues(args["includeDeprecated"].(bool)), nil @@ -1975,12 +1973,12 @@ func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphq return graphql.Null } res := resTmp.([]introspection.EnumValue) - rctx.Result = res + fc.Result = res return ec.marshalO__EnumValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValue(ctx, field.Selections, res) } func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, @@ -1988,14 +1986,14 @@ func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graph Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.InputFields(), nil @@ -2008,12 +2006,12 @@ func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graph return graphql.Null } res := resTmp.([]introspection.InputValue) - rctx.Result = res + fc.Result = res return ec.marshalO__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx, field.Selections, res) } func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Object: "__Type", Field: field, Args: nil, @@ -2021,14 +2019,14 @@ func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.Co Stats: graphql.FieldStats{Started: graphql.Now()}, } defer func() { - rctx.Stats.Completed = graphql.Now() + fc.Stats.Completed = graphql.Now() if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - ctx = graphql.WithResolverContext(ctx, rctx) - rctx.Stats.ArgumentsCompleted = graphql.Now() + ctx = graphql.WithFieldContext(ctx, fc) + fc.Stats.ArgumentsCompleted = graphql.Now() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.OfType(), nil @@ -2041,7 +2039,7 @@ func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.Co return graphql.Null } res := resTmp.(*introspection.Type) - rctx.Result = res + fc.Result = res return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } @@ -2160,8 +2158,9 @@ var queryImplementors = []string{"Query"} func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, queryImplementors) - ctx = graphql.WithResolverContext(ctx, &graphql.ResolverContext{ + ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{ Object: "Query", + Stats: graphql.FieldStats{Started: graphql.Now()}, }) out := graphql.NewFieldSet(fields) @@ -2580,7 +2579,7 @@ func (ec *executionContext) unmarshalNBoolean2bool(ctx context.Context, v interf func (ec *executionContext) marshalNBoolean2bool(ctx context.Context, sel ast.SelectionSet, v bool) graphql.Marshaler { res := graphql.MarshalBoolean(v) if res == graphql.Null { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } } @@ -2597,7 +2596,7 @@ func (ec *executionContext) marshalNElement2githubᚗcomᚋ99designsᚋgqlgenᚋ func (ec *executionContext) marshalNElement2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋintegrationᚋmodelsᚑgoᚐElement(ctx context.Context, sel ast.SelectionSet, v *models.Element) graphql.Marshaler { if v == nil { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } return graphql.Null @@ -2612,7 +2611,7 @@ func (ec *executionContext) unmarshalNInt2int(ctx context.Context, v interface{} func (ec *executionContext) marshalNInt2int(ctx context.Context, sel ast.SelectionSet, v int) graphql.Marshaler { res := graphql.MarshalInt(v) if res == graphql.Null { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } } @@ -2626,7 +2625,7 @@ func (ec *executionContext) unmarshalNString2string(ctx context.Context, v inter func (ec *executionContext) marshalNString2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { res := graphql.MarshalString(v) if res == graphql.Null { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } } @@ -2675,11 +2674,12 @@ func (ec *executionContext) marshalN__Directive2ᚕgithubᚗcomᚋ99designsᚋgq } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -2710,7 +2710,7 @@ func (ec *executionContext) unmarshalN__DirectiveLocation2string(ctx context.Con func (ec *executionContext) marshalN__DirectiveLocation2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { res := graphql.MarshalString(v) if res == graphql.Null { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } } @@ -2746,11 +2746,12 @@ func (ec *executionContext) marshalN__DirectiveLocation2ᚕstring(ctx context.Co } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -2795,11 +2796,12 @@ func (ec *executionContext) marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋg } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -2836,11 +2838,12 @@ func (ec *executionContext) marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgen } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -2866,7 +2869,7 @@ func (ec *executionContext) marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgen func (ec *executionContext) marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v *introspection.Type) graphql.Marshaler { if v == nil { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } return graphql.Null @@ -2881,7 +2884,7 @@ func (ec *executionContext) unmarshalN__TypeKind2string(ctx context.Context, v i func (ec *executionContext) marshalN__TypeKind2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { res := graphql.MarshalString(v) if res == graphql.Null { - if !graphql.HasFieldError(ctx, graphql.GetResolverContext(ctx)) { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") } } @@ -2983,11 +2986,12 @@ func (ec *executionContext) marshalOElement2ᚕᚖgithubᚗcomᚋ99designsᚋgql } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -3122,11 +3126,12 @@ func (ec *executionContext) marshalO__EnumValue2ᚕgithubᚗcomᚋ99designsᚋgq } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -3162,11 +3167,12 @@ func (ec *executionContext) marshalO__Field2ᚕgithubᚗcomᚋ99designsᚋgqlgen } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -3202,11 +3208,12 @@ func (ec *executionContext) marshalO__InputValue2ᚕgithubᚗcomᚋ99designsᚋg } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { @@ -3257,11 +3264,12 @@ func (ec *executionContext) marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgen } for i := range v { i := i - rctx := &graphql.ResolverContext{ + fc := &graphql.FieldContext{ Index: &i, Result: &v[i], + Stats: graphql.FieldStats{Started: graphql.Now()}, } - ctx := graphql.WithResolverContext(ctx, rctx) + ctx := graphql.WithFieldContext(ctx, fc) f := func(i int) { defer func() { if r := recover(); r != nil { diff --git a/integration/server/server.go b/integration/server/server.go index 64a91bf48a6..a2b8a50cda7 100644 --- a/integration/server/server.go +++ b/integration/server/server.go @@ -36,7 +36,7 @@ func main() { if e, ok := errors.Cause(e).(*integration.CustomError); ok { return &gqlerror.Error{ Message: e.UserMessage, - Path: graphql.GetResolverContext(ctx).Path(), + Path: graphql.GetFieldContext(ctx).Path(), } } return graphql.DefaultErrorPresenter(ctx, e)