-
Notifications
You must be signed in to change notification settings - Fork 139
Support for pagination when using relay pattern #357
Copy link
Copy link
Open
Labels
enhancementNew feature or requestNew feature or requesthelp wantedIssues that anyone could pick up and implement if useful to themIssues that anyone could pick up and implement if useful to themneeds designIssues where we don't know exactly what we need yet; discuss on the issue before implementingIssues where we don't know exactly what we need yet; discuss on the issue before implementing
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requesthelp wantedIssues that anyone could pick up and implement if useful to themIssues that anyone could pick up and implement if useful to themneeds designIssues where we don't know exactly what we need yet; discuss on the issue before implementingIssues where we don't know exactly what we need yet; discuss on the issue before implementing
Describe the solution you'd like
i would like the generated file to expose a function such as:
The issue I have is that this needs to be generated as the "X" is the query endpoint so it's not fixed.
One possibility is to add a generic method to the root query that returns the node inside "data",
Then we can write a generic pager with interfaces and generics.
Describe alternatives you've considered
Writing a pager function for every query, but that sort of defeats the purpose of the generator.
Additional context
The relay connection paging pattern is described here: https://relay.dev/graphql/connections.htm and here: https://graphql.org/learn/pagination/.