feat(SW-334): Added affix to metadata tag and added revalidate tag

This commit is contained in:
Pontus Dreij
2024-09-09 09:28:04 +02:00
parent 72c8246384
commit edbd044a79
2 changed files with 8 additions and 1 deletions

View File

@@ -11,11 +11,13 @@ export type Variables = {
uid: string
}
export const affix = "metadata"
export async function getResponse<T>(query: string, variables: Variables) {
const response = await request<T>(query, variables, {
cache: "force-cache",
next: {
tags: [generateTag(variables.locale, variables.uid)],
tags: [generateTag(variables.locale, variables.uid, affix)],
},
})
if (!response.data) {