aboutsummaryrefslogtreecommitdiffstats
path: root/api/graphql/graph/identity.generated.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2023-08-12 14:05:02 +0200
committerGitHub <noreply@github.com>2023-08-12 14:05:02 +0200
commit20e62977a0509e2c79ef5d8d9173103a278b78ff (patch)
tree9a39ab11d0373caeaf34f2d06188c481d27f67d7 /api/graphql/graph/identity.generated.go
parenta0d225ce23af9f5dbe31521f19485c66d409e573 (diff)
parent429b913dc5519babfab47bf65222e32415a6c1bd (diff)
downloadgit-bug-20e62977a0509e2c79ef5d8d9173103a278b78ff.tar.gz
Merge pull request #1088 from MichaelMure/dependabot/go_modules/github.com/99designs/gqlgen-0.17.36
build(deps): bump github.com/99designs/gqlgen from 0.17.20 to 0.17.36
Diffstat (limited to 'api/graphql/graph/identity.generated.go')
-rw-r--r--api/graphql/graph/identity.generated.go127
1 files changed, 78 insertions, 49 deletions
diff --git a/api/graphql/graph/identity.generated.go b/api/graphql/graph/identity.generated.go
index 51aa188b..1fe6ac23 100644
--- a/api/graphql/graph/identity.generated.go
+++ b/api/graphql/graph/identity.generated.go
@@ -706,23 +706,22 @@ var identityImplementors = []string{"Identity"}
func (ec *executionContext) _Identity(ctx context.Context, sel ast.SelectionSet, obj models.IdentityWrapper) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, identityImplementors)
+
out := graphql.NewFieldSet(fields)
- var invalids uint32
+ deferred := make(map[string]*graphql.FieldSet)
for i, field := range fields {
switch field.Name {
case "__typename":
out.Values[i] = graphql.MarshalString("Identity")
case "id":
-
out.Values[i] = ec._Identity_id(ctx, field, obj)
-
if out.Values[i] == graphql.Null {
- atomic.AddUint32(&invalids, 1)
+ atomic.AddUint32(&out.Invalids, 1)
}
case "humanId":
field := field
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
+ 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))
@@ -730,53 +729,69 @@ func (ec *executionContext) _Identity(ctx context.Context, sel ast.SelectionSet,
}()
res = ec._Identity_humanId(ctx, field, obj)
if res == graphql.Null {
- atomic.AddUint32(&invalids, 1)
+ atomic.AddUint32(&fs.Invalids, 1)
}
return res
}
- out.Concurrently(i, func() graphql.Marshaler {
- return innerFunc(ctx)
+ if field.Deferrable != nil {
+ dfs, ok := deferred[field.Deferrable.Label]
+ di := 0
+ if ok {
+ dfs.AddField(field)
+ di = len(dfs.Values) - 1
+ } else {
+ dfs = graphql.NewFieldSet([]graphql.CollectedField{field})
+ deferred[field.Deferrable.Label] = dfs
+ }
+ dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler {
+ return innerFunc(ctx, dfs)
+ })
- })
- case "name":
+ // don't run the out.Concurrently() call below
+ out.Values[i] = graphql.Null
+ continue
+ }
+ out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
+ case "name":
out.Values[i] = ec._Identity_name(ctx, field, obj)
-
case "email":
-
out.Values[i] = ec._Identity_email(ctx, field, obj)
-
case "login":
-
out.Values[i] = ec._Identity_login(ctx, field, obj)
-
case "displayName":
-
out.Values[i] = ec._Identity_displayName(ctx, field, obj)
-
if out.Values[i] == graphql.Null {
- atomic.AddUint32(&invalids, 1)
+ atomic.AddUint32(&out.Invalids, 1)
}
case "avatarUrl":
-
out.Values[i] = ec._Identity_avatarUrl(ctx, field, obj)
-
case "isProtected":
-
out.Values[i] = ec._Identity_isProtected(ctx, field, obj)
-
if out.Values[i] == graphql.Null {
- atomic.AddUint32(&invalids, 1)
+ atomic.AddUint32(&out.Invalids, 1)
}
default:
panic("unknown field " + strconv.Quote(field.Name))
}
}
- out.Dispatch()
- if invalids > 0 {
+ out.Dispatch(ctx)
+ if out.Invalids > 0 {
return graphql.Null
}
+
+ atomic.AddInt32(&ec.deferred, int32(len(deferred)))
+
+ for label, dfs := range deferred {
+ ec.processDeferredGroup(graphql.DeferredGroup{
+ Label: label,
+ Path: graphql.GetPath(ctx),
+ FieldSet: dfs,
+ Context: ctx,
+ })
+ }
+
return out
}
@@ -784,48 +799,53 @@ var identityConnectionImplementors = []string{"IdentityConnection"}
func (ec *executionContext) _IdentityConnection(ctx context.Context, sel ast.SelectionSet, obj *models.IdentityConnection) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, identityConnectionImplementors)
+
out := graphql.NewFieldSet(fields)
- var invalids uint32
+ deferred := make(map[string]*graphql.FieldSet)
for i, field := range fields {
switch field.Name {
case "__typename":
out.Values[i] = graphql.MarshalString("IdentityConnection")
case "edges":
-
out.Values[i] = ec._IdentityConnection_edges(ctx, field, obj)
-
if out.Values[i] == graphql.Null {
- invalids++
+ out.Invalids++
}
case "nodes":
-
out.Values[i] = ec._IdentityConnection_nodes(ctx, field, obj)
-
if out.Values[i] == graphql.Null {
- invalids++
+ out.Invalids++
}
case "pageInfo":
-
out.Values[i] = ec._IdentityConnection_pageInfo(ctx, field, obj)
-
if out.Values[i] == graphql.Null {
- invalids++
+ out.Invalids++
}
case "totalCount":
-
out.Values[i] = ec._IdentityConnection_totalCount(ctx, field, obj)
-
if out.Values[i] == graphql.Null {
- invalids++
+ out.Invalids++
}
default:
panic("unknown field " + strconv.Quote(field.Name))
}
}
- out.Dispatch()
- if invalids > 0 {
+ out.Dispatch(ctx)
+ if out.Invalids > 0 {
return graphql.Null
}
+
+ atomic.AddInt32(&ec.deferred, int32(len(deferred)))
+
+ for label, dfs := range deferred {
+ ec.processDeferredGroup(graphql.DeferredGroup{
+ Label: label,
+ Path: graphql.GetPath(ctx),
+ FieldSet: dfs,
+ Context: ctx,
+ })
+ }
+
return out
}
@@ -833,34 +853,43 @@ var identityEdgeImplementors = []string{"IdentityEdge"}
func (ec *executionContext) _IdentityEdge(ctx context.Context, sel ast.SelectionSet, obj *models.IdentityEdge) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, identityEdgeImplementors)
+
out := graphql.NewFieldSet(fields)
- var invalids uint32
+ deferred := make(map[string]*graphql.FieldSet)
for i, field := range fields {
switch field.Name {
case "__typename":
out.Values[i] = graphql.MarshalString("IdentityEdge")
case "cursor":
-
out.Values[i] = ec._IdentityEdge_cursor(ctx, field, obj)
-
if out.Values[i] == graphql.Null {
- invalids++
+ out.Invalids++
}
case "node":
-
out.Values[i] = ec._IdentityEdge_node(ctx, field, obj)
-
if out.Values[i] == graphql.Null {
- invalids++
+ out.Invalids++
}
default:
panic("unknown field " + strconv.Quote(field.Name))
}
}
- out.Dispatch()
- if invalids > 0 {
+ out.Dispatch(ctx)
+ if out.Invalids > 0 {
return graphql.Null
}
+
+ atomic.AddInt32(&ec.deferred, int32(len(deferred)))
+
+ for label, dfs := range deferred {
+ ec.processDeferredGroup(graphql.DeferredGroup{
+ Label: label,
+ Path: graphql.GetPath(ctx),
+ FieldSet: dfs,
+ Context: ctx,
+ })
+ }
+
return out
}