You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm building a store using Sanity + Swell. I am currently looking at the revalidate implementation in the Verswell template. I'm familiar with Sanity and revalidating tags when content changes using the Sanity webhooks, but isn't the Verswell template missing the tags when fetching data?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi all,
I'm building a store using Sanity + Swell. I am currently looking at the revalidate implementation in the Verswell template. I'm familiar with Sanity and revalidating tags when content changes using the Sanity webhooks, but isn't the Verswell template missing the tags when fetching data?
Looking at the Next.js commerce Shopify template, they are actually using the tags when fetching the data.
Reference: https://github.com/vercel/commerce/blob/main/lib/shopify/index.ts#L296C5-L296C45
But I see no usage of the TAGS constant when data is fetched in the project. (TAGS.products, TAGS.collection).
References:
https://github.com/swellstores/verswell-commerce/blob/main/app/search/%5Bcollection%5D/page.tsx#L46C4-L46C4
https://github.com/swellstores/verswell-commerce/blob/main/lib/swell/index.ts#L118
https://github.com/swellstores/verswell-commerce/blob/main/lib/swell/index.ts#L118
Am I missing something here?
EDIT:
Deployed a test store, updated a product and nothing happens like expected using Verswell. Any ideas?
EDIT 2:
Ending up building my own fetch client with the backend api
Beta Was this translation helpful? Give feedback.
All reactions