-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Description
https://discuss.dgraph.io/t/cascade-does-not-work-with-pagination/7627/2
What version of Dgraph are you using?
docker image dgraph :master v2.0.0-rc1-448-gd5892dc0c
Have you tried reproducing the issue with the latest release?
N/A as @cascade is only available for graphql in 20.07+
What is the hardware spec (RAM, OS)?
AWS ec2.large (8gb RAM, Ubuntu)
Steps to reproduce the issue (command/config used to run Dgraph).
I have a query that returns around 15K nodes and want to get the first 5 that match the @cascade directive as well. The result is 0. However if I remove the pagination limit then I get all the ones that match cascade.
I believe the problem is that pagination happens before the cascade directive on the rood of the query. Is there a way to reverse this order? I don’t see any need why someone would want to paginate and then apply a cascade directive 🤔
This will return all of the completed Tasks:
query {
queryTask @cascade {
name
completed
}
}This should return the first 5 completed Tasks, but it instead returns an empty set:
query {
queryTask(first: 5) @cascade {
name
completed
}
}Expected behaviour and actual result.
I expect pagination to work in conjunction with cascade but that does not seem to be true. I understand for performance that pagination reduces the load much faster then cascade does, but I do not believe that is the understood effect.
I did test on Dgraph in Ratel and got similar results. So this issue is not specific to the graphql endpoint.