diff --git a/internal/exec/exec.go b/internal/exec/exec.go index b0c6cac85be..f35b4a73f3c 100644 --- a/internal/exec/exec.go +++ b/internal/exec/exec.go @@ -233,8 +233,8 @@ func (r *Request) execSelectionSet(ctx context.Context, sels []selected.Selectio entryouts := make([]bytes.Buffer, l) for i := 0; i < l; i++ { go func(i int) { - defer r.handlePanic(ctx) defer wg.Done() + defer r.handlePanic(ctx) r.execSelectionSet(ctx, sels, t.OfType, resolver.Index(i), &entryouts[i]) }(i) }