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

Remove staleTime option from client #2613

Merged
merged 1 commit into from
Aug 27, 2021
Merged

Conversation

ubbe-xyz
Copy link
Collaborator

@ubbe-xyz ubbe-xyz commented Aug 27, 2021

Reasoning 💡

We reasoned that staleTime, a new option for <SessionProvider /> was unnecessary as another new option, refetchInterval, already covers this behaviour implicitly. Hence removing it from the client module 🗑.

Checklist 🧢

  • Documentation
  • Tests
  • Ready to be merged

Affected issues 🎟

None.

@vercel
Copy link

vercel bot commented Aug 27, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/nextauthjs/next-auth/8V87gvhVeNGyDRw5jtxtTUXYbMQF
✅ Preview: Failed

@github-actions github-actions bot added adapters Changes related to the core code concerning database adapters client Client related code core Refers to `@auth/core` databases hacktoberfest-docs Relates to documentation pages providers test Related to testing TypeScript Issues relating to TypeScript labels Aug 27, 2021
@ubbe-xyz ubbe-xyz changed the base branch from main to next August 27, 2021 19:36
@ubbe-xyz ubbe-xyz changed the title Fix/remove stale time Remove staleTime option from client Aug 27, 2021
@ubbe-xyz ubbe-xyz changed the title Remove staleTime option from client Remove staleTime option from client ☕️ Aug 27, 2021
@ubbe-xyz ubbe-xyz changed the title Remove staleTime option from client ☕️ Remove staleTime option from client Aug 27, 2021
@codecov-commenter
Copy link

Codecov Report

Merging #2613 (c8bf54b) into next (1c1e841) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             next    #2613   +/-   ##
=======================================
  Coverage   13.96%   13.96%           
=======================================
  Files          85       85           
  Lines        1325     1325           
  Branches      379      378    -1     
=======================================
  Hits          185      185           
  Misses        951      951           
  Partials      189      189           
Impacted Files Coverage Δ
src/client/react.js 95.54% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1c1e841...c8bf54b. Read the comment docs.

Copy link
Member

@balazsorban44 balazsorban44 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, this will have to be added to the docs, but also to the migration guide!

https://github.com/nextauthjs/docs/blob/main/docs/getting-started/upgrade-to-v4.md#3-sessionprovider

@balazsorban44 balazsorban44 merged commit 08349c3 into next Aug 27, 2021
@balazsorban44 balazsorban44 deleted the fix/remove-stale-time branch August 27, 2021 19:44
mnphpexpert added a commit to mnphpexpert/next-auth that referenced this pull request Sep 2, 2024
BREAKING CHANGE:

`staleTime` (previously `clientMaxAge`) has been removed. Check out `refetchInterval` instead. It should cover most of the cases. If not, we can look into adding this back later on.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
adapters Changes related to the core code concerning database adapters client Client related code core Refers to `@auth/core` hacktoberfest-docs Relates to documentation pages providers test Related to testing TypeScript Issues relating to TypeScript
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants