From 01000c84f1a0d746b2e19625e2954e635604a389 Mon Sep 17 00:00:00 2001 From: Matchu Date: Fri, 18 Jun 2021 17:29:44 -0700 Subject: [PATCH] Cache ClosetList in Apollo Now, when you click from the user's lists page to a specific list, we'll share the data instead of showing a full loading screen! --- src/app/apolloClient.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/app/apolloClient.js b/src/app/apolloClient.js index 947dd1d..8e503ad 100644 --- a/src/app/apolloClient.js +++ b/src/app/apolloClient.js @@ -16,6 +16,9 @@ const typePolicies = { toReference({ __typename: "Zone", id: z.id }, true) ); }, + closetList: (_, { args, toReference }) => { + return toReference({ __typename: "ClosetList", id: args.id }, true); + }, items: (_, { args, toReference }) => { return args.ids.map((id) => toReference({ __typename: "Item", id }, true)