Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reset the store not possible anymore with version 7.0.0 #2249

Closed
mfechner opened this issue Apr 30, 2024 · 1 comment
Closed

Reset the store not possible anymore with version 7.0.0 #2249

mfechner opened this issue Apr 30, 2024 · 1 comment

Comments

@mfechner
Copy link

Describe the bug

As described in the manual here: https://the-guild.dev/graphql/apollo-angular/docs/recipes/authentication#reset-store-on-logout

You can call:

this.apollo.getClient().resetStore()

Expected behavior

The logout should work, instead you get the error message:

Error: src/app/auth/auth.service.ts:62:23 - error TS2551: Property 'getClient' does not exist on type 'Apollo'. Did you mean 'client'?

62           this.apollo.getClient().resetStore();
                         ~~~~~~~~~

Does the manual do not fit the current version?

Environment:

├── @angular/cli@17.3.6 -> .\node_modules\.pnpm\@angular+cli@17.3.6_chokidar@3.6.0\node_modules\@angular\cli
├── @angular/core@17.3.6 -> .\node_modules\.pnpm\@angular+core@17.3.6_rxjs@7.8.1_zone.js@0.14.4\node_modules\@angular\core
├── @apollo/client@3.10.1 -> .\node_modules\.pnpm\@apollo+client@3.10.1_graphql@16.8.1_subscriptions-transport-ws@0.11.0_graphql@16.8.1_\node_modules\@apollo\client
├── apollo-angular@7.0.0 -> .\node_modules\.pnpm\apollo-angular@7.0.0_@angular+core@17.3.6_rxjs@7.8.1_zone.js@0.14.4__@apollo+client@3.10.1_gr_ydhkmubp23p5ncwvdvq2uklvka\node_modules\apollo-angular
├── graphql@16.8.1 -> .\node_modules\.pnpm\graphql@16.8.1\node_modules\graphql
└── typescript@5.4.5 -> .\node_modules\.pnpm\typescript@5.4.5\node_modules\typescript

Additional context

@mfechner mfechner changed the title Reset the store not possible anymore Reset the store not possible anymore with version 7.0.0 Apr 30, 2024
PowerKiKi added a commit that referenced this issue Apr 30, 2024
PowerKiKi added a commit that referenced this issue Apr 30, 2024
@PowerKiKi
Copy link
Collaborator

Does the manual do not fit the current version?

Correct. You should do this.apollo.client.resetStore().

Docs is fixed via 4676d3d

PowerKiKi added a commit that referenced this issue Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants