Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow @filter directive to be used with expand queries. #4404

Merged
merged 6 commits into from
Dec 18, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix tests.
martinmr committed Dec 13, 2019

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit ae9fdaff6e11d04373e7e7ff50460d3fa940a13a
2 changes: 1 addition & 1 deletion query/query3_test.go
Original file line number Diff line number Diff line change
@@ -2486,7 +2486,7 @@ func TestTypeFunction(t *testing.T) {
`
js := processQueryNoErr(t, query)
require.JSONEq(t,
`{"data": {"me":[{"uid":"0x2"}, {"uid":"0x3"}, {"uid":"0x4"}]}}`,
`{"data": {"me":[{"uid":"0x2"}, {"uid":"0x3"}, {"uid":"0x4"}, {"uid":"0xcb"}]}}`,
js)
}

4 changes: 2 additions & 2 deletions query/query4_test.go
Original file line number Diff line number Diff line change
@@ -447,7 +447,7 @@ func TestTypeExpandMultipleExplicitTypes(t *testing.T) {
func TestTypeFilterAtExpand(t *testing.T) {
query := `{
q(func: eq(make, "Toyota")) {
expand(_all_) @filter(Person) {
expand(_all_) @filter(type(Person)) {
owner_name
uid
}
@@ -461,7 +461,7 @@ func TestTypeFilterAtExpand(t *testing.T) {
func TestTypeFilterAtExpandEmptyResults(t *testing.T) {
query := `{
q(func: eq(make, "Toyota")) {
expand(_all_) @filter(Animal) {
expand(_all_) @filter(type(Animal)) {
owner_name
uid
}