diff --git a/src/lib/gql/gql-queries.tsx b/src/lib/gql/gql-queries.tsx index dc05f24f..d88b23d7 100644 --- a/src/lib/gql/gql-queries.tsx +++ b/src/lib/gql/gql-queries.tsx @@ -35,7 +35,7 @@ export const getEntityFromPath = cache( if (path.startsWith("/node/")) return {} try { - query = await graphqlClient({next: {tags: ["all-entities", `paths:${path}`]}}, previewMode).Route({path}) + query = await graphqlClient({cache: "no-cache"}, previewMode).Route({path}) } catch (e) { console.warn(e instanceof Error ? e.message : "An error occurred") return {entity: undefined, redirect: undefined, error: e instanceof Error ? e.message : "An error occurred"} @@ -46,7 +46,7 @@ export const getEntityFromPath = cache( query.route?.__typename === "RouteInternal" && query.route.entity ? (query.route.entity as T) : undefined return {entity, redirect: undefined, error: undefined} }, - ["entities", path], + ["entities", path, previewMode ? "preview" : "anonymous"], {tags: ["all-entities", `paths:${path}`]} )