We are upgrading to prismic V4 (for now) and we're running into some stuff. We are able to fix all of them however, it seems to be a lot of work (which is fine, IF there is no other way).
So, here's the thing. I noticed that when using the preview option from Prismic, it returns the data-object, and this does not work when your pages are using the dataRaw query. In the previous version, this did work out of the box. Did this change? (couldn't find this in the migration guide)
Additionally, a structuredText field (when using data) returns { text: "...", raw: [...], html: "..." }. When using dataRaw, you automatically get the raw. If I can't get around using data, is it possible to automagically get the raw for structuredText?
I hope I missed a configuration somewhere.
Let me know if additionally information is required.
We just published an update in both the source and preview plugins with a fix to accept the dataRaw field in preview mode. The fix is only available for the latest version of V5.
gatsby-source-prismic : v5.2.2
gatsby-plugin-prismic-previews : v5.2.1
You can update your dependencies now to see the update.
Also. We don't recommend using dataRaw. Instead, you can call each field directly in data. Then for Rich Text fields you'll have three options text, raw and richtext. You should always use richtext to facilitate the formatting options when rendering the field on the front-end.