diff --git a/codegen/testserver/followschema/defer.graphql b/codegen/testserver/followschema/defer.graphql index c31e0def87a..3d20ea61bcc 100644 --- a/codegen/testserver/followschema/defer.graphql +++ b/codegen/testserver/followschema/defer.graphql @@ -1,6 +1,6 @@ extend type Query { - deferCase1: DeferModel - deferCase2: [DeferModel!] + deferSingle: DeferModel + deferMultiple: [DeferModel!] } type DeferModel { diff --git a/codegen/testserver/followschema/resolver.go b/codegen/testserver/followschema/resolver.go index 500053e6429..2b5f8f6fbbf 100644 --- a/codegen/testserver/followschema/resolver.go +++ b/codegen/testserver/followschema/resolver.go @@ -197,13 +197,13 @@ func (r *queryResolver) DefaultParameters(ctx context.Context, falsyBoolean *boo panic("not implemented") } -// DeferCase1 is the resolver for the deferCase1 field. -func (r *queryResolver) DeferCase1(ctx context.Context) (*DeferModel, error) { +// DeferSingle is the resolver for the deferSingle field. +func (r *queryResolver) DeferSingle(ctx context.Context) (*DeferModel, error) { panic("not implemented") } -// DeferCase2 is the resolver for the deferCase2 field. -func (r *queryResolver) DeferCase2(ctx context.Context) ([]*DeferModel, error) { +// DeferMultiple is the resolver for the deferMultiple field. +func (r *queryResolver) DeferMultiple(ctx context.Context) ([]*DeferModel, error) { panic("not implemented") } diff --git a/codegen/testserver/followschema/root_.generated.go b/codegen/testserver/followschema/root_.generated.go index deb06db4a61..b863f1a64b7 100644 --- a/codegen/testserver/followschema/root_.generated.go +++ b/codegen/testserver/followschema/root_.generated.go @@ -326,8 +326,8 @@ type ComplexityRoot struct { Collision func(childComplexity int) int DefaultParameters func(childComplexity int, falsyBoolean *bool, truthyBoolean *bool) int DefaultScalar func(childComplexity int, arg string) int - DeferCase1 func(childComplexity int) int - DeferCase2 func(childComplexity int) int + DeferMultiple func(childComplexity int) int + DeferSingle func(childComplexity int) int DeprecatedField func(childComplexity int) int DirectiveArg func(childComplexity int, arg string) int DirectiveDouble func(childComplexity int) int @@ -1281,19 +1281,19 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Query.DefaultScalar(childComplexity, args["arg"].(string)), true - case "Query.deferCase1": - if e.complexity.Query.DeferCase1 == nil { + case "Query.deferMultiple": + if e.complexity.Query.DeferMultiple == nil { break } - return e.complexity.Query.DeferCase1(childComplexity), true + return e.complexity.Query.DeferMultiple(childComplexity), true - case "Query.deferCase2": - if e.complexity.Query.DeferCase2 == nil { + case "Query.deferSingle": + if e.complexity.Query.DeferSingle == nil { break } - return e.complexity.Query.DeferCase2(childComplexity), true + return e.complexity.Query.DeferSingle(childComplexity), true case "Query.deprecatedField": if e.complexity.Query.DeprecatedField == nil { diff --git a/codegen/testserver/followschema/schema.generated.go b/codegen/testserver/followschema/schema.generated.go index e98ff8cdcd9..89e58f7c398 100644 --- a/codegen/testserver/followschema/schema.generated.go +++ b/codegen/testserver/followschema/schema.generated.go @@ -49,8 +49,8 @@ type QueryResolver interface { DeprecatedField(ctx context.Context) (string, error) Overlapping(ctx context.Context) (*OverlappingFields, error) DefaultParameters(ctx context.Context, falsyBoolean *bool, truthyBoolean *bool) (*DefaultParametersMirror, error) - DeferCase1(ctx context.Context) (*DeferModel, error) - DeferCase2(ctx context.Context) ([]*DeferModel, error) + DeferSingle(ctx context.Context) (*DeferModel, error) + DeferMultiple(ctx context.Context) ([]*DeferModel, error) DirectiveArg(ctx context.Context, arg string) (*string, error) DirectiveNullableArg(ctx context.Context, arg *int, arg2 *int, arg3 *string) (*string, error) DirectiveSingleNullableArg(ctx context.Context, arg1 *string) (*string, error) @@ -3004,8 +3004,8 @@ func (ec *executionContext) fieldContext_Query_defaultParameters(ctx context.Con return fc, nil } -func (ec *executionContext) _Query_deferCase1(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_deferCase1(ctx, field) +func (ec *executionContext) _Query_deferSingle(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_deferSingle(ctx, field) if err != nil { return graphql.Null } @@ -3018,7 +3018,7 @@ func (ec *executionContext) _Query_deferCase1(ctx context.Context, field graphql }() resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().DeferCase1(rctx) + return ec.resolvers.Query().DeferSingle(rctx) }) if resTmp == nil { @@ -3029,7 +3029,7 @@ func (ec *executionContext) _Query_deferCase1(ctx context.Context, field graphql return ec.marshalODeferModel2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐDeferModel(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_deferCase1(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_deferSingle(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Query", Field: field, @@ -3050,8 +3050,8 @@ func (ec *executionContext) fieldContext_Query_deferCase1(_ context.Context, fie return fc, nil } -func (ec *executionContext) _Query_deferCase2(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_deferCase2(ctx, field) +func (ec *executionContext) _Query_deferMultiple(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_deferMultiple(ctx, field) if err != nil { return graphql.Null } @@ -3064,7 +3064,7 @@ func (ec *executionContext) _Query_deferCase2(ctx context.Context, field graphql }() resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().DeferCase2(rctx) + return ec.resolvers.Query().DeferMultiple(rctx) }) if resTmp == nil { @@ -3075,7 +3075,7 @@ func (ec *executionContext) _Query_deferCase2(ctx context.Context, field graphql return ec.marshalODeferModel2ᚕᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋfollowschemaᚐDeferModelᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_deferCase2(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_deferMultiple(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Query", Field: field, @@ -7627,7 +7627,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr } out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) }) - case "deferCase1": + case "deferSingle": field := field innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { @@ -7636,7 +7636,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr ec.Error(ctx, ec.Recover(ctx, r)) } }() - res = ec._Query_deferCase1(ctx, field) + res = ec._Query_deferSingle(ctx, field) return res } @@ -7646,7 +7646,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr } out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) }) - case "deferCase2": + case "deferMultiple": field := field innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { @@ -7655,7 +7655,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr ec.Error(ctx, ec.Recover(ctx, r)) } }() - res = ec._Query_deferCase2(ctx, field) + res = ec._Query_deferMultiple(ctx, field) return res } diff --git a/codegen/testserver/followschema/stub.go b/codegen/testserver/followschema/stub.go index ee9e7c245de..be8799cae36 100644 --- a/codegen/testserver/followschema/stub.go +++ b/codegen/testserver/followschema/stub.go @@ -71,8 +71,8 @@ type Stub struct { DeprecatedField func(ctx context.Context) (string, error) Overlapping func(ctx context.Context) (*OverlappingFields, error) DefaultParameters func(ctx context.Context, falsyBoolean *bool, truthyBoolean *bool) (*DefaultParametersMirror, error) - DeferCase1 func(ctx context.Context) (*DeferModel, error) - DeferCase2 func(ctx context.Context) ([]*DeferModel, error) + DeferSingle func(ctx context.Context) (*DeferModel, error) + DeferMultiple func(ctx context.Context) ([]*DeferModel, error) DirectiveArg func(ctx context.Context, arg string) (*string, error) DirectiveNullableArg func(ctx context.Context, arg *int, arg2 *int, arg3 *string) (*string, error) DirectiveSingleNullableArg func(ctx context.Context, arg1 *string) (*string, error) @@ -352,11 +352,11 @@ func (r *stubQuery) Overlapping(ctx context.Context) (*OverlappingFields, error) func (r *stubQuery) DefaultParameters(ctx context.Context, falsyBoolean *bool, truthyBoolean *bool) (*DefaultParametersMirror, error) { return r.QueryResolver.DefaultParameters(ctx, falsyBoolean, truthyBoolean) } -func (r *stubQuery) DeferCase1(ctx context.Context) (*DeferModel, error) { - return r.QueryResolver.DeferCase1(ctx) +func (r *stubQuery) DeferSingle(ctx context.Context) (*DeferModel, error) { + return r.QueryResolver.DeferSingle(ctx) } -func (r *stubQuery) DeferCase2(ctx context.Context) ([]*DeferModel, error) { - return r.QueryResolver.DeferCase2(ctx) +func (r *stubQuery) DeferMultiple(ctx context.Context) ([]*DeferModel, error) { + return r.QueryResolver.DeferMultiple(ctx) } func (r *stubQuery) DirectiveArg(ctx context.Context, arg string) (*string, error) { return r.QueryResolver.DirectiveArg(ctx, arg)