feat: add cache invalidation functionality in GraphQL module
- Introduced a new `invalidateCache` method in the GraphQL module to enhance cache management. - This addition allows for cache invalidation based on the session ID from request headers, improving data consistency and performance during GraphQL operations. - Aims to provide better control over cached data, ensuring that users receive the most up-to-date information.
This commit is contained in:
@@ -160,6 +160,11 @@ import { GraphqlService } from "./graphql.service";
|
||||
// @ts-expect-error: TODO
|
||||
extra.request.headers["x-session-id"]
|
||||
),
|
||||
invalidateCache: () =>
|
||||
graphqlService.invalidateCache(
|
||||
// @ts-expect-error: TODO
|
||||
extra.request.headers["x-session-id"]
|
||||
),
|
||||
};
|
||||
}
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user