From 3f3b3f0e16582c79bd68d68d728b02c8e6a69452 Mon Sep 17 00:00:00 2001 From: Rijk van Zanten Date: Tue, 10 Aug 2021 17:16:29 +0200 Subject: [PATCH] Fix graphql GET request cache query extraction (#7319) Fixes #7298 --- api/src/utils/get-cache-key.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/src/utils/get-cache-key.ts b/api/src/utils/get-cache-key.ts index 30236ee829af9..99f83e54f3634 100644 --- a/api/src/utils/get-cache-key.ts +++ b/api/src/utils/get-cache-key.ts @@ -8,7 +8,7 @@ export function getCacheKey(req: Request): string { const info = { user: req.accountability?.user || null, path, - query: path?.includes('/graphql') ? req.params.query : req.sanitizedQuery, + query: path?.includes('/graphql') ? req.query.query : req.sanitizedQuery, }; const key = hash(info);