diff --git a/graphql/handler/debug/tracer.go b/graphql/handler/debug/tracer.go index 830faa7d4cc..1fc574e39b6 100644 --- a/graphql/handler/debug/tracer.go +++ b/graphql/handler/debug/tracer.go @@ -61,9 +61,12 @@ func (a Tracer) InterceptResponse(ctx context.Context, next graphql.ResponseHand resp := next(ctx) _, _ = fmt.Fprintln(a.out, " resp:", aurora.Green(stringify(resp))) - for _, err := range resp.Errors { - _, _ = fmt.Fprintln(a.out, " error:", aurora.Bold(err.Path.String()+":"), aurora.Red(err.Message)) + if resp != nil { + for _, err := range resp.Errors { + _, _ = fmt.Fprintln(a.out, " error:", aurora.Bold(err.Path.String()+":"), aurora.Red(err.Message)) + } } + _, _ = fmt.Fprintln(a.out, "}") _, _ = fmt.Fprintln(a.out) return resp