diff --git a/graphql/service.go b/graphql/service.go index 4ca427658..f33e76305 100644 --- a/graphql/service.go +++ b/graphql/service.go @@ -88,7 +88,9 @@ func (h handler) ServeHTTP(w http.ResponseWriter, r *http.Request) { } response := h.Schema.Exec(ctx, params.Query, params.OperationName, params.Variables) - timer.Stop() + if timer != nil { + timer.Stop() + } responded.Do(func() { responseJSON, err := json.Marshal(response) if err != nil {