Skip to content

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

@dpetrick

Description

@dpetrick

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 }

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions