Skip to content

cache reset doesn't work in next 7.0.0 with-apollo-auth #5246

@ghost

Description

Examples bug report

Example name

with-apollo-auth

Describe the bug

I need to refresh the page after performing login/register/logout to see the result.

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

  1. yarn create next-app --example with-apollo-auth with-apollo-auth-app
  2. update dependencies Update GrpahQL dependencies #5242
  3. yarn dev
  4. try to login with valid credentials

Expected behavior

After login I should see the logged in page.

System information

  • OS: Linux
  • Browser (if applies) Chrome
  • Version of Next.js: 7.0.0

Additional context

I think it's connected to this piece of code:

// Force a reload of all the current queries now that the user is
// logged in
client.cache.reset().then(() => {
  redirect({}, '/')
})

It seems the reset is not performed, as I need to refresh the page to see the desired result (same with register, logout).

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueEasy to fix issues, good for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions