I noticed a change in behaviour with the built-in GraphQL DataFetcher component in plasmic studio. In version @plasmicapp/loader-nextjs": "^1.0.253 data is fetched at build time only (i.e. not client-side).
Where as in the current latest versions the requests are made dynamically on the client: @plasmicapp/host": "^1.0.145 @plasmicapp/loader-nextjs": "^1.0.283
Is this the intended behaviour? If so, is it possible to configure the Graphql DataFetcher component to prefetch the data at build time, and cache the response indefinitely so it is never fetched again on the client? (I’m going for the Static Site Generation approach here as the content doesn’t change often).
I followed @chungwu’s advice about logging the output of extractPlasmicQueryData(), which helped.
I found a few errors on my end that was happening within a custom code component that I fixed. This was causing pre-rendering to throw. However there is still one last error left, that I’m having difficulty debugging: PLASMIC: Encountered error when pre-rendering K: Error: Forbidden
Looks like a network request error. Not sure what component K refers to, though. Strange enough, it’s only happening in a production environment when I deploy to netlify. Also I don’t see any HTTP errors being logged on my CMS backend.
So the issue, most likely, isn’t what I thought it was initially, but still not sure where to look. Any help would be much appreciated