hasura / hasura/graphql-engine

support: ability to clear/invalidate auth webhook cache via API

Open
#10,160 0 comments 0 reactions 0 assignees View on GitHub
k/enhancement
Dominant language
TypeScript
Stars
32.1k
Forks
3k
PR merge metrics
PR metrics pending

Description

### Is your proposal related to a problem?

In [auth webhook caching](https://hasura.io/docs/latest/auth/authentication/webhook/#webhook-auth-caching), there is often case where we need to invalidate the cache to have new requests getting updated roles.

Currently, there is no support or API to clear the auth webhook cache. It would be nice feature to have for auth webhook caching.

### Describe the solution you'd like

Just like we have [API for clearing the cache](https://hasura.io/docs/latest/caching/caching-config/#clearing-items-from-the-cache) (general caching), we can have API for clearing/invalidating the auth webhook cache.

### Describe alternatives you've considered

There isn't any other way to invalidate auth webhook cache apart from using `Cache-Control` or `Expires` headers.

Contributor guide

Open the contributing guide

Research direction

Start with the auth webhook caching documentation and the general cache-clearing API documentation linked in the issue. Determine how an API for invalidating auth webhook entries should work and verify that subsequent requests use updated roles instead of cached results. Done means the cache can be cleared through the API without relying on Cache-Control or Expires headers.

Written by the indexing model from the issue text.

Assessment

Tech stack
graphql
Domain
api, authentication, backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.