Skip to content

Commit

Permalink
oops...
Browse files Browse the repository at this point in the history
  • Loading branch information
vvakame committed Oct 29, 2018
1 parent a027ac2 commit 784dc01
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion handler/graphql.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
2 changes: 1 addition & 1 deletion handler/websocket.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 784dc01

Please sign in to comment.