From 778d08a2380e16ce70b8713e74fc2a33f3c44c6c Mon Sep 17 00:00:00 2001 From: Jake Bromberg Date: Wed, 11 Mar 2026 18:24:37 -0700 Subject: [PATCH] Remove hardcoded TinaCMS pagination cursors that excluded recent content All TinaCMS GraphQL queries across the site included a hardcoded Relay `before` cursor pointing to a July 2022 timestamp. This caused queries to silently exclude any content published after that date, resulting in 404s for newer archive and blog pages (e.g. /archive/karen-dalton-07-20-2025). Replaced the raw GraphQL in archive getStaticPaths with the typed client query pattern already used by the blog, and removed the stale cursor from all remaining queries. --- pages/archive/[slug].js | 22 ++++------------------ pages/archive/events.js | 2 +- pages/archive/index.js | 2 +- pages/archive/specialty-shows/[slug].js | 2 +- pages/archive/specialty-shows/index.js | 2 +- pages/blog/category/[slug].js | 2 +- pages/blog/index.js | 2 +- pages/index.js | 4 ++-- 8 files changed, 12 insertions(+), 26 deletions(-) diff --git a/pages/archive/[slug].js b/pages/archive/[slug].js index dfcef1c38..a7bab1241 100644 --- a/pages/archive/[slug].js +++ b/pages/archive/[slug].js @@ -85,25 +85,11 @@ const EventPage = (props) => { export default EventPage export const getStaticPaths = async () => { - const countResult = await client.request({ - query: `{ archiveConnection { totalCount } }`, - }) - const totalCount = countResult.data.archiveConnection.totalCount + const length = await client.queries.archiveConnection() + const postCount = length.data.archiveConnection.totalCount - const {data} = await client.request({ - query: ` - query getPaths($count: Float) { - archiveConnection(last: $count, before: "cG9zdCNkYXRlIzE2NTc4Njg0MDAwMDAjY29udGVudC9wb3N0cy9hbm90aGVyUG9zdC5qc29u") { - edges { - node { - _sys { - filename - } - } - } - } - }`, - variables: {count: totalCount}, + const {data} = await client.queries.archiveConnection({ + last: postCount, }) const paths = data.archiveConnection.edges.map((x) => { diff --git a/pages/archive/events.js b/pages/archive/events.js index d5e962060..75791ab33 100644 --- a/pages/archive/events.js +++ b/pages/archive/events.js @@ -89,7 +89,7 @@ export const getStaticProps = async () => { const {data} = await client.request({ query: ` { - archiveConnection(filter: {categories: {category: {category: {title: {eq: "Event"}}}}}, sort: "published", last:30, before: "cG9zdCNkYXRlIzE2NTc4Njg0MDAwMDAjY29udGVudC9wb3N0cy9hbm90aGVyUG9zdC5qc29u") { + archiveConnection(filter: {categories: {category: {category: {title: {eq: "Event"}}}}}, sort: "published", last:30) { edges { node { id diff --git a/pages/archive/index.js b/pages/archive/index.js index 8a2310750..158bc7fbc 100644 --- a/pages/archive/index.js +++ b/pages/archive/index.js @@ -129,7 +129,7 @@ export const getStaticProps = async () => { query: ` query getContent($eventCount: Float, $endOfWeek: String) { - archiveConnection(filter: {published: {before: $endOfWeek}}, sort: "published", last: $eventCount, before: "cG9zdCNkYXRlIzE2NTc4Njg0MDAwMDAjY29udGVudC9wb3N0cy9hbm90aGVyUG9zdC5qc29u"){ + archiveConnection(filter: {published: {before: $endOfWeek}}, sort: "published", last: $eventCount){ edges { node { id diff --git a/pages/archive/specialty-shows/[slug].js b/pages/archive/specialty-shows/[slug].js index cdf685d8c..49f8d419b 100644 --- a/pages/archive/specialty-shows/[slug].js +++ b/pages/archive/specialty-shows/[slug].js @@ -136,7 +136,7 @@ export const getStaticProps = async (ctx) => { const {data} = await client.request({ query: ` query getContent($title: String, $endOfWeek: String) { - archiveConnection(filter: {categories: {category: {category: {title: {eq: $title}}}}, published: {before: $endOfWeek}}, sort: "published", last: 30, before: "cG9zdCNkYXRlIzE2NTc4Njg0MDAwMDAjY29udGVudC9wb3N0cy9hbm90aGVyUG9zdC5qc29u") { + archiveConnection(filter: {categories: {category: {category: {title: {eq: $title}}}}, published: {before: $endOfWeek}}, sort: "published", last: 100) { edges { node { id diff --git a/pages/archive/specialty-shows/index.js b/pages/archive/specialty-shows/index.js index c2ae96850..2be7ceaba 100644 --- a/pages/archive/specialty-shows/index.js +++ b/pages/archive/specialty-shows/index.js @@ -115,7 +115,7 @@ export const getStaticProps = async () => { query: ` query getContent($endOfWeek:String, $eventCount: Float) { - archiveConnection(filter: {categories: {category: {category: {title: {eq: "Specialty Show"}}}}, published: {before: $endOfWeek}}, sort: "published", last:$eventCount, before: "cG9zdCNkYXRlIzE2NTc4Njg0MDAwMDAjY29udGVudC9wb3N0cy9hbm90aGVyUG9zdC5qc29u") { + archiveConnection(filter: {categories: {category: {category: {title: {eq: "Specialty Show"}}}}, published: {before: $endOfWeek}}, sort: "published", last:$eventCount) { edges { node { id diff --git a/pages/blog/category/[slug].js b/pages/blog/category/[slug].js index 0abdcb90e..840e82a24 100644 --- a/pages/blog/category/[slug].js +++ b/pages/blog/category/[slug].js @@ -87,7 +87,7 @@ export const getStaticProps = async (ctx) => { const {data} = await client.request({ query: ` query getContent($title: String) { - blogConnection(filter: {categories: {category: {category: {title: {eq: $title}}}}}, sort: "published", last:30, before: "cG9zdCNkYXRlIzE2NTc4Njg0MDAwMDAjY29udGVudC9wb3N0cy9hbm90aGVyUG9zdC5qc29u") { + blogConnection(filter: {categories: {category: {category: {title: {eq: $title}}}}}, sort: "published", last:30) { edges { node { id diff --git a/pages/blog/index.js b/pages/blog/index.js index 2e2ef5bd7..453766ecc 100644 --- a/pages/blog/index.js +++ b/pages/blog/index.js @@ -128,7 +128,7 @@ export const getStaticProps = async () => { query: ` query getContent($postCount: Float) { - blogConnection(sort: "published", last: $postCount, before: "cG9zdCNkYXRlIzE2NTc4Njg0MDAwMDAjY29udGVudC9wb3N0cy9hbm90aGVyUG9zdC5qc29u"){ + blogConnection(sort: "published", last: $postCount){ edges { node { id diff --git a/pages/index.js b/pages/index.js index e1d1c4c63..afee533a8 100644 --- a/pages/index.js +++ b/pages/index.js @@ -94,7 +94,7 @@ export const getStaticProps = async () => { query: ` query getContent($startOfWeek: String, $endOfWeek: String) { - blogConnection(sort: "published", last:6, before: "cG9zdCNkYXRlIzE2NTc4Njg0MDAwMDAjY29udGVudC9wb3N0cy9hbm90aGVyUG9zdC5qc29u"){ + blogConnection(sort: "published", last:6){ edges { node { id @@ -119,7 +119,7 @@ export const getStaticProps = async () => { } }, - archiveConnection(filter: {published: {after: $startOfWeek, before: $endOfWeek}}, sort: "published", last:30, before: "cG9zdCNkYXRlIzE2NTc4Njg0MDAwMDAjY29udGVudC9wb3N0cy9hbm90aGVyUG9zdC5qc29u") { + archiveConnection(filter: {published: {after: $startOfWeek, before: $endOfWeek}}, sort: "published", last:30) { edges { node { id