Before I get too in-depth in spitting out templates, I want to make sure my build tools will be able to get hold of data in preview and build on a staging site before publishing content.
It appears that I have to have a browser client pass cookies into my build process that needs to serve my website and re-route a preview url?
What is the point of having an access token set up that should have access to previews?
Expected Behavior
It seems like I should be able to pass a request to the api to get all the refs which are various preview refs. And then I should be able to use one of the refs to query for the content of that preview.
If I were to query that "ref", I would assume that I'd get content from Master with the exception of new content from the "ref" where available.
Current Behavior
When I initiate the API, I get a list of refs that ONLY includes the master ref.
Documentation Referenced
What I've done
For the sake of exploration, I was able to set up an express server to do what the documentation seemed to be saying.... kinda.
I ended up skipping the Prismic js client, and using axios. I also wrote my own parser to get the "ref" out of the preview url passed from the prismic UI.
This seems to miss the point of a staging environment where a build can just reference the Prismic API and create a full (not just one page), website build.
Also, if I were going to create an iOS app using this, how would I test new content? I wouldn't have a browser to pass a cookie through.