MCPcopy
hub / github.com/dgraph-io/dgraph / TestVariables1

Function TestVariables1

dql/state_test.go:139–156  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

137}
138
139func TestVariables1(t *testing.T) {
140 input := `
141 query testQuery($username: String!) {
142 me(_xid_: rick) {
143 _city
144 }
145 }`
146 l := lex.Lexer{
147 Input: input,
148 }
149 l.Run(lexTopLevel)
150 it := l.NewIterator()
151 for it.Next() {
152 item := it.Item()
153 require.NotEqual(t, item.Typ, lex.ItemError)
154 t.Log(item.String(), item.Typ)
155 }
156}
157
158func TestVariables2(t *testing.T) {
159 input := `

Callers

nothing calls this directly

Calls 6

RunMethod · 0.95
NewIteratorMethod · 0.95
ItemMethod · 0.80
LogMethod · 0.80
NextMethod · 0.45
StringMethod · 0.45

Tested by

no test coverage detected