feat: graphql cache keyPrefix from package.json version
This commit is contained in:
@@ -1,3 +1,5 @@
|
|||||||
|
import { version } from "./package.json";
|
||||||
|
|
||||||
const siteUrl = process.env.NUXT_SITE_URL;
|
const siteUrl = process.env.NUXT_SITE_URL;
|
||||||
if (!siteUrl) {
|
if (!siteUrl) {
|
||||||
throw new Error(`NUXT_SITE_URL is not defined. Make sure to set it in your build environment variables.`);
|
throw new Error(`NUXT_SITE_URL is not defined. Make sure to set it in your build environment variables.`);
|
||||||
@@ -76,6 +78,11 @@ export default defineNuxtConfig({
|
|||||||
},
|
},
|
||||||
|
|
||||||
graphql: {
|
graphql: {
|
||||||
|
client: {
|
||||||
|
cache: {
|
||||||
|
keyVersion: version,
|
||||||
|
},
|
||||||
|
},
|
||||||
server: {
|
server: {
|
||||||
context: ["server/graphql/context"],
|
context: ["server/graphql/context"],
|
||||||
schema: {
|
schema: {
|
||||||
|
|||||||
Reference in New Issue
Block a user