MCPcopy Index your code
hub / github.com/dgraph-io/dgraph / TestParseCountValError

Function TestParseCountValError

dql/parser_test.go:59–73  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

57}
58
59func TestParseCountValError(t *testing.T) {
60 query := `
61{
62 me(func: uid(1)) {
63 Upvote {
64 u as Author
65 }
66 count(val(u))
67 }
68}
69 `
70 _, err := Parse(Request{Str: query})
71 require.Error(t, err)
72 require.Contains(t, err.Error(), "Count of a variable is not allowed")
73}
74
75func TestParseQueryNamedQuery(t *testing.T) {
76 query := `

Callers

nothing calls this directly

Calls 2

ParseFunction · 0.70
ErrorMethod · 0.45

Tested by

no test coverage detected