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:
2025-01-17 22:05:29 +07:00
parent 5fff0db6d7
commit 9c152b52a3

View File

@@ -160,6 +160,11 @@ import { GraphqlService } from "./graphql.service";
// @ts-expect-error: TODO // @ts-expect-error: TODO
extra.request.headers["x-session-id"] extra.request.headers["x-session-id"]
), ),
invalidateCache: () =>
graphqlService.invalidateCache(
// @ts-expect-error: TODO
extra.request.headers["x-session-id"]
),
}; };
} }
return { return {