feat: graphql cache keyPrefix from package.json version

This commit is contained in:
2026-01-28 21:11:48 -05:00
parent 54fea5f64a
commit b1b1aa47c9

View File

@@ -1,3 +1,5 @@
import { version } from "./package.json";
const siteUrl = process.env.NUXT_SITE_URL;
if (!siteUrl) {
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: {
client: {
cache: {
keyVersion: version,
},
},
server: {
context: ["server/graphql/context"],
schema: {