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'm trying to create a clone of the GitHub issue timeline using urql and the GitHub GraphQL API.
I'm having trouble implementing inwards pagination using relayPagination since the IssueTimelineItemsConnection doesn't support both after and before.
Instead I've made two aliased subfields, forward and backward, one for each direction. But pagination stops working with more than one selection on the connection.
Is this use-case supported by relayPagination? If not, is it possible to allow the cache resolver to distinguish between the aliased fields so I can implement the remaining logic manually?
I've extracted an example from my codebase, see below.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello,
I'm trying to create a clone of the GitHub issue timeline using
urql
and the GitHub GraphQL API.I'm having trouble implementing inwards pagination using
relayPagination
since theIssueTimelineItemsConnection
doesn't support bothafter
andbefore
.Instead I've made two aliased subfields,
forward
andbackward
, one for each direction. But pagination stops working with more than one selection on the connection.Is this use-case supported by
relayPagination
? If not, is it possible to allow the cache resolver to distinguish between the aliased fields so I can implement the remaining logic manually?I've extracted an example from my codebase, see below.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions