You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a list of items that is paginated with pages. Using t.connection with edgeNullable: false (which I want because the edges can't be nullable and it simplifies the client code) requires me to return cursor on every edge—which doesn't make a lot of sense for page-based pagination.
While t.list doesn't require me to return a cursor and is the better fit for this use case, with t.list I can't add the same PageInfo type that t.connection uses to return pagination information ( especially hasNextPage and hasPreviousPage)
Proposed Solution
t.list({pageInfo: true,// → Adds the PageInfo type to the schema if no `t.connection` has already added it// → Requires returning `pageInfo` from `resolve`})
The text was updated successfully, but these errors were encountered:
Summary
I have a list of items that is paginated with pages. Using
t.connection
withedgeNullable: false
(which I want because the edges can't be nullable and it simplifies the client code) requires me to returncursor
on every edge—which doesn't make a lot of sense for page-based pagination.While
t.list
doesn't require me to return a cursor and is the better fit for this use case, witht.list
I can't add the samePageInfo
type thatt.connection
uses to return pagination information ( especiallyhasNextPage
andhasPreviousPage
)Proposed Solution
The text was updated successfully, but these errors were encountered: