From d0516a86b84ad43a27db88ad9a1139d396f91b9c Mon Sep 17 00:00:00 2001 From: Shane Myrick Date: Mon, 22 Apr 2024 09:43:00 -0700 Subject: [PATCH] Update cache-configuration.mdx --- docs/source/caching/cache-configuration.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/caching/cache-configuration.mdx b/docs/source/caching/cache-configuration.mdx index 31e235861b9..8524a6b9444 100644 --- a/docs/source/caching/cache-configuration.mdx +++ b/docs/source/caching/cache-configuration.mdx @@ -189,7 +189,7 @@ const cache = new InMemoryCache({ // You can also use a function to determine any of the values above. // The first argument is the reference to the record to be written, and the second is the runtime context keyFields: (location, context) => { - if (context.storeObject.location.state) { + if (context.readField("location", context.readField("state"))) { return ["city, "state", "country"]; } else { return ["city, "country"];