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

Function TestVariablesDefault

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

Source from the content-addressed store, hash-verified

175}
176
177func TestVariablesDefault(t *testing.T) {
178 input := `
179 query testQuery ($username: string = abc, $id: int = 5, $email: string) {
180 me(_xid_: rick) {
181 _city
182 }
183 }`
184 l := lex.Lexer{
185 Input: input,
186 }
187 l.Run(lexTopLevel)
188 it := l.NewIterator()
189 for it.Next() {
190 item := it.Item()
191 require.NotEqual(t, item.Typ, lex.ItemError)
192 t.Log(item.String())
193 }
194}
195
196func TestIRIRefInIdentifyMutationOrQuery(t *testing.T) {
197 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