Really great article! Not so much information about Relay and this is quite a welcome addition.
I was wondering, I am starting a new project in Relay so I am quite new, but in your example you use a connection which is a field of a type (friends of User) to demonstrate the use of usePaginationFragment hook. Is there a way to use that same mecanic outside a type's field? I am basically looking at using an independant query for pagination: the same kind of query you defined in the previous article:
Hi! Sorry, completely missed this question 🙈 if I understand you correctly you're after whether it's possible to paginate on the top level? If so then yes, totally possible! The top level Query type is just another type, so you can make a fragment on Query, just like you would on User.
Really great article! Not so much information about Relay and this is quite a welcome addition.
I was wondering, I am starting a new project in Relay so I am quite new, but in your example you use a connection which is a field of a type (
friends
ofUser
) to demonstrate the use ofusePaginationFragment
hook. Is there a way to use that same mecanic outside a type's field? I am basically looking at using an independant query for pagination: the same kind of query you defined in the previous article:Does Relay offer anything to directly deal with these?
Thanks again! :)
Hi! Sorry, completely missed this question 🙈 if I understand you correctly you're after whether it's possible to paginate on the top level? If so then yes, totally possible! The top level Query type is just another type, so you can make a fragment on Query, just like you would on User.
Thanks! Really appreciated!!!