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
#784 introduced revalidate options for the fetch methods used by the Next Drupal client, including tags. To simplify the process of invalidating these tags, we should update the revalidation API route (api/revalidate/route.ts) in our starters to also allow tags to be invalidated, rather than only paths.
Describe the solution you'd like
api/revalidate/route.ts will also accept a tags parameter which would be a comma separated list of cache tag values.
With this change:
If a path is provided, it will be invalidated using revalidatePath.
If tags are provided, they will be invalidated using revalidateTag
I don't think this is essential, but it seems like this route should also be able to handle cases where both a path and tags are provided. In that situation they would both be invalidated.
The API route should continue to allow both GET and POST methods.
This change should also be made to the related API route in the GraphQL starter.
Describe alternatives you've considered
This can be handled with a custom API route today, but having this available in the starters out of the box would be ideal.
Additional context
A related issue will update the Next Drupal module to call this API endpoint when tags are invalidated.
The text was updated successfully, but these errors were encountered:
Package
basic-starter
Describe the feature request
#784 introduced revalidate options for the fetch methods used by the Next Drupal client, including tags. To simplify the process of invalidating these tags, we should update the revalidation API route (api/revalidate/route.ts) in our starters to also allow tags to be invalidated, rather than only paths.
Describe the solution you'd like
api/revalidate/route.ts will also accept a
tags
parameter which would be a comma separated list of cache tag values.With this change:
The API route should continue to allow both GET and POST methods.
This change should also be made to the related API route in the GraphQL starter.
Describe alternatives you've considered
This can be handled with a custom API route today, but having this available in the starters out of the box would be ideal.
Additional context
A related issue will update the Next Drupal module to call this API endpoint when tags are invalidated.
The text was updated successfully, but these errors were encountered: