From 4676d3de0d24f873033d35fa2bfef3ee61d0d587 Mon Sep 17 00:00:00 2001 From: Adrien Crivelli Date: Tue, 30 Apr 2024 12:18:21 +0700 Subject: [PATCH] Update docs to reflect current code Fixes #2249 --- website/src/pages/docs/recipes/authentication.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/website/src/pages/docs/recipes/authentication.mdx b/website/src/pages/docs/recipes/authentication.mdx index 64ea1ec0b..e7b9e6878 100644 --- a/website/src/pages/docs/recipes/authentication.mdx +++ b/website/src/pages/docs/recipes/authentication.mdx @@ -151,8 +151,8 @@ Since Apollo caches all of your query results, it's important to get rid of them state changes. The easiest way to ensure that the UI and store state reflects the current user's permissions is to -call `Apollo.getClient().resetStore()` after your login or logout process has completed. This will -cause the store to be cleared and all active queries to be refetched. +call `Apollo.client.resetStore()` after your login or logout process has completed. This will cause +the store to be cleared and all active queries to be refetched. Another option is to reload the page, which will have a similar effect. @@ -175,7 +175,7 @@ class AuthService { // some app logic // reset the store after that - this.apollo.getClient().resetStore(); + this.apollo.client.resetStore(); } }