
Sorting Hashnode Series Posts: How to Display the Latest Post First
When you publish a series of articles on your Hashnode blog and consume it via their GraphQL API for a custom portfolio or website, you quickly run into a common roadblock: Hashnode’s API natively returns series posts in chronological order (oldest first) . While this makes sense for consecutive tutorials ("Part 1", "Part 2"), it’s significantly less ideal for ongoing series—like my "Learning how to code with AI" series—where readers typically want to see your newest breakthroughs or the latest problem you solved directly at the top of the feed. Unfortunately, looking at the Hashnode GraphQL Schema ( Series.posts ), there isn't an out-of-the-box sort: RECENT parameter available. Instead, it demands that you sequentially traverse the cursor paginations starting from the oldest post you've written in that series. Here's how I solved this issue on my React/Vite portfolio to seamlessly deliver a newest-first reading experience to my users. The Problem: Oldest First Pagination By default, t
Continue reading on Dev.to
Opens in a new tab




