aboutsummaryrefslogtreecommitdiffstats
path: root/api/graphql/graph/timeline.generated.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2023-08-11 15:24:26 +0200
committerMichael Muré <batolettre@gmail.com>2023-08-11 15:42:36 +0200
commit31a9738094424a0114804521aa6581646e9b8956 (patch)
tree0dcbbdec285a04388a19af7102a99651698a7cb1 /api/graphql/graph/timeline.generated.go
parentf44555f4d7d0c31a46945d02b4e9f74fbeeffe0e (diff)
downloadgit-bug-31a9738094424a0114804521aa6581646e9b8956.tar.gz
api/graphql: regenerate after gqlgen upgrade
Diffstat (limited to 'api/graphql/graph/timeline.generated.go')
-rw-r--r--api/graphql/graph/timeline.generated.go708
1 files changed, 528 insertions, 180 deletions
diff --git a/api/graphql/graph/timeline.generated.go b/api/graphql/graph/timeline.generated.go
index 4833e274..f0c4b06d 100644
--- a/api/graphql/graph/timeline.generated.go
+++ b/api/graphql/graph/timeline.generated.go
@@ -2013,8 +2013,9 @@ var addCommentTimelineItemImplementors = []string{"AddCommentTimelineItem", "Tim
func (ec *executionContext) _AddCommentTimelineItem(ctx context.Context, sel ast.SelectionSet, obj *bug.AddCommentTimelineItem) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, addCommentTimelineItemImplementors)
+
out := graphql.NewFieldSet(fields)
- var invalids uint32
+ deferred := make(map[string]*graphql.FieldSet)
for i, field := range fields {
switch field.Name {
case "__typename":
@@ -2022,7 +2023,7 @@ func (ec *executionContext) _AddCommentTimelineItem(ctx context.Context, sel ast
case "id":
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))
@@ -2030,19 +2031,35 @@ func (ec *executionContext) _AddCommentTimelineItem(ctx context.Context, sel ast
}()
res = ec._AddCommentTimelineItem_id(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)
+ })
- })
+ // 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 "author":
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))
@@ -2050,40 +2067,50 @@ func (ec *executionContext) _AddCommentTimelineItem(ctx context.Context, sel ast
}()
res = ec._AddCommentTimelineItem_author(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 "message":
+ // 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 "message":
out.Values[i] = ec._AddCommentTimelineItem_message(ctx, field, obj)
-
if out.Values[i] == graphql.Null {
- atomic.AddUint32(&invalids, 1)
+ atomic.AddUint32(&out.Invalids, 1)
}
case "messageIsEmpty":
-
out.Values[i] = ec._AddCommentTimelineItem_messageIsEmpty(ctx, field, obj)
-
if out.Values[i] == graphql.Null {
- atomic.AddUint32(&invalids, 1)
+ atomic.AddUint32(&out.Invalids, 1)
}
case "files":
-
out.Values[i] = ec._AddCommentTimelineItem_files(ctx, field, obj)
-
if out.Values[i] == graphql.Null {
- atomic.AddUint32(&invalids, 1)
+ atomic.AddUint32(&out.Invalids, 1)
}
case "createdAt":
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))
@@ -2091,19 +2118,35 @@ func (ec *executionContext) _AddCommentTimelineItem(ctx context.Context, sel ast
}()
res = ec._AddCommentTimelineItem_createdAt(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)
+ })
- })
+ // 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 "lastEdit":
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))
@@ -2111,37 +2154,61 @@ func (ec *executionContext) _AddCommentTimelineItem(ctx context.Context, sel ast
}()
res = ec._AddCommentTimelineItem_lastEdit(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 "edited":
+ // 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 "edited":
out.Values[i] = ec._AddCommentTimelineItem_edited(ctx, field, obj)
-
if out.Values[i] == graphql.Null {
- atomic.AddUint32(&invalids, 1)
+ atomic.AddUint32(&out.Invalids, 1)
}
case "history":
-
out.Values[i] = ec._AddCommentTimelineItem_history(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
}
@@ -2149,23 +2216,22 @@ var commentHistoryStepImplementors = []string{"CommentHistoryStep"}
func (ec *executionContext) _CommentHistoryStep(ctx context.Context, sel ast.SelectionSet, obj *bug.CommentHistoryStep) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, commentHistoryStepImplementors)
+
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("CommentHistoryStep")
case "message":
-
out.Values[i] = ec._CommentHistoryStep_message(ctx, field, obj)
-
if out.Values[i] == graphql.Null {
- atomic.AddUint32(&invalids, 1)
+ atomic.AddUint32(&out.Invalids, 1)
}
case "date":
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))
@@ -2173,23 +2239,51 @@ func (ec *executionContext) _CommentHistoryStep(ctx context.Context, sel ast.Sel
}()
res = ec._CommentHistoryStep_date(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)
+ })
+
+ // 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) })
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
}
@@ -2197,8 +2291,9 @@ var createTimelineItemImplementors = []string{"CreateTimelineItem", "TimelineIte
func (ec *executionContext) _CreateTimelineItem(ctx context.Context, sel ast.SelectionSet, obj *bug.CreateTimelineItem) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, createTimelineItemImplementors)
+
out := graphql.NewFieldSet(fields)
- var invalids uint32
+ deferred := make(map[string]*graphql.FieldSet)
for i, field := range fields {
switch field.Name {
case "__typename":
@@ -2206,7 +2301,7 @@ func (ec *executionContext) _CreateTimelineItem(ctx context.Context, sel ast.Sel
case "id":
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))
@@ -2214,19 +2309,35 @@ func (ec *executionContext) _CreateTimelineItem(ctx context.Context, sel ast.Sel
}()
res = ec._CreateTimelineItem_id(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)
+ })
- })
+ // 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 "author":
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))
@@ -2234,40 +2345,50 @@ func (ec *executionContext) _CreateTimelineItem(ctx context.Context, sel ast.Sel
}()
res = ec._CreateTimelineItem_author(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 "message":
+ // 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 "message":
out.Values[i] = ec._CreateTimelineItem_message(ctx, field, obj)
-
if out.Values[i] == graphql.Null {
- atomic.AddUint32(&invalids, 1)
+ atomic.AddUint32(&out.Invalids, 1)
}
case "messageIsEmpty":
-
out.Values[i] = ec._CreateTimelineItem_messageIsEmpty(ctx, field, obj)
-
if out.Values[i] == graphql.Null {
- atomic.AddUint32(&invalids, 1)
+ atomic.AddUint32(&out.Invalids, 1)
}
case "files":
-
out.Values[i] = ec._CreateTimelineItem_files(ctx, field, obj)
-
if out.Values[i] == graphql.Null {
- atomic.AddUint32(&invalids, 1)
+ atomic.AddUint32(&out.Invalids, 1)
}
case "createdAt":
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))
@@ -2275,19 +2396,35 @@ func (ec *executionContext) _CreateTimelineItem(ctx context.Context, sel ast.Sel
}()
res = ec._CreateTimelineItem_createdAt(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)
+ })
+
+ // 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 "lastEdit":
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))
@@ -2295,37 +2432,61 @@ func (ec *executionContext) _CreateTimelineItem(ctx context.Context, sel ast.Sel
}()
res = ec._CreateTimelineItem_lastEdit(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 "edited":
+ // 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 "edited":
out.Values[i] = ec._CreateTimelineItem_edited(ctx, field, obj)
-
if out.Values[i] == graphql.Null {
- atomic.AddUint32(&invalids, 1)
+ atomic.AddUint32(&out.Invalids, 1)
}
case "history":
-
out.Values[i] = ec._CreateTimelineItem_history(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
}
@@ -2333,8 +2494,9 @@ var labelChangeTimelineItemImplementors = []string{"LabelChangeTimelineItem", "T
func (ec *executionContext) _LabelChangeTimelineItem(ctx context.Context, sel ast.SelectionSet, obj *bug.LabelChangeTimelineItem) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, labelChangeTimelineItemImplementors)
+
out := graphql.NewFieldSet(fields)
- var invalids uint32
+ deferred := make(map[string]*graphql.FieldSet)
for i, field := range fields {
switch field.Name {
case "__typename":
@@ -2342,7 +2504,7 @@ func (ec *executionContext) _LabelChangeTimelineItem(ctx context.Context, sel as
case "id":
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))
@@ -2350,19 +2512,35 @@ func (ec *executionContext) _LabelChangeTimelineItem(ctx context.Context, sel as
}()
res = ec._LabelChangeTimelineItem_id(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)
+ })
+
+ // 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 "author":
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))
@@ -2370,19 +2548,35 @@ func (ec *executionContext) _LabelChangeTimelineItem(ctx context.Context, sel as
}()
res = ec._LabelChangeTimelineItem_author(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)
+ })
+
+ // 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 "date":
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))
@@ -2390,37 +2584,61 @@ func (ec *executionContext) _LabelChangeTimelineItem(ctx context.Context, sel as
}()
res = ec._LabelChangeTimelineItem_date(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 "added":
+ // 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 "added":
out.Values[i] = ec._LabelChangeTimelineItem_added(ctx, field, obj)
-
if out.Values[i] == graphql.Null {
- atomic.AddUint32(&invalids, 1)
+ atomic.AddUint32(&out.Invalids, 1)
}
case "removed":
-
out.Values[i] = ec._LabelChangeTimelineItem_removed(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
}
@@ -2428,8 +2646,9 @@ var setStatusTimelineItemImplementors = []string{"SetStatusTimelineItem", "Timel
func (ec *executionContext) _SetStatusTimelineItem(ctx context.Context, sel ast.SelectionSet, obj *bug.SetStatusTimelineItem) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, setStatusTimelineItemImplementors)
+
out := graphql.NewFieldSet(fields)
- var invalids uint32
+ deferred := make(map[string]*graphql.FieldSet)
for i, field := range fields {
switch field.Name {
case "__typename":
@@ -2437,7 +2656,7 @@ func (ec *executionContext) _SetStatusTimelineItem(ctx context.Context, sel ast.
case "id":
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))
@@ -2445,19 +2664,35 @@ func (ec *executionContext) _SetStatusTimelineItem(ctx context.Context, sel ast.
}()
res = ec._SetStatusTimelineItem_id(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)
+ })
+
+ // 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 "author":
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))
@@ -2465,19 +2700,35 @@ func (ec *executionContext) _SetStatusTimelineItem(ctx context.Context, sel ast.
}()
res = ec._SetStatusTimelineItem_author(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)
+ })
- })
+ // 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 "date":
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))
@@ -2485,30 +2736,56 @@ func (ec *executionContext) _SetStatusTimelineItem(ctx context.Context, sel ast.
}()
res = ec._SetStatusTimelineItem_date(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 "status":
+ // 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 "status":
out.Values[i] = ec._SetStatusTimelineItem_status(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
}
@@ -2516,8 +2793,9 @@ var setTitleTimelineItemImplementors = []string{"SetTitleTimelineItem", "Timelin
func (ec *executionContext) _SetTitleTimelineItem(ctx context.Context, sel ast.SelectionSet, obj *bug.SetTitleTimelineItem) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, setTitleTimelineItemImplementors)
+
out := graphql.NewFieldSet(fields)
- var invalids uint32
+ deferred := make(map[string]*graphql.FieldSet)
for i, field := range fields {
switch field.Name {
case "__typename":
@@ -2525,7 +2803,7 @@ func (ec *executionContext) _SetTitleTimelineItem(ctx context.Context, sel ast.S
case "id":
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))
@@ -2533,19 +2811,35 @@ func (ec *executionContext) _SetTitleTimelineItem(ctx context.Context, sel ast.S
}()
res = ec._SetTitleTimelineItem_id(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)
+ })
+
+ // 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 "author":
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))
@@ -2553,19 +2847,35 @@ func (ec *executionContext) _SetTitleTimelineItem(ctx context.Context, sel ast.S
}()
res = ec._SetTitleTimelineItem_author(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)
+ })
- })
+ // 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 "date":
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))
@@ -2573,37 +2883,61 @@ func (ec *executionContext) _SetTitleTimelineItem(ctx context.Context, sel ast.S
}()
res = ec._SetTitleTimelineItem_date(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 "title":
+ // 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 "title":
out.Values[i] = ec._SetTitleTimelineItem_title(ctx, field, obj)
-
if out.Values[i] == graphql.Null {
- atomic.AddUint32(&invalids, 1)
+ atomic.AddUint32(&out.Invalids, 1)
}
case "was":
-
out.Values[i] = ec._SetTitleTimelineItem_was(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
}
@@ -2611,48 +2945,53 @@ var timelineItemConnectionImplementors = []string{"TimelineItemConnection"}
func (ec *executionContext) _TimelineItemConnection(ctx context.Context, sel ast.SelectionSet, obj *models.TimelineItemConnection) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, timelineItemConnectionImplementors)
+
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("TimelineItemConnection")
case "edges":
-
out.Values[i] = ec._TimelineItemConnection_edges(ctx, field, obj)
-
if out.Values[i] == graphql.Null {
- invalids++
+ out.Invalids++
}
case "nodes":
-
out.Values[i] = ec._TimelineItemConnection_nodes(ctx, field, obj)
-
if out.Values[i] == graphql.Null {
- invalids++
+ out.Invalids++
}
case "pageInfo":
-
out.Values[i] = ec._TimelineItemConnection_pageInfo(ctx, field, obj)
-
if out.Values[i] == graphql.Null {
- invalids++
+ out.Invalids++
}
case "totalCount":
-
out.Values[i] = ec._TimelineItemConnection_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
}
@@ -2660,34 +2999,43 @@ var timelineItemEdgeImplementors = []string{"TimelineItemEdge"}
func (ec *executionContext) _TimelineItemEdge(ctx context.Context, sel ast.SelectionSet, obj *models.TimelineItemEdge) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, timelineItemEdgeImplementors)
+
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("TimelineItemEdge")
case "cursor":
-
out.Values[i] = ec._TimelineItemEdge_cursor(ctx, field, obj)
-
if out.Values[i] == graphql.Null {
- invalids++
+ out.Invalids++
}
case "node":
-
out.Values[i] = ec._TimelineItemEdge_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
}