Validate against a case gqlparser doesn't catch (#197)
While writing tests at some point I came across an invalid query that gqlparser doesn't catch, and which causes a panic for us. Now we validate for it and return a nice error instead of panicing. Fixes #176. Test plan: make check
This commit is contained in:
@@ -0,0 +1 @@
|
||||
mutation M { g }
|
||||
@@ -0,0 +1 @@
|
||||
type Query { f: String }
|
||||
@@ -0,0 +1 @@
|
||||
query Q { f }
|
||||
@@ -0,0 +1 @@
|
||||
type T { f: String }
|
||||
@@ -0,0 +1 @@
|
||||
testdata/errors/NoMutationType.graphql:1: schema has no mutation type
|
||||
@@ -0,0 +1 @@
|
||||
testdata/errors/NoQueryType.graphql:1: schema has no query type
|
||||
Reference in New Issue
Block a user