Skip to content

[F] Add preview route + submit links#19

Open
1aurend wants to merge 9 commits into
mainfrom
previews
Open

[F] Add preview route + submit links#19
1aurend wants to merge 9 commits into
mainfrom
previews

Conversation

@1aurend
Copy link
Copy Markdown
Contributor

@1aurend 1aurend commented Apr 8, 2026

Utilizes draft mode to skip cached entity data and avoid caching admin-only data without duplicating the page tree under a /preview route segment. This PR also updates how auth state is tracked to ensure that both client and server relay environments are in sync and aren't reliant on render-based checks via hooks.

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 8, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
meru-client Ready Ready Preview, Comment Jun 2, 2026 12:46am

Request Review

@1aurend
Copy link
Copy Markdown
Contributor Author

1aurend commented Apr 8, 2026

@dananjohnson I know you're not super familiar with this project, but would you mind 👀 this to see if anything I'm doing here jumps out at you as a problem? I couldn't use the standard next-auth hooks to sync session across client and server for a couple of reasons:

  1. The two relay environments— waiting a render for the useSession hook to find the token and supply it to the client relay env for client-side refetches was causing relay to error with null fragments.
  2. Because we're caching, but also allowing to users to effectively "view drafts" at the same URL and not in a container like an iframe in the CMS, we needed a way to ensure that both viewer data and entity data that requires auth is never cached.

@1aurend 1aurend changed the title [F] Add preview route [F] Add preview route + submit links May 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant