Skip to content

Commit

Permalink
Update gqlparser for validation locations
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam Scarr committed Jul 19, 2018
1 parent c2f1570 commit f4d31aa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion handler/graphql_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func TestHandlerPOST(t *testing.T) {
t.Run("validation failure", func(t *testing.T) {
resp := doRequest(h, "POST", "/graphql", `{"query": "{ me { title }}"}`)
assert.Equal(t, http.StatusUnprocessableEntity, resp.Code)
assert.Equal(t, `{"data":null,"errors":[{"message":"Cannot query field \"title\" on type \"User\"."}]}`, resp.Body.String())
assert.Equal(t, `{"data":null,"errors":[{"message":"Cannot query field \"title\" on type \"User\".","locations":[{"line":1,"column":8}]}]}`, resp.Body.String())
})

t.Run("execution failure", func(t *testing.T) {
Expand Down

0 comments on commit f4d31aa

Please sign in to comment.