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

Combine @fold and @recurse on the same edge #342

Open
obi1kenobi opened this issue Jul 6, 2023 · 0 comments
Open

Combine @fold and @recurse on the same edge #342

obi1kenobi opened this issue Jul 6, 2023 · 0 comments
Labels
A-ir Area: compiler intermediate representation A-syntax Area: query or schema syntax C-feature-request Category: request for new future functionality E-medium Call for participation: experience needed to fix: medium / intermediate

Comments

@obi1kenobi
Copy link
Owner

For example, on the "numbers" schema:

query {
    Four {
        predecessor @fold @recurse(depth: 5) {
            value @output
        }
    }
}

This should return:

{
    "value": [4, 3, 2, 1, 0]
}

Recall that @recurse always starts with "depth 0" i.e. the current vertex before the edge is traversed. This is why 4 is in the output list.

@obi1kenobi obi1kenobi added A-syntax Area: query or schema syntax A-ir Area: compiler intermediate representation C-feature-request Category: request for new future functionality E-medium Call for participation: experience needed to fix: medium / intermediate labels Jul 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ir Area: compiler intermediate representation A-syntax Area: query or schema syntax C-feature-request Category: request for new future functionality E-medium Call for participation: experience needed to fix: medium / intermediate
Projects
None yet
Development

No branches or pull requests

1 participant