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

Nested cursor-based pagination doesn't work as intended #768

Closed
dpetrick opened this issue May 29, 2020 · 0 comments · Fixed by #807
Closed

Nested cursor-based pagination doesn't work as intended #768

dpetrick opened this issue May 29, 2020 · 0 comments · Fixed by #807
Assignees
Labels
tech/engines/query engine Issue in the Query Engine
Milestone

Comments

@dpetrick
Copy link
Contributor

dpetrick commented May 29, 2020

Nested pagination fails to return the correct data for all parents when using a cursor. Assume the following record layout:

P1

  • C1
  • C2
  • C3

P2

  • C4
  • C5
  • C6

P3

  • C7
  • C8
  • C9

Setting a cursor on C5 with a query like:

findManyP(...) { C(cursor: { id: "C5" }) ... })

The expected data (because the cursor only applies to P2) of the query above would be:

P1 { <no Cs> }
P2 { C5, C6 }
P3 { <no Cs> }

However, due to the way we currently resolve nested records together with nested pagination, we return:

P1 { <no Cs> }
P2 { C5, C6 }
P3 { C7, C8, C9 }
@dpetrick dpetrick self-assigned this May 29, 2020
@dpetrick dpetrick added the tech/engines/query engine Issue in the Query Engine label May 29, 2020
@dpetrick dpetrick added this to the Beta 7 milestone May 29, 2020
@janpio janpio modified the milestones: Beta 7, Beta 8 May 29, 2020
@dpetrick dpetrick modified the milestones: Beta 10, 2.1.0 Jun 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tech/engines/query engine Issue in the Query Engine
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants