fix: bug with parsing variables in roles_query
This commit is contained in:
@ -2,8 +2,9 @@ package qcode
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"github.com/chirino/graphql/schema"
|
||||
"testing"
|
||||
|
||||
"github.com/chirino/graphql/schema"
|
||||
)
|
||||
|
||||
func TestCompile1(t *testing.T) {
|
||||
@ -130,6 +131,22 @@ updateThread {
|
||||
|
||||
}
|
||||
|
||||
func TestFragmentsCompile(t *testing.T) {
|
||||
gql := `
|
||||
fragment userFields on user {
|
||||
name
|
||||
email
|
||||
}
|
||||
|
||||
query { users { ...userFields } }`
|
||||
qcompile, _ := NewCompiler(Config{})
|
||||
_, err := qcompile.Compile([]byte(gql), "anon")
|
||||
|
||||
if err == nil {
|
||||
t.Fatal(errors.New("expecting an error"))
|
||||
}
|
||||
}
|
||||
|
||||
var gql = []byte(`
|
||||
{products(
|
||||
# returns only 30 items
|
||||
|
Reference in New Issue
Block a user