How do I point my graphQL query to a particular release

I am wanting to point my graphQL queries to a particular release. With the REST api I normally do something like

const prismicRes = await api.query(
     [`my.${docName}.uid`, uid)],
       fetchLinks: docFetchTypes,
       ref: process.env.PRISMIC_RELEASE_REF

Is there a way to point graphQL to a release ref?

1 Like


Can you tell us which Framework and development kit you are trying to do this with? It varies from kit to kit.


Sure, I am using the apollo-link-prismic and apollo-client package in a node environment.

OK, I talked with my and to use another ref other than the master ref you will need to pass it like so:

  query: blogPostQuery,
  context: {
    headers: {
      'Prismic-ref': releaseRef,

This article in our documentation will help you find your release ref using the REST api browser:

You can visit your browser by going to

Once you have it you can pass it like above.

1 Like

Perfect, thank you!!

1 Like