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
So far I have been avoiding creating a gatsby-node file for my site, having been able to accomplish everything via the file system API as mentioned in this documentation:
The File System Route API should be enough to get you through most use cases but if you need extra control, e.g. for passing data via pageContext or modifying the path, you can use Gatsby Node APIs, including the createPages function, inside your gatsby-node.js file.
Pagination seems like it should be a simple and common use case. Doesn't every single blog require a paginated list of posts at some point? However, when I read the documentation on pagination it says:
The information needed to query for those specific items (i.e. values for limit and skip) will come from the context that is added when creating pages in gatsby-node.
Is there truly no way to do pagination without using the gatsby-node file?
I feel pretty deceived at this point by the documentation. Up until now it was claiming you could do everything without gatsby-node, and I jumped through a bunch of hoops to learn how to make my site work using the file system API.
Now I feel I need to throw all that work away and start over with a gatsby-node file just so I can add pagination to my list of blog posts!
Is there truly no way to accomplish pagination with the file system API?
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
-
So far I have been avoiding creating a
gatsby-node
file for my site, having been able to accomplish everything via the file system API as mentioned in this documentation:Pagination seems like it should be a simple and common use case. Doesn't every single blog require a paginated list of posts at some point? However, when I read the documentation on pagination it says:
Is there truly no way to do pagination without using the gatsby-node file?
I feel pretty deceived at this point by the documentation. Up until now it was claiming you could do everything without gatsby-node, and I jumped through a bunch of hoops to learn how to make my site work using the file system API.
Now I feel I need to throw all that work away and start over with a gatsby-node file just so I can add pagination to my list of blog posts!
Is there truly no way to accomplish pagination with the file system API?
Beta Was this translation helpful? Give feedback.
All reactions