diff --git a/lib/apollo.ts b/lib/apollo.ts index d49fcf6f3..b8b8152db 100644 --- a/lib/apollo.ts +++ b/lib/apollo.ts @@ -28,7 +28,17 @@ function createApolloClient(context?: Context) { return new ApolloClient({ ssrMode: typeof window === "undefined", link: createIsomorphLink(context), - cache: new InMemoryCache(), + cache: new InMemoryCache({ + typePolicies: { + User: { + fields: { + profile: { + merge: false, + }, + }, + }, + }, + }), }); } diff --git a/pages/u/[identifier].tsx b/pages/u/[identifier].tsx index 83583610f..b8a193c2b 100644 --- a/pages/u/[identifier].tsx +++ b/pages/u/[identifier].tsx @@ -46,8 +46,9 @@ const ProfilePage = ({ identifier }: { identifier: string }) => { // FIXME: handle fallback const getUserByIdentifier = data?.getUserByIdentifier; - if (!getUserByIdentifier && typeof window !== "undefined") + if (!getUserByIdentifier && typeof window !== "undefined") { router.push("/404"); + } return getUserByIdentifier ? : null; };