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!
This commit is contained in:
Emi Matchu 2021-06-18 17:29:44 -07:00
parent f20c68ea81
commit 01000c84f1

View file

@ -16,6 +16,9 @@ const typePolicies = {
toReference({ __typename: "Zone", id: z.id }, true) toReference({ __typename: "Zone", id: z.id }, true)
); );
}, },
closetList: (_, { args, toReference }) => {
return toReference({ __typename: "ClosetList", id: args.id }, true);
},
items: (_, { args, toReference }) => { items: (_, { args, toReference }) => {
return args.ids.map((id) => return args.ids.map((id) =>
toReference({ __typename: "Item", id }, true) toReference({ __typename: "Item", id }, true)