Pagination in Headless WP with  WPGraphQL, Apollo and Next.js
Channel: WP Engine Builders
Date: 2023-02-09

In this tutorial, we'll look at how to use cursor-based pagination in Headless WP with WPGraphQL, Apollo Client and Next.js

Github Repo:
https://github.com/Fran-A-Dev/wpgraphql-pagination

Kellen's Repo for the PHP file needed:
https://github.com/kellenmace/pagination-station/blob/main/pagination-fields.php

Blog Post: 
https://developers.wpengine.com/blog/pagination-in-headless-wordpress-with-wpgraphql-apollo-next-js

Headless WordPress resources:
https://developers.wpengine.com

Contents:
00:00 Intro
00:28 What is Pagination? 
02:02 WPGraphQL cursor-based queries 
06:15 Load More functionality in Next.js
10:42 The Relay Spec and Apollo 
13:48 Adding Previous and Next Post extension in WPGraphQL
16:10 Previous and Next Post in Next.js with Dynamic Routes 
21:10 Outro