From 05e5c5ad3e576efe8efba6596789a360b7ee0752 Mon Sep 17 00:00:00 2001 From: Matchu Date: Sat, 29 Aug 2020 13:23:41 -0700 Subject: [PATCH] add petAppearanceById client caching If we already got this PetAppearance, now `petAppearanceById` knows how to serve it from the client cache instead making a network request! --- src/app/apolloClient.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/app/apolloClient.js b/src/app/apolloClient.js index 9601b4f..29ae766 100644 --- a/src/app/apolloClient.js +++ b/src/app/apolloClient.js @@ -21,6 +21,10 @@ const typePolicies = { item: (_, { args, toReference }) => { return toReference({ __typename: "Item", id: args.id }, true); }, + + petAppearanceById: (_, { args, toReference }) => { + return toReference({ __typename: "PetAppearance", id: args.id }, true); + }, }, },