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

Function TestQueryVarValOrderError

query/query0_test.go:1446–1463  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

1444}
1445
1446func TestQueryVarValOrderError(t *testing.T) {
1447 query := `
1448 {
1449 var(func: uid( 1)) {
1450 friend {
1451 n as name
1452 }
1453 }
1454
1455 me(func: uid(n), orderdesc: n) {
1456 name
1457 }
1458 }
1459 `
1460 _, err := processQuery(context.Background(), t, query)
1461 require.Error(t, err)
1462 require.Contains(t, err.Error(), "Cannot sort by unknown attribute n")
1463}
1464
1465func TestQueryVarEmptyRootOrderError(t *testing.T) {
1466 // This bug was fixed in commit b256f9c6e6c68ae163eee3242518f77a6ab35fa0

Callers

nothing calls this directly

Calls 2

processQueryFunction · 0.70
ErrorMethod · 0.45

Tested by

no test coverage detected