apiOption.ref does not seem to work in nuxt.config.js

Hello,

I've been trying to work on content that is contained in a release and wanted to find something more practical than going through the preview system because I clear my cookies regularly.

I assumed that the easiest way would be to set the ref in the apiOptions directly in my nuxt.config.js file but it doesn't seem to do the trick.

Here is what it looks like:

prismic: {
        endpoint: "https://360learning.cdn.prismic.io/api/v2",
        linkResolver: "@/plugins/link-resolver",
        htmlSerializer: "@/plugins/html-serializer",
        apiOptions: {
            ref: "XutFvRIAAL0EkMA0~XutfQhIAAPgakTPC"
        }
    }

It feels like this should work but somehow, it doesn't. Is there an extra step I'm missing?

For now, the only workaround I use is adding the ref in the options of each api call. This works but is not practical at all so I was wondering what I could do to get this to work.

Thanks for your help :slight_smile:

Edit: Re-opening this because I realised I hastily closed it thinking it was a duplicate. I’ll look in to this for you tomorrow @jeremy.benzakein

Linking to the feature request raised in the plugin:

Hi Phil,

Thanks for your answer.

I’m glad to know this might be coming in the future.

Does this mean there is no easy way to work on a specific release at the moment ? (other than specifying the ref in every call)

Yes, unfortunately that’s the only way at the minute other than previewing from the browser.

This issue has been closed due to inactivity.