Veo
Veo2y ago

add image in every posts using paginate queries

Just asking how to implement this code in the image, I am using Pagination in query. Thanks
No description
2 Replies
ian
ian2y ago
That commented-out code looks good, but you'd want to return the pagination object along with the new results, e.g.
return {
...posts,
page: posts.page.map(...)
}
return {
...posts,
page: posts.page.map(...)
}
The posts object, in addition to the page, also has info like the continueCursor which tells the client where this DB fetch ended, so the next page request can pick up at the same spot. make sense?
Veo
VeoOP2y ago
thanks @ian

Did you find this page helpful?