MCPcopy Create free account
hub / github.com/dgraph-io/dgraph / TestGraphQLId

Function TestGraphQLId

query/query1_test.go:489–503  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

487}
488
489func TestGraphQLId(t *testing.T) {
490
491 q := `query test ($a: string = 1) {
492 me(func: uid($a)) {
493 name
494 gender
495 friend(first: 1) {
496 name
497 }
498 }
499 }`
500 js, err := processQueryWithVars(t, q, map[string]string{"$a": "[1, 31]"})
501 require.NoError(t, err)
502 require.JSONEq(t, `{"data": {"me":[{"friend":[{"name":"Rick Grimes"}],"gender":"female","name":"Michonne"},{"friend":[{"name":"Glenn Rhee"}],"name":"Andrea"}]}}`, js)
503}
504
505func TestDebugUid(t *testing.T) {
506

Callers

nothing calls this directly

Calls 1

processQueryWithVarsFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…