From 19106923228295d81f6aabcb0323103dbde68a77 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Sat, 24 Oct 2026 10:15:33 +0000 Subject: [PATCH 1/2] fix(deps): update module github.com/99designs/gqlgen to v0.17.97 --- go.mod | 8 ++++---- go.sum | 16 ++++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/go.mod b/go.mod index 3faa6c5..128444b 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,7 @@ require ( codeberg.org/eventsourced/pg/v2 v2.4.0 codeberg.org/messaging/go-messaging-amqp v0.0.7 codeberg.org/messaging/messaging v0.0.5 - github.com/99designs/gqlgen v0.17.95 + github.com/99designs/gqlgen v0.17.97 github.com/DATA-DOG/go-sqlmock v1.5.2 github.com/Khan/genqlient v0.8.1 github.com/alecthomas/kong v1.16.1 @@ -74,7 +74,7 @@ require ( github.com/tidwall/match v1.1.1 // indirect github.com/tidwall/pretty v1.2.1 // indirect github.com/tidwall/sjson v1.2.5 // indirect - github.com/urfave/cli/v3 v3.11.0 // indirect + github.com/urfave/cli/v3 v3.14.0 // indirect github.com/valyala/fastjson v1.6.7 // indirect github.com/wundergraph/astjson v1.1.0 // indirect github.com/wundergraph/go-arena v1.3.0 // indirect @@ -85,11 +85,11 @@ require ( go.opentelemetry.io/proto/otlp v1.11.0 // indirect go.uber.org/multierr v1.11.0 // indirect go.yaml.in/yaml/v3 v3.0.5 // indirect - golang.org/x/mod v0.41.0 // indirect + golang.org/x/mod v0.42.0 // indirect golang.org/x/net v0.61.0 // indirect golang.org/x/sys v0.49.0 // indirect golang.org/x/text v0.43.0 // indirect - golang.org/x/tools v0.51.0 // indirect + golang.org/x/tools v0.52.0 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20261005182115-fad411399dd8 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20261005182115-fad411399dd8 // indirect google.golang.org/grpc v1.84.0 // indirect diff --git a/go.sum b/go.sum index e9e26b9..019620a 100644 --- a/go.sum +++ b/go.sum @@ -13,8 +13,8 @@ codeberg.org/messaging/messaging/tck v0.0.3/go.mod h1:RiOsKXGAhNQK2STBVYGjhN0CFt filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= filippo.io/edwards25519 v1.2.0 h1:crnVqOiS4jqYleHd9vaKZ+HKtHfllngJIiOpNpoJsjo= filippo.io/edwards25519 v1.2.0/go.mod h1:xzAOLCNug/yB62zG1bQ8uziwrIqIuxhctzJT18Q77mc= -github.com/99designs/gqlgen v0.17.95 h1:882h7F5iJImgtyUVttc4MOK2NbzbMYc2oyNeHqkjpP4= -github.com/99designs/gqlgen v0.17.95/go.mod h1:kHYPrpwOXDU1OQyxIg3Z7nVXSnlUoHVWBY7CMJCAM4M= +github.com/99designs/gqlgen v0.17.97 h1:Dv4OZ+Mvt38+1cemFYatThs3Y3tq2fjuV2OFWq2R7kc= +github.com/99designs/gqlgen v0.17.97/go.mod h1:Fk3sbEOHsiIkcmUhhTxe/Jmm3oXKDgc5L70P0rWOljw= github.com/DATA-DOG/go-sqlmock v1.5.2 h1:OcvFkGmslmlZibjAjaHm3L//6LiuBgolP7OputlJIzU= github.com/DATA-DOG/go-sqlmock v1.5.2/go.mod h1:88MAG/4G7SMwSE3CeA0ZKzrT5CiOU3OJ+JlNzwDqpNU= github.com/Khan/genqlient v0.8.1 h1:wtOCc8N9rNynRLXN3k3CnfzheCUNKBcvXmVv5zt6WCs= @@ -213,8 +213,8 @@ github.com/tj/go-buffer v1.1.0/go.mod h1:iyiJpfFcR2B9sXu7KvjbT9fpM4mOelRSDTbntVj github.com/tj/go-elastic v0.0.0-20171221160941-36157cbbebc2/go.mod h1:WjeM0Oo1eNAjXGDx2yma7uG2XoyRZTq1uv3M/o7imD0= github.com/tj/go-kinesis v0.0.0-20171128231115-08b17f58cb1b/go.mod h1:/yhzCV0xPfx6jb1bBgRFjl5lytqVqZXEaeqWP8lTEao= github.com/tj/go-spin v1.1.0/go.mod h1:Mg1mzmePZm4dva8Qz60H2lHwmJ2loum4VIrLgVnKwh4= -github.com/urfave/cli/v3 v3.11.0 h1:P/euJp99kb9p0tlVY+iYTLYYTAQlfl0hR2gUO1Img1Q= -github.com/urfave/cli/v3 v3.11.0/go.mod h1:ysVLtOEmg2tOy6PknnYVhDoouyC/6N42TMeoMzskhso= +github.com/urfave/cli/v3 v3.14.0 h1:a8414NQlHJs0c/iBsulKLzlES0n/lEAskbL2LKpU4/s= +github.com/urfave/cli/v3 v3.14.0/go.mod h1:vXn6HxPNccJSzQr2QvwVncOKrgYGIHU0HY5h8B2nQj4= github.com/valyala/fastjson v1.6.7 h1:ZE4tRy0CIkh+qDc5McjatheGX2czdn8slQjomexVpBM= github.com/valyala/fastjson v1.6.7/go.mod h1:CLCAqky6SMuOcxStkYQvblddUtoRxhYMGLrsQns1aXY= github.com/vektah/gqlparser/v2 v2.5.63 h1:vzHg/+/z7kZA3N4FhbGtF1pRo99KUpPzwXahk1bQtYk= @@ -269,8 +269,8 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACk golang.org/x/crypto v0.0.0-20190426145343-a29dc8fdc734/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.58.0 h1:COkYLr4k7nDI4r6QtMML2AfzeIswWHAJthLS6K/M/54= golang.org/x/crypto v0.58.0/go.mod h1:Xh+kl5A+M0gMiWDytH2Hhr5Z7WbNCpv/eB/EFgfSk+w= -golang.org/x/mod v0.41.0 h1:qJmnOUb4YB+FsEuM3HcWucdZASCPGhsX6uljO6pog0c= -golang.org/x/mod v0.41.0/go.mod h1:Ek9pY8RKWXwsWvd3rQiHYtMqkjSUV+s1Rj7j4H5Ur6o= +golang.org/x/mod v0.42.0 h1:ICeL3t2L30ljSPHHxDnR4fqVcBt/zR2zJAb9juavmQg= +golang.org/x/mod v0.42.0/go.mod h1:u5fzIrRInkL8MaO1cbRkUHT64v303YIT5KEqpNr7jRs= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -290,8 +290,8 @@ golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.43.0 h1:1QivrlhwAsnMOcqgOdl9my7s9OyZl8O5/UGUTJVXoWc= golang.org/x/text v0.43.0/go.mod h1:hbSIYA/amXcRXTFSZqh8tWHEoqRvvbKPJ2uz/KU+a+s= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.51.0 h1:k4Xc/1Om9jwkBJBo4NVLMSARBoWtK10mx+W5BnXCeAI= -golang.org/x/tools v0.51.0/go.mod h1:9eEncMayCV6zRMGhR5eZEC2iBx98qWcF1HZ9Z7wJOoA= +golang.org/x/tools v0.52.0 h1:ryxg4U63oaUYk7uOLTF37n43f4qgtGvqV4Ioit1BaEs= +golang.org/x/tools v0.52.0/go.mod h1:ItcP5UNaVGG+Yc4eIYmaFLNJ4soEopkx5Y2d4lcEurs= gonum.org/v1/gonum v0.17.0 h1:VbpOemQlsSMrYmn7T2OUvQ4dqxQXU+ouZFQsZOx50z4= gonum.org/v1/gonum v0.17.0/go.mod h1:El3tOrEuMpv2UdMrbNlKEh9vd86bmQ6vqIcDwxEOc1E= google.golang.org/genproto/googleapis/api v0.0.0-20261005182115-fad411399dd8 h1:cFbkNigDInw+wVTXc+CyhUsoHGJCw0BR6mlNoRVfre0= -- 2.54.0 From 4a06d602d1768fe1c1db1c704996d7195460e685 Mon Sep 17 00:00:00 2001 From: Joakim Olsson Date: Sat, 24 Oct 2026 13:36:45 +0200 Subject: [PATCH 2/2] chore: regenerate gqlgen code for v0.17.97 Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_015uobETtHkP5s6KMquXhh6U --- graph/generated/generated.go | 517 +++++++++++++---------------------- 1 file changed, 188 insertions(+), 329 deletions(-) diff --git a/graph/generated/generated.go b/graph/generated/generated.go index fad8493..a74d80f 100644 --- a/graph/generated/generated.go +++ b/graph/generated/generated.go @@ -454,10 +454,12 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin func (e *executableSchema) Exec(ctx context.Context) graphql.ResponseHandler { opCtx := graphql.GetOperationContext(ctx) ec := newExecutionContext(opCtx, e, make(chan graphql.DeferredResult)) - inputUnmarshalMap := graphql.BuildUnmarshalerMap( - ec.unmarshalInputInputAPIKey, - ec.unmarshalInputInputSubGraph, - ) + inputUnmarshalers := func() *graphql.InputUnmarshalerIndex { + return graphql.NewInputUnmarshalerIndex( + graphql.NewInputUnmarshaler("InputAPIKey", ec.unmarshalInputInputAPIKey), + graphql.NewInputUnmarshaler("InputSubGraph", ec.unmarshalInputInputSubGraph), + ) + } first := true switch opCtx.Operation.Operation { @@ -467,7 +469,7 @@ func (e *executableSchema) Exec(ctx context.Context) graphql.ResponseHandler { var data graphql.Marshaler if first { first = false - ctx = graphql.WithUnmarshalerMap(ctx, inputUnmarshalMap) + ctx = graphql.WithLazyInputUnmarshalerIndex(ctx, inputUnmarshalers) data = ec._Query(ctx, opCtx.Operation.SelectionSet) } else { if atomic.LoadInt32(&ec.PendingDeferred) > 0 { @@ -497,7 +499,7 @@ func (e *executableSchema) Exec(ctx context.Context) graphql.ResponseHandler { return nil } first = false - ctx = graphql.WithUnmarshalerMap(ctx, inputUnmarshalMap) + ctx = graphql.WithLazyInputUnmarshalerIndex(ctx, inputUnmarshalers) data := ec._Mutation(ctx, opCtx.Operation.SelectionSet) var buf bytes.Buffer data.MarshalGQL(&buf) @@ -1106,7 +1108,7 @@ func (ec *executionContext) _APIKey_id(ctx context.Context, field graphql.Collec ) } func (ec *executionContext) fieldContext_APIKey_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("APIKey", field, false, false, errors.New("field of type ID does not have child fields")) + return graphql.NewScalarFieldContext("APIKey", field, false, false, "ID") } func (ec *executionContext) _APIKey_name(ctx context.Context, field graphql.CollectedField, obj *model.APIKey) (ret graphql.Marshaler) { @@ -1129,7 +1131,7 @@ func (ec *executionContext) _APIKey_name(ctx context.Context, field graphql.Coll ) } func (ec *executionContext) fieldContext_APIKey_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("APIKey", field, false, false, errors.New("field of type String does not have child fields")) + return graphql.NewScalarFieldContext("APIKey", field, false, false, "String") } func (ec *executionContext) _APIKey_key(ctx context.Context, field graphql.CollectedField, obj *model.APIKey) (ret graphql.Marshaler) { @@ -1152,7 +1154,7 @@ func (ec *executionContext) _APIKey_key(ctx context.Context, field graphql.Colle ) } func (ec *executionContext) fieldContext_APIKey_key(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("APIKey", field, false, false, errors.New("field of type String does not have child fields")) + return graphql.NewScalarFieldContext("APIKey", field, false, false, "String") } func (ec *executionContext) _APIKey_organization(ctx context.Context, field graphql.CollectedField, obj *model.APIKey) (ret graphql.Marshaler) { @@ -1207,7 +1209,7 @@ func (ec *executionContext) _APIKey_refs(ctx context.Context, field graphql.Coll ) } func (ec *executionContext) fieldContext_APIKey_refs(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("APIKey", field, false, false, errors.New("field of type String does not have child fields")) + return graphql.NewScalarFieldContext("APIKey", field, false, false, "String") } func (ec *executionContext) _APIKey_read(ctx context.Context, field graphql.CollectedField, obj *model.APIKey) (ret graphql.Marshaler) { @@ -1230,7 +1232,7 @@ func (ec *executionContext) _APIKey_read(ctx context.Context, field graphql.Coll ) } func (ec *executionContext) fieldContext_APIKey_read(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("APIKey", field, false, false, errors.New("field of type Boolean does not have child fields")) + return graphql.NewScalarFieldContext("APIKey", field, false, false, "Boolean") } func (ec *executionContext) _APIKey_publish(ctx context.Context, field graphql.CollectedField, obj *model.APIKey) (ret graphql.Marshaler) { @@ -1253,7 +1255,7 @@ func (ec *executionContext) _APIKey_publish(ctx context.Context, field graphql.C ) } func (ec *executionContext) fieldContext_APIKey_publish(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("APIKey", field, false, false, errors.New("field of type Boolean does not have child fields")) + return graphql.NewScalarFieldContext("APIKey", field, false, false, "Boolean") } func (ec *executionContext) _Mutation_addOrganization(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { @@ -1648,7 +1650,7 @@ func (ec *executionContext) _Organization_id(ctx context.Context, field graphql. ) } func (ec *executionContext) fieldContext_Organization_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("Organization", field, false, false, errors.New("field of type ID does not have child fields")) + return graphql.NewScalarFieldContext("Organization", field, false, false, "ID") } func (ec *executionContext) _Organization_name(ctx context.Context, field graphql.CollectedField, obj *model.Organization) (ret graphql.Marshaler) { @@ -1671,7 +1673,7 @@ func (ec *executionContext) _Organization_name(ctx context.Context, field graphq ) } func (ec *executionContext) fieldContext_Organization_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("Organization", field, false, false, errors.New("field of type String does not have child fields")) + return graphql.NewScalarFieldContext("Organization", field, false, false, "String") } func (ec *executionContext) _Organization_users(ctx context.Context, field graphql.CollectedField, obj *model.Organization) (ret graphql.Marshaler) { @@ -2068,7 +2070,7 @@ func (ec *executionContext) _SchemaUpdate_ref(ctx context.Context, field graphql ) } func (ec *executionContext) fieldContext_SchemaUpdate_ref(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("SchemaUpdate", field, false, false, errors.New("field of type String does not have child fields")) + return graphql.NewScalarFieldContext("SchemaUpdate", field, false, false, "String") } func (ec *executionContext) _SchemaUpdate_id(ctx context.Context, field graphql.CollectedField, obj *model.SchemaUpdate) (ret graphql.Marshaler) { @@ -2091,7 +2093,7 @@ func (ec *executionContext) _SchemaUpdate_id(ctx context.Context, field graphql. ) } func (ec *executionContext) fieldContext_SchemaUpdate_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("SchemaUpdate", field, false, false, errors.New("field of type ID does not have child fields")) + return graphql.NewScalarFieldContext("SchemaUpdate", field, false, false, "ID") } func (ec *executionContext) _SchemaUpdate_subGraphs(ctx context.Context, field graphql.CollectedField, obj *model.SchemaUpdate) (ret graphql.Marshaler) { @@ -2146,7 +2148,7 @@ func (ec *executionContext) _SchemaUpdate_cosmoRouterConfig(ctx context.Context, ) } func (ec *executionContext) fieldContext_SchemaUpdate_cosmoRouterConfig(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("SchemaUpdate", field, false, false, errors.New("field of type String does not have child fields")) + return graphql.NewScalarFieldContext("SchemaUpdate", field, false, false, "String") } func (ec *executionContext) _SubGraph_id(ctx context.Context, field graphql.CollectedField, obj *model.SubGraph) (ret graphql.Marshaler) { @@ -2169,7 +2171,7 @@ func (ec *executionContext) _SubGraph_id(ctx context.Context, field graphql.Coll ) } func (ec *executionContext) fieldContext_SubGraph_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("SubGraph", field, false, false, errors.New("field of type ID does not have child fields")) + return graphql.NewScalarFieldContext("SubGraph", field, false, false, "ID") } func (ec *executionContext) _SubGraph_service(ctx context.Context, field graphql.CollectedField, obj *model.SubGraph) (ret graphql.Marshaler) { @@ -2192,7 +2194,7 @@ func (ec *executionContext) _SubGraph_service(ctx context.Context, field graphql ) } func (ec *executionContext) fieldContext_SubGraph_service(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("SubGraph", field, false, false, errors.New("field of type String does not have child fields")) + return graphql.NewScalarFieldContext("SubGraph", field, false, false, "String") } func (ec *executionContext) _SubGraph_url(ctx context.Context, field graphql.CollectedField, obj *model.SubGraph) (ret graphql.Marshaler) { @@ -2215,7 +2217,7 @@ func (ec *executionContext) _SubGraph_url(ctx context.Context, field graphql.Col ) } func (ec *executionContext) fieldContext_SubGraph_url(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("SubGraph", field, false, false, errors.New("field of type String does not have child fields")) + return graphql.NewScalarFieldContext("SubGraph", field, false, false, "String") } func (ec *executionContext) _SubGraph_wsUrl(ctx context.Context, field graphql.CollectedField, obj *model.SubGraph) (ret graphql.Marshaler) { @@ -2238,7 +2240,7 @@ func (ec *executionContext) _SubGraph_wsUrl(ctx context.Context, field graphql.C ) } func (ec *executionContext) fieldContext_SubGraph_wsUrl(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("SubGraph", field, false, false, errors.New("field of type String does not have child fields")) + return graphql.NewScalarFieldContext("SubGraph", field, false, false, "String") } func (ec *executionContext) _SubGraph_sdl(ctx context.Context, field graphql.CollectedField, obj *model.SubGraph) (ret graphql.Marshaler) { @@ -2261,7 +2263,7 @@ func (ec *executionContext) _SubGraph_sdl(ctx context.Context, field graphql.Col ) } func (ec *executionContext) fieldContext_SubGraph_sdl(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("SubGraph", field, false, false, errors.New("field of type String does not have child fields")) + return graphql.NewScalarFieldContext("SubGraph", field, false, false, "String") } func (ec *executionContext) _SubGraph_changedBy(ctx context.Context, field graphql.CollectedField, obj *model.SubGraph) (ret graphql.Marshaler) { @@ -2284,7 +2286,7 @@ func (ec *executionContext) _SubGraph_changedBy(ctx context.Context, field graph ) } func (ec *executionContext) fieldContext_SubGraph_changedBy(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("SubGraph", field, false, false, errors.New("field of type String does not have child fields")) + return graphql.NewScalarFieldContext("SubGraph", field, false, false, "String") } func (ec *executionContext) _SubGraph_changedAt(ctx context.Context, field graphql.CollectedField, obj *model.SubGraph) (ret graphql.Marshaler) { @@ -2307,7 +2309,7 @@ func (ec *executionContext) _SubGraph_changedAt(ctx context.Context, field graph ) } func (ec *executionContext) fieldContext_SubGraph_changedAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("SubGraph", field, false, false, errors.New("field of type Time does not have child fields")) + return graphql.NewScalarFieldContext("SubGraph", field, false, false, "Time") } func (ec *executionContext) _SubGraphs_id(ctx context.Context, field graphql.CollectedField, obj *model.SubGraphs) (ret graphql.Marshaler) { @@ -2330,7 +2332,7 @@ func (ec *executionContext) _SubGraphs_id(ctx context.Context, field graphql.Col ) } func (ec *executionContext) fieldContext_SubGraphs_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("SubGraphs", field, false, false, errors.New("field of type ID does not have child fields")) + return graphql.NewScalarFieldContext("SubGraphs", field, false, false, "ID") } func (ec *executionContext) _SubGraphs_minDelaySeconds(ctx context.Context, field graphql.CollectedField, obj *model.SubGraphs) (ret graphql.Marshaler) { @@ -2353,7 +2355,7 @@ func (ec *executionContext) _SubGraphs_minDelaySeconds(ctx context.Context, fiel ) } func (ec *executionContext) fieldContext_SubGraphs_minDelaySeconds(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("SubGraphs", field, false, false, errors.New("field of type Int does not have child fields")) + return graphql.NewScalarFieldContext("SubGraphs", field, false, false, "Int") } func (ec *executionContext) _SubGraphs_sdl(ctx context.Context, field graphql.CollectedField, obj *model.SubGraphs) (ret graphql.Marshaler) { @@ -2376,7 +2378,7 @@ func (ec *executionContext) _SubGraphs_sdl(ctx context.Context, field graphql.Co ) } func (ec *executionContext) fieldContext_SubGraphs_sdl(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("SubGraphs", field, false, false, errors.New("field of type String does not have child fields")) + return graphql.NewScalarFieldContext("SubGraphs", field, false, false, "String") } func (ec *executionContext) _SubGraphs_subGraphs(ctx context.Context, field graphql.CollectedField, obj *model.SubGraphs) (ret graphql.Marshaler) { @@ -2493,7 +2495,7 @@ func (ec *executionContext) _Unchanged_id(ctx context.Context, field graphql.Col ) } func (ec *executionContext) fieldContext_Unchanged_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("Unchanged", field, false, false, errors.New("field of type ID does not have child fields")) + return graphql.NewScalarFieldContext("Unchanged", field, false, false, "ID") } func (ec *executionContext) _Unchanged_minDelaySeconds(ctx context.Context, field graphql.CollectedField, obj *model.Unchanged) (ret graphql.Marshaler) { @@ -2516,7 +2518,7 @@ func (ec *executionContext) _Unchanged_minDelaySeconds(ctx context.Context, fiel ) } func (ec *executionContext) fieldContext_Unchanged_minDelaySeconds(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("Unchanged", field, false, false, errors.New("field of type Int does not have child fields")) + return graphql.NewScalarFieldContext("Unchanged", field, false, false, "Int") } func (ec *executionContext) _User_id(ctx context.Context, field graphql.CollectedField, obj *model.User) (ret graphql.Marshaler) { @@ -2539,7 +2541,7 @@ func (ec *executionContext) _User_id(ctx context.Context, field graphql.Collecte ) } func (ec *executionContext) fieldContext_User_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("User", field, false, false, errors.New("field of type String does not have child fields")) + return graphql.NewScalarFieldContext("User", field, false, false, "String") } func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { @@ -2562,7 +2564,7 @@ func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql ) } func (ec *executionContext) fieldContext___Directive_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("__Directive", field, false, false, errors.New("field of type String does not have child fields")) + return graphql.NewScalarFieldContext("__Directive", field, false, false, "String") } func (ec *executionContext) ___Directive_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { @@ -2585,7 +2587,7 @@ func (ec *executionContext) ___Directive_description(ctx context.Context, field ) } func (ec *executionContext) fieldContext___Directive_description(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("__Directive", field, true, false, errors.New("field of type String does not have child fields")) + return graphql.NewScalarFieldContext("__Directive", field, true, false, "String") } func (ec *executionContext) ___Directive_isRepeatable(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { @@ -2608,7 +2610,7 @@ func (ec *executionContext) ___Directive_isRepeatable(ctx context.Context, field ) } func (ec *executionContext) fieldContext___Directive_isRepeatable(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("__Directive", field, false, false, errors.New("field of type Boolean does not have child fields")) + return graphql.NewScalarFieldContext("__Directive", field, false, false, "Boolean") } func (ec *executionContext) ___Directive_locations(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { @@ -2631,7 +2633,7 @@ func (ec *executionContext) ___Directive_locations(ctx context.Context, field gr ) } func (ec *executionContext) fieldContext___Directive_locations(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("__Directive", field, false, false, errors.New("field of type __DirectiveLocation does not have child fields")) + return graphql.NewScalarFieldContext("__Directive", field, false, false, "__DirectiveLocation") } func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { @@ -2697,7 +2699,7 @@ func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql ) } func (ec *executionContext) fieldContext___EnumValue_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("__EnumValue", field, false, false, errors.New("field of type String does not have child fields")) + return graphql.NewScalarFieldContext("__EnumValue", field, false, false, "String") } func (ec *executionContext) ___EnumValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { @@ -2720,7 +2722,7 @@ func (ec *executionContext) ___EnumValue_description(ctx context.Context, field ) } func (ec *executionContext) fieldContext___EnumValue_description(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("__EnumValue", field, true, false, errors.New("field of type String does not have child fields")) + return graphql.NewScalarFieldContext("__EnumValue", field, true, false, "String") } func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { @@ -2743,7 +2745,7 @@ func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field ) } func (ec *executionContext) fieldContext___EnumValue_isDeprecated(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("__EnumValue", field, true, false, errors.New("field of type Boolean does not have child fields")) + return graphql.NewScalarFieldContext("__EnumValue", field, true, false, "Boolean") } func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { @@ -2766,7 +2768,7 @@ func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, ) } func (ec *executionContext) fieldContext___EnumValue_deprecationReason(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("__EnumValue", field, true, false, errors.New("field of type String does not have child fields")) + return graphql.NewScalarFieldContext("__EnumValue", field, true, false, "String") } func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { @@ -2789,7 +2791,7 @@ func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.Col ) } func (ec *executionContext) fieldContext___Field_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("__Field", field, false, false, errors.New("field of type String does not have child fields")) + return graphql.NewScalarFieldContext("__Field", field, false, false, "String") } func (ec *executionContext) ___Field_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { @@ -2812,7 +2814,7 @@ func (ec *executionContext) ___Field_description(ctx context.Context, field grap ) } func (ec *executionContext) fieldContext___Field_description(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("__Field", field, true, false, errors.New("field of type String does not have child fields")) + return graphql.NewScalarFieldContext("__Field", field, true, false, "String") } func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { @@ -2910,7 +2912,7 @@ func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field gra ) } func (ec *executionContext) fieldContext___Field_isDeprecated(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("__Field", field, true, false, errors.New("field of type Boolean does not have child fields")) + return graphql.NewScalarFieldContext("__Field", field, true, false, "Boolean") } func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { @@ -2933,7 +2935,7 @@ func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, fiel ) } func (ec *executionContext) fieldContext___Field_deprecationReason(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("__Field", field, true, false, errors.New("field of type String does not have child fields")) + return graphql.NewScalarFieldContext("__Field", field, true, false, "String") } func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { @@ -2956,7 +2958,7 @@ func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphq ) } func (ec *executionContext) fieldContext___InputValue_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("__InputValue", field, false, false, errors.New("field of type String does not have child fields")) + return graphql.NewScalarFieldContext("__InputValue", field, false, false, "String") } func (ec *executionContext) ___InputValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { @@ -2979,7 +2981,7 @@ func (ec *executionContext) ___InputValue_description(ctx context.Context, field ) } func (ec *executionContext) fieldContext___InputValue_description(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("__InputValue", field, true, false, errors.New("field of type String does not have child fields")) + return graphql.NewScalarFieldContext("__InputValue", field, true, false, "String") } func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { @@ -3034,7 +3036,7 @@ func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, fiel ) } func (ec *executionContext) fieldContext___InputValue_defaultValue(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("__InputValue", field, false, false, errors.New("field of type String does not have child fields")) + return graphql.NewScalarFieldContext("__InputValue", field, false, false, "String") } func (ec *executionContext) ___InputValue_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { @@ -3057,7 +3059,7 @@ func (ec *executionContext) ___InputValue_isDeprecated(ctx context.Context, fiel ) } func (ec *executionContext) fieldContext___InputValue_isDeprecated(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("__InputValue", field, true, false, errors.New("field of type Boolean does not have child fields")) + return graphql.NewScalarFieldContext("__InputValue", field, true, false, "Boolean") } func (ec *executionContext) ___InputValue_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { @@ -3080,7 +3082,7 @@ func (ec *executionContext) ___InputValue_deprecationReason(ctx context.Context, ) } func (ec *executionContext) fieldContext___InputValue_deprecationReason(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("__InputValue", field, true, false, errors.New("field of type String does not have child fields")) + return graphql.NewScalarFieldContext("__InputValue", field, true, false, "String") } func (ec *executionContext) ___Schema_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { @@ -3103,7 +3105,7 @@ func (ec *executionContext) ___Schema_description(ctx context.Context, field gra ) } func (ec *executionContext) fieldContext___Schema_description(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("__Schema", field, true, false, errors.New("field of type String does not have child fields")) + return graphql.NewScalarFieldContext("__Schema", field, true, false, "String") } func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { @@ -3286,7 +3288,7 @@ func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.Coll ) } func (ec *executionContext) fieldContext___Type_kind(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("__Type", field, true, false, errors.New("field of type __TypeKind does not have child fields")) + return graphql.NewScalarFieldContext("__Type", field, true, false, "__TypeKind") } func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { @@ -3309,7 +3311,7 @@ func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.Coll ) } func (ec *executionContext) fieldContext___Type_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("__Type", field, true, false, errors.New("field of type String does not have child fields")) + return graphql.NewScalarFieldContext("__Type", field, true, false, "String") } func (ec *executionContext) ___Type_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { @@ -3332,7 +3334,7 @@ func (ec *executionContext) ___Type_description(ctx context.Context, field graph ) } func (ec *executionContext) fieldContext___Type_description(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("__Type", field, true, false, errors.New("field of type String does not have child fields")) + return graphql.NewScalarFieldContext("__Type", field, true, false, "String") } func (ec *executionContext) ___Type_specifiedByURL(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { @@ -3355,7 +3357,7 @@ func (ec *executionContext) ___Type_specifiedByURL(ctx context.Context, field gr ) } func (ec *executionContext) fieldContext___Type_specifiedByURL(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("__Type", field, true, false, errors.New("field of type String does not have child fields")) + return graphql.NewScalarFieldContext("__Type", field, true, false, "String") } func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { @@ -3594,7 +3596,7 @@ func (ec *executionContext) ___Type_isOneOf(ctx context.Context, field graphql.C ) } func (ec *executionContext) fieldContext___Type_isOneOf(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("__Type", field, true, false, errors.New("field of type Boolean does not have child fields")) + return graphql.NewScalarFieldContext("__Type", field, true, false, "Boolean") } // endregion **************************** field.gotpl ***************************** @@ -3659,6 +3661,18 @@ func (ec *executionContext) unmarshalInputInputAPIKey(ctx context.Context, obj a return it, nil } +// UnmarshalInputAPIKey unmarshals raw into the InputAPIKey input type, using the +// unmarshaler bound to ctx's request. Call it from a resolver to decode an input +// object that was not passed as a field argument. +// +// ctx must come from a gqlgen request; outside one there is no unmarshaler to use +// and the returned error says so. +func UnmarshalInputAPIKey(ctx context.Context, raw any) (model.InputAPIKey, error) { + var out model.InputAPIKey + err := graphql.UnmarshalNamedInputFromContext(ctx, "InputAPIKey", raw, &out) + return out, err +} + func (ec *executionContext) unmarshalInputInputSubGraph(ctx context.Context, obj any) (model.InputSubGraph, error) { var it model.InputSubGraph if obj == nil { @@ -3717,6 +3731,18 @@ func (ec *executionContext) unmarshalInputInputSubGraph(ctx context.Context, obj return it, nil } +// UnmarshalInputSubGraph unmarshals raw into the InputSubGraph input type, using the +// unmarshaler bound to ctx's request. Call it from a resolver to decode an input +// object that was not passed as a field argument. +// +// ctx must come from a gqlgen request; outside one there is no unmarshaler to use +// and the returned error says so. +func UnmarshalInputSubGraph(ctx context.Context, raw any) (model.InputSubGraph, error) { + var out model.InputSubGraph + err := graphql.UnmarshalNamedInputFromContext(ctx, "InputSubGraph", raw, &out) + return out, err +} + // endregion **************************** input.gotpl ***************************** // region ************************** interface.gotpl *************************** @@ -3758,8 +3784,7 @@ func (ec *executionContext) _APIKey(ctx context.Context, sel ast.SelectionSet, o fields := graphql.CollectFields(ec.OperationContext, sel, aPIKeyImplementors) out := graphql.NewFieldSet(fields) - deferredFieldSet := graphql.NewFieldSet(nil) - deferLabelToView := make(map[string]*graphql.FieldSetView) + deferred := graphql.NewDeferredGroup(ctx) for i, field := range fields { switch field.Name { case "__typename": @@ -3808,14 +3833,10 @@ func (ec *executionContext) _APIKey(ctx context.Context, sel ast.SelectionSet, o return graphql.Null } - atomic.AddInt32(&ec.Deferred, int32(min(len(deferLabelToView), math.MaxInt32))) - - ec.ProcessDeferredGroup(graphql.DeferredGroup{ - Defers: deferLabelToView, - Path: graphql.GetPath(ctx), - FieldSet: deferredFieldSet, - Context: ctx, - }) + if n := len(deferred.Defers); n > 0 { + atomic.AddInt32(&ec.Deferred, int32(min(n, math.MaxInt32))) + ec.ProcessDeferredGroup(deferred) + } return out } @@ -3829,8 +3850,7 @@ func (ec *executionContext) _Mutation(ctx context.Context, sel ast.SelectionSet) }) out := graphql.NewFieldSet(fields) - deferredFieldSet := graphql.NewFieldSet(nil) - deferLabelToView := make(map[string]*graphql.FieldSetView) + deferred := graphql.NewDeferredGroup(ctx) for i, field := range fields { innerCtx := graphql.WithRootFieldContext(ctx, &graphql.RootFieldContext{ Object: field.Name, @@ -3891,14 +3911,10 @@ func (ec *executionContext) _Mutation(ctx context.Context, sel ast.SelectionSet) return graphql.Null } - atomic.AddInt32(&ec.Deferred, int32(min(len(deferLabelToView), math.MaxInt32))) - - ec.ProcessDeferredGroup(graphql.DeferredGroup{ - Defers: deferLabelToView, - Path: graphql.GetPath(ctx), - FieldSet: deferredFieldSet, - Context: ctx, - }) + if n := len(deferred.Defers); n > 0 { + atomic.AddInt32(&ec.Deferred, int32(min(n, math.MaxInt32))) + ec.ProcessDeferredGroup(deferred) + } return out } @@ -3909,8 +3925,7 @@ func (ec *executionContext) _Organization(ctx context.Context, sel ast.Selection fields := graphql.CollectFields(ec.OperationContext, sel, organizationImplementors) out := graphql.NewFieldSet(fields) - deferredFieldSet := graphql.NewFieldSet(nil) - deferLabelToView := make(map[string]*graphql.FieldSetView) + deferred := graphql.NewDeferredGroup(ctx) for i, field := range fields { switch field.Name { case "__typename": @@ -3944,14 +3959,10 @@ func (ec *executionContext) _Organization(ctx context.Context, sel ast.Selection return graphql.Null } - atomic.AddInt32(&ec.Deferred, int32(min(len(deferLabelToView), math.MaxInt32))) - - ec.ProcessDeferredGroup(graphql.DeferredGroup{ - Defers: deferLabelToView, - Path: graphql.GetPath(ctx), - FieldSet: deferredFieldSet, - Context: ctx, - }) + if n := len(deferred.Defers); n > 0 { + atomic.AddInt32(&ec.Deferred, int32(min(n, math.MaxInt32))) + ec.ProcessDeferredGroup(deferred) + } return out } @@ -3965,8 +3976,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr }) out := graphql.NewFieldSet(fields) - deferredFieldSet := graphql.NewFieldSet(nil) - deferLabelToView := make(map[string]*graphql.FieldSetView) + deferred := graphql.NewDeferredGroup(ctx) for i, field := range fields { innerCtx := graphql.WithRootFieldContext(ctx, &graphql.RootFieldContext{ Object: field.Name, @@ -3977,93 +3987,29 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr case "__typename": out.Values[i] = graphql.MarshalString("Query") case "organizations": - field := field - - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - } - }() - res = ec._Query_organizations(ctx, field) - if res == graphql.Null { - atomic.AddUint32(&fs.Invalids, 1) - } - return res - } - - rrm := func(ctx context.Context) graphql.Marshaler { - return ec.OperationContext.RootResolverMiddleware(ctx, - func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) - } - - out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) }) + out.ResolveRootConcurrently(innerCtx, ec.OperationContext, i, + true, true, + func(ctx context.Context) graphql.Marshaler { + return ec._Query_organizations(ctx, field) + }) case "allOrganizations": - field := field - - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - } - }() - res = ec._Query_allOrganizations(ctx, field) - if res == graphql.Null { - atomic.AddUint32(&fs.Invalids, 1) - } - return res - } - - rrm := func(ctx context.Context) graphql.Marshaler { - return ec.OperationContext.RootResolverMiddleware(ctx, - func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) - } - - out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) }) + out.ResolveRootConcurrently(innerCtx, ec.OperationContext, i, + true, true, + func(ctx context.Context) graphql.Marshaler { + return ec._Query_allOrganizations(ctx, field) + }) case "supergraph": - field := field - - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - } - }() - res = ec._Query_supergraph(ctx, field) - if res == graphql.Null { - atomic.AddUint32(&fs.Invalids, 1) - } - return res - } - - rrm := func(ctx context.Context) graphql.Marshaler { - return ec.OperationContext.RootResolverMiddleware(ctx, - func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) - } - - out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) }) + out.ResolveRootConcurrently(innerCtx, ec.OperationContext, i, + true, true, + func(ctx context.Context) graphql.Marshaler { + return ec._Query_supergraph(ctx, field) + }) case "latestSchema": - field := field - - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - } - }() - res = ec._Query_latestSchema(ctx, field) - if res == graphql.Null { - atomic.AddUint32(&fs.Invalids, 1) - } - return res - } - - rrm := func(ctx context.Context) graphql.Marshaler { - return ec.OperationContext.RootResolverMiddleware(ctx, - func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) - } - - out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) }) + out.ResolveRootConcurrently(innerCtx, ec.OperationContext, i, + true, true, + func(ctx context.Context) graphql.Marshaler { + return ec._Query_latestSchema(ctx, field) + }) case "__type": out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { return ec._Query___type(ctx, field) @@ -4087,14 +4033,10 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr return graphql.Null } - atomic.AddInt32(&ec.Deferred, int32(min(len(deferLabelToView), math.MaxInt32))) - - ec.ProcessDeferredGroup(graphql.DeferredGroup{ - Defers: deferLabelToView, - Path: graphql.GetPath(ctx), - FieldSet: deferredFieldSet, - Context: ctx, - }) + if n := len(deferred.Defers); n > 0 { + atomic.AddInt32(&ec.Deferred, int32(min(n, math.MaxInt32))) + ec.ProcessDeferredGroup(deferred) + } return out } @@ -4105,8 +4047,7 @@ func (ec *executionContext) _SchemaUpdate(ctx context.Context, sel ast.Selection fields := graphql.CollectFields(ec.OperationContext, sel, schemaUpdateImplementors) out := graphql.NewFieldSet(fields) - deferredFieldSet := graphql.NewFieldSet(nil) - deferLabelToView := make(map[string]*graphql.FieldSetView) + deferred := graphql.NewDeferredGroup(ctx) for i, field := range fields { switch field.Name { case "__typename": @@ -4140,14 +4081,10 @@ func (ec *executionContext) _SchemaUpdate(ctx context.Context, sel ast.Selection return graphql.Null } - atomic.AddInt32(&ec.Deferred, int32(min(len(deferLabelToView), math.MaxInt32))) - - ec.ProcessDeferredGroup(graphql.DeferredGroup{ - Defers: deferLabelToView, - Path: graphql.GetPath(ctx), - FieldSet: deferredFieldSet, - Context: ctx, - }) + if n := len(deferred.Defers); n > 0 { + atomic.AddInt32(&ec.Deferred, int32(min(n, math.MaxInt32))) + ec.ProcessDeferredGroup(deferred) + } return out } @@ -4158,8 +4095,7 @@ func (ec *executionContext) _SubGraph(ctx context.Context, sel ast.SelectionSet, fields := graphql.CollectFields(ec.OperationContext, sel, subGraphImplementors) out := graphql.NewFieldSet(fields) - deferredFieldSet := graphql.NewFieldSet(nil) - deferLabelToView := make(map[string]*graphql.FieldSetView) + deferred := graphql.NewDeferredGroup(ctx) for i, field := range fields { switch field.Name { case "__typename": @@ -4208,14 +4144,10 @@ func (ec *executionContext) _SubGraph(ctx context.Context, sel ast.SelectionSet, return graphql.Null } - atomic.AddInt32(&ec.Deferred, int32(min(len(deferLabelToView), math.MaxInt32))) - - ec.ProcessDeferredGroup(graphql.DeferredGroup{ - Defers: deferLabelToView, - Path: graphql.GetPath(ctx), - FieldSet: deferredFieldSet, - Context: ctx, - }) + if n := len(deferred.Defers); n > 0 { + atomic.AddInt32(&ec.Deferred, int32(min(n, math.MaxInt32))) + ec.ProcessDeferredGroup(deferred) + } return out } @@ -4226,8 +4158,7 @@ func (ec *executionContext) _SubGraphs(ctx context.Context, sel ast.SelectionSet fields := graphql.CollectFields(ec.OperationContext, sel, subGraphsImplementors) out := graphql.NewFieldSet(fields) - deferredFieldSet := graphql.NewFieldSet(nil) - deferLabelToView := make(map[string]*graphql.FieldSetView) + deferred := graphql.NewDeferredGroup(ctx) for i, field := range fields { switch field.Name { case "__typename": @@ -4261,14 +4192,10 @@ func (ec *executionContext) _SubGraphs(ctx context.Context, sel ast.SelectionSet return graphql.Null } - atomic.AddInt32(&ec.Deferred, int32(min(len(deferLabelToView), math.MaxInt32))) - - ec.ProcessDeferredGroup(graphql.DeferredGroup{ - Defers: deferLabelToView, - Path: graphql.GetPath(ctx), - FieldSet: deferredFieldSet, - Context: ctx, - }) + if n := len(deferred.Defers); n > 0 { + atomic.AddInt32(&ec.Deferred, int32(min(n, math.MaxInt32))) + ec.ProcessDeferredGroup(deferred) + } return out } @@ -4299,8 +4226,7 @@ func (ec *executionContext) _Unchanged(ctx context.Context, sel ast.SelectionSet fields := graphql.CollectFields(ec.OperationContext, sel, unchangedImplementors) out := graphql.NewFieldSet(fields) - deferredFieldSet := graphql.NewFieldSet(nil) - deferLabelToView := make(map[string]*graphql.FieldSetView) + deferred := graphql.NewDeferredGroup(ctx) for i, field := range fields { switch field.Name { case "__typename": @@ -4324,14 +4250,10 @@ func (ec *executionContext) _Unchanged(ctx context.Context, sel ast.SelectionSet return graphql.Null } - atomic.AddInt32(&ec.Deferred, int32(min(len(deferLabelToView), math.MaxInt32))) - - ec.ProcessDeferredGroup(graphql.DeferredGroup{ - Defers: deferLabelToView, - Path: graphql.GetPath(ctx), - FieldSet: deferredFieldSet, - Context: ctx, - }) + if n := len(deferred.Defers); n > 0 { + atomic.AddInt32(&ec.Deferred, int32(min(n, math.MaxInt32))) + ec.ProcessDeferredGroup(deferred) + } return out } @@ -4342,8 +4264,7 @@ func (ec *executionContext) _User(ctx context.Context, sel ast.SelectionSet, obj fields := graphql.CollectFields(ec.OperationContext, sel, userImplementors) out := graphql.NewFieldSet(fields) - deferredFieldSet := graphql.NewFieldSet(nil) - deferLabelToView := make(map[string]*graphql.FieldSetView) + deferred := graphql.NewDeferredGroup(ctx) for i, field := range fields { switch field.Name { case "__typename": @@ -4362,14 +4283,10 @@ func (ec *executionContext) _User(ctx context.Context, sel ast.SelectionSet, obj return graphql.Null } - atomic.AddInt32(&ec.Deferred, int32(min(len(deferLabelToView), math.MaxInt32))) - - ec.ProcessDeferredGroup(graphql.DeferredGroup{ - Defers: deferLabelToView, - Path: graphql.GetPath(ctx), - FieldSet: deferredFieldSet, - Context: ctx, - }) + if n := len(deferred.Defers); n > 0 { + atomic.AddInt32(&ec.Deferred, int32(min(n, math.MaxInt32))) + ec.ProcessDeferredGroup(deferred) + } return out } @@ -4380,8 +4297,7 @@ func (ec *executionContext) ___Directive(ctx context.Context, sel ast.SelectionS fields := graphql.CollectFields(ec.OperationContext, sel, __DirectiveImplementors) out := graphql.NewFieldSet(fields) - deferredFieldSet := graphql.NewFieldSet(nil) - deferLabelToView := make(map[string]*graphql.FieldSetView) + deferred := graphql.NewDeferredGroup(ctx) for i, field := range fields { switch field.Name { case "__typename": @@ -4420,14 +4336,10 @@ func (ec *executionContext) ___Directive(ctx context.Context, sel ast.SelectionS return graphql.Null } - atomic.AddInt32(&ec.Deferred, int32(min(len(deferLabelToView), math.MaxInt32))) - - ec.ProcessDeferredGroup(graphql.DeferredGroup{ - Defers: deferLabelToView, - Path: graphql.GetPath(ctx), - FieldSet: deferredFieldSet, - Context: ctx, - }) + if n := len(deferred.Defers); n > 0 { + atomic.AddInt32(&ec.Deferred, int32(min(n, math.MaxInt32))) + ec.ProcessDeferredGroup(deferred) + } return out } @@ -4438,8 +4350,7 @@ func (ec *executionContext) ___EnumValue(ctx context.Context, sel ast.SelectionS fields := graphql.CollectFields(ec.OperationContext, sel, __EnumValueImplementors) out := graphql.NewFieldSet(fields) - deferredFieldSet := graphql.NewFieldSet(nil) - deferLabelToView := make(map[string]*graphql.FieldSetView) + deferred := graphql.NewDeferredGroup(ctx) for i, field := range fields { switch field.Name { case "__typename": @@ -4473,14 +4384,10 @@ func (ec *executionContext) ___EnumValue(ctx context.Context, sel ast.SelectionS return graphql.Null } - atomic.AddInt32(&ec.Deferred, int32(min(len(deferLabelToView), math.MaxInt32))) - - ec.ProcessDeferredGroup(graphql.DeferredGroup{ - Defers: deferLabelToView, - Path: graphql.GetPath(ctx), - FieldSet: deferredFieldSet, - Context: ctx, - }) + if n := len(deferred.Defers); n > 0 { + atomic.AddInt32(&ec.Deferred, int32(min(n, math.MaxInt32))) + ec.ProcessDeferredGroup(deferred) + } return out } @@ -4491,8 +4398,7 @@ func (ec *executionContext) ___Field(ctx context.Context, sel ast.SelectionSet, fields := graphql.CollectFields(ec.OperationContext, sel, __FieldImplementors) out := graphql.NewFieldSet(fields) - deferredFieldSet := graphql.NewFieldSet(nil) - deferLabelToView := make(map[string]*graphql.FieldSetView) + deferred := graphql.NewDeferredGroup(ctx) for i, field := range fields { switch field.Name { case "__typename": @@ -4536,14 +4442,10 @@ func (ec *executionContext) ___Field(ctx context.Context, sel ast.SelectionSet, return graphql.Null } - atomic.AddInt32(&ec.Deferred, int32(min(len(deferLabelToView), math.MaxInt32))) - - ec.ProcessDeferredGroup(graphql.DeferredGroup{ - Defers: deferLabelToView, - Path: graphql.GetPath(ctx), - FieldSet: deferredFieldSet, - Context: ctx, - }) + if n := len(deferred.Defers); n > 0 { + atomic.AddInt32(&ec.Deferred, int32(min(n, math.MaxInt32))) + ec.ProcessDeferredGroup(deferred) + } return out } @@ -4554,8 +4456,7 @@ func (ec *executionContext) ___InputValue(ctx context.Context, sel ast.Selection fields := graphql.CollectFields(ec.OperationContext, sel, __InputValueImplementors) out := graphql.NewFieldSet(fields) - deferredFieldSet := graphql.NewFieldSet(nil) - deferLabelToView := make(map[string]*graphql.FieldSetView) + deferred := graphql.NewDeferredGroup(ctx) for i, field := range fields { switch field.Name { case "__typename": @@ -4599,14 +4500,10 @@ func (ec *executionContext) ___InputValue(ctx context.Context, sel ast.Selection return graphql.Null } - atomic.AddInt32(&ec.Deferred, int32(min(len(deferLabelToView), math.MaxInt32))) - - ec.ProcessDeferredGroup(graphql.DeferredGroup{ - Defers: deferLabelToView, - Path: graphql.GetPath(ctx), - FieldSet: deferredFieldSet, - Context: ctx, - }) + if n := len(deferred.Defers); n > 0 { + atomic.AddInt32(&ec.Deferred, int32(min(n, math.MaxInt32))) + ec.ProcessDeferredGroup(deferred) + } return out } @@ -4617,8 +4514,7 @@ func (ec *executionContext) ___Schema(ctx context.Context, sel ast.SelectionSet, fields := graphql.CollectFields(ec.OperationContext, sel, __SchemaImplementors) out := graphql.NewFieldSet(fields) - deferredFieldSet := graphql.NewFieldSet(nil) - deferLabelToView := make(map[string]*graphql.FieldSetView) + deferred := graphql.NewDeferredGroup(ctx) for i, field := range fields { switch field.Name { case "__typename": @@ -4662,14 +4558,10 @@ func (ec *executionContext) ___Schema(ctx context.Context, sel ast.SelectionSet, return graphql.Null } - atomic.AddInt32(&ec.Deferred, int32(min(len(deferLabelToView), math.MaxInt32))) - - ec.ProcessDeferredGroup(graphql.DeferredGroup{ - Defers: deferLabelToView, - Path: graphql.GetPath(ctx), - FieldSet: deferredFieldSet, - Context: ctx, - }) + if n := len(deferred.Defers); n > 0 { + atomic.AddInt32(&ec.Deferred, int32(min(n, math.MaxInt32))) + ec.ProcessDeferredGroup(deferred) + } return out } @@ -4680,8 +4572,7 @@ func (ec *executionContext) ___Type(ctx context.Context, sel ast.SelectionSet, o fields := graphql.CollectFields(ec.OperationContext, sel, __TypeImplementors) out := graphql.NewFieldSet(fields) - deferredFieldSet := graphql.NewFieldSet(nil) - deferLabelToView := make(map[string]*graphql.FieldSetView) + deferred := graphql.NewDeferredGroup(ctx) for i, field := range fields { switch field.Name { case "__typename": @@ -4750,14 +4641,10 @@ func (ec *executionContext) ___Type(ctx context.Context, sel ast.SelectionSet, o return graphql.Null } - atomic.AddInt32(&ec.Deferred, int32(min(len(deferLabelToView), math.MaxInt32))) - - ec.ProcessDeferredGroup(graphql.DeferredGroup{ - Defers: deferLabelToView, - Path: graphql.GetPath(ctx), - FieldSet: deferredFieldSet, - Context: ctx, - }) + if n := len(deferred.Defers); n > 0 { + atomic.AddInt32(&ec.Deferred, int32(min(n, math.MaxInt32))) + ec.ProcessDeferredGroup(deferred) + } return out } @@ -4784,9 +4671,7 @@ func (ec *executionContext) marshalNAPIKey2ᚕᚖgiteaᚗunboundᚗseᚋunbounds func (ec *executionContext) marshalNAPIKey2ᚖgiteaᚗunboundᚗseᚋunboundsoftwareᚋschemasᚋgraphᚋmodelᚐAPIKey(ctx context.Context, sel ast.SelectionSet, v *model.APIKey) graphql.Marshaler { if v == nil { - if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { - graphql.AddErrorf(ctx, "the requested element is null which the schema does not allow") - } + graphql.AddInvalidNullError(ctx, "APIKey!") return graphql.Null } return ec._APIKey(ctx, sel, v) @@ -4801,9 +4686,7 @@ func (ec *executionContext) marshalNBoolean2bool(ctx context.Context, sel ast.Se _ = sel res := graphql.MarshalBoolean(v) if res == graphql.Null { - if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { - graphql.AddErrorf(ctx, "the requested element is null which the schema does not allow") - } + graphql.AddInvalidNullFromMarshaler(ctx, "Boolean!") } return res } @@ -4817,9 +4700,7 @@ func (ec *executionContext) marshalNID2string(ctx context.Context, sel ast.Selec _ = sel res := graphql.MarshalID(v) if res == graphql.Null { - if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { - graphql.AddErrorf(ctx, "the requested element is null which the schema does not allow") - } + graphql.AddInvalidNullFromMarshaler(ctx, "ID!") } return res } @@ -4838,9 +4719,7 @@ func (ec *executionContext) marshalNInt2int(ctx context.Context, sel ast.Selecti _ = sel res := graphql.MarshalInt(v) if res == graphql.Null { - if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { - graphql.AddErrorf(ctx, "the requested element is null which the schema does not allow") - } + graphql.AddInvalidNullFromMarshaler(ctx, "Int!") } return res } @@ -4863,9 +4742,7 @@ func (ec *executionContext) marshalNOrganization2ᚕᚖgiteaᚗunboundᚗseᚋun func (ec *executionContext) marshalNOrganization2ᚖgiteaᚗunboundᚗseᚋunboundsoftwareᚋschemasᚋgraphᚋmodelᚐOrganization(ctx context.Context, sel ast.SelectionSet, v *model.Organization) graphql.Marshaler { if v == nil { - if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { - graphql.AddErrorf(ctx, "the requested element is null which the schema does not allow") - } + graphql.AddInvalidNullError(ctx, "Organization!") return graphql.Null } return ec._Organization(ctx, sel, v) @@ -4873,9 +4750,7 @@ func (ec *executionContext) marshalNOrganization2ᚖgiteaᚗunboundᚗseᚋunbou func (ec *executionContext) marshalNSchemaUpdate2ᚖgiteaᚗunboundᚗseᚋunboundsoftwareᚋschemasᚋgraphᚋmodelᚐSchemaUpdate(ctx context.Context, sel ast.SelectionSet, v *model.SchemaUpdate) graphql.Marshaler { if v == nil { - if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { - graphql.AddErrorf(ctx, "the requested element is null which the schema does not allow") - } + graphql.AddInvalidNullError(ctx, "SchemaUpdate!") return graphql.Null } return ec._SchemaUpdate(ctx, sel, v) @@ -4890,9 +4765,7 @@ func (ec *executionContext) marshalNString2string(ctx context.Context, sel ast.S _ = sel res := graphql.MarshalString(v) if res == graphql.Null { - if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { - graphql.AddErrorf(ctx, "the requested element is null which the schema does not allow") - } + graphql.AddInvalidNullFromMarshaler(ctx, "String!") } return res } @@ -4944,9 +4817,7 @@ func (ec *executionContext) marshalNSubGraph2ᚕᚖgiteaᚗunboundᚗseᚋunboun func (ec *executionContext) marshalNSubGraph2ᚖgiteaᚗunboundᚗseᚋunboundsoftwareᚋschemasᚋgraphᚋmodelᚐSubGraph(ctx context.Context, sel ast.SelectionSet, v *model.SubGraph) graphql.Marshaler { if v == nil { - if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { - graphql.AddErrorf(ctx, "the requested element is null which the schema does not allow") - } + graphql.AddInvalidNullError(ctx, "SubGraph!") return graphql.Null } return ec._SubGraph(ctx, sel, v) @@ -4954,9 +4825,7 @@ func (ec *executionContext) marshalNSubGraph2ᚖgiteaᚗunboundᚗseᚋunboundso func (ec *executionContext) marshalNSupergraph2giteaᚗunboundᚗseᚋunboundsoftwareᚋschemasᚋgraphᚋmodelᚐSupergraph(ctx context.Context, sel ast.SelectionSet, v model.Supergraph) graphql.Marshaler { if v == nil { - if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { - graphql.AddErrorf(ctx, "the requested element is null which the schema does not allow") - } + graphql.AddInvalidNullError(ctx, "Supergraph!") return graphql.Null } return ec._Supergraph(ctx, sel, v) @@ -4971,9 +4840,7 @@ func (ec *executionContext) marshalNTime2timeᚐTime(ctx context.Context, sel as _ = sel res := graphql.MarshalTime(v) if res == graphql.Null { - if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { - graphql.AddErrorf(ctx, "the requested element is null which the schema does not allow") - } + graphql.AddInvalidNullFromMarshaler(ctx, "Time!") } return res } @@ -4996,9 +4863,7 @@ func (ec *executionContext) marshalNUser2ᚕᚖgiteaᚗunboundᚗseᚋunboundsof func (ec *executionContext) marshalNUser2ᚖgiteaᚗunboundᚗseᚋunboundsoftwareᚋschemasᚋgraphᚋmodelᚐUser(ctx context.Context, sel ast.SelectionSet, v *model.User) graphql.Marshaler { if v == nil { - if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { - graphql.AddErrorf(ctx, "the requested element is null which the schema does not allow") - } + graphql.AddInvalidNullError(ctx, "User!") return graphql.Null } return ec._User(ctx, sel, v) @@ -5033,9 +4898,7 @@ func (ec *executionContext) marshalN__DirectiveLocation2string(ctx context.Conte _ = sel res := graphql.MarshalString(v) if res == graphql.Null { - if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { - graphql.AddErrorf(ctx, "the requested element is null which the schema does not allow") - } + graphql.AddInvalidNullFromMarshaler(ctx, "__DirectiveLocation!") } return res } @@ -5120,9 +4983,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.GetFieldContext(ctx)) { - graphql.AddErrorf(ctx, "the requested element is null which the schema does not allow") - } + graphql.AddInvalidNullError(ctx, "__Type!") return graphql.Null } return ec.___Type(ctx, sel, v) @@ -5137,9 +4998,7 @@ func (ec *executionContext) marshalN__TypeKind2string(ctx context.Context, sel a _ = sel res := graphql.MarshalString(v) if res == graphql.Null { - if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { - graphql.AddErrorf(ctx, "the requested element is null which the schema does not allow") - } + graphql.AddInvalidNullFromMarshaler(ctx, "__TypeKind!") } return res } -- 2.54.0