Skip to content

Commit

Permalink
Merge pull request #206 from vektah/validation-locations
Browse files Browse the repository at this point in the history
Update gqlparser for validation locations
  • Loading branch information
vektah authored Jul 19, 2018
2 parents c2f1570 + f4d31aa commit 5234374
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 5234374

Please sign in to comment.