From 784dc01fdb4f0759e59e32bb48814b94760ca00b Mon Sep 17 00:00:00 2001 From: vvakame Date: Mon, 29 Oct 2018 19:17:04 +0900 Subject: [PATCH] oops... --- handler/graphql.go | 2 +- handler/websocket.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/handler/graphql.go b/handler/graphql.go index b09c344f54..1e085ecd16 100644 --- a/handler/graphql.go +++ b/handler/graphql.go @@ -315,7 +315,7 @@ func GraphQL(exec graphql.ExecutableSchema, options ...Option) http.HandlerFunc }() if reqCtx.ComplexityLimit > 0 && reqCtx.OperationComplexity > cfg.complexityLimit { - sendErrorf(w, http.StatusUnprocessableEntity, "operation has complexity %d, which exceeds the limit of %d", operationComplexity, cfg.complexityLimit) + sendErrorf(w, http.StatusUnprocessableEntity, "operation has complexity %d, which exceeds the limit of %d", reqCtx.OperationComplexity, reqCtx.ComplexityLimit) return } diff --git a/handler/websocket.go b/handler/websocket.go index af7d7a5a4e..dae262bdf3 100644 --- a/handler/websocket.go +++ b/handler/websocket.go @@ -165,7 +165,7 @@ func (c *wsConnection) subscribe(message *operationMessage) bool { c.sendError(message.ID, err) return true } - reqCtx := c.cfg.newRequestContext(doc, reqParams.Query, vars) + reqCtx := c.cfg.newRequestContext(c.exec, doc, op, reqParams.Query, vars) ctx := graphql.WithRequestContext(c.ctx, reqCtx) if c.initPayload != nil {