Just looking for some guidance for setting up prismic previews on a staging environment while using the gatsby-source-prismic-graphql plugin. Between the plugin's options for path and the path for 'pages' in gatsby config and the domain/link resolver in the previews section of the prismic dashboard, I'm not sure what the correct values should be. Currently the 'previews' will only work for posts that are published/already live on our staging website, unpublished drafts will give a 404. Can provide more info in a DM, and would appreciate any help!
Hey Zach, I don't know if you knew but we're no longer maintaining the plugin that you're using, and issues related to previews are a common issue. We talk about this a lot in this post.. We're currently working on setting up a better preview implementation using Gatsby cloud and the prismic-gatsby-source plugin, for now this needs to be a manual configuration.
What you can try and do in your project is to add a check for previews for the 404 page. This could work if your project is small, but might be much more difficult to pull off on a bigger, more complicated project. One of out team members did something like this in a project, you can take a look at how he implemented it here:
closed , flag & select 'Something Else' to reopen.