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

Create queryKey factory #1580

Merged
merged 3 commits into from
Nov 6, 2024
Merged

Create queryKey factory #1580

merged 3 commits into from
Nov 6, 2024

Conversation

robines
Copy link
Member

@robines robines commented Oct 31, 2024

Creates a factory for creating queryKeys. Use this where we use RQ currently. This makes invalidating data incredibly easy, at whatever level we want.

Gotten from a React Query maintainer here: https://tkdodo.eu/blog/effective-react-query-keys#use-query-key-factories

@robines robines added the frontend Task related to frontend. label Oct 31, 2024
@robines robines self-assigned this Oct 31, 2024
Copy link
Contributor

@Snorre98 Snorre98 left a comment

Choose a reason for hiding this comment

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

LGTM

your-factories-are-in-horrible-conditions-whate-are-you-going-to-do-about-it-314469-1-1902146713

Copy link
Contributor

@Snorre98 Snorre98 left a comment

Choose a reason for hiding this comment

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

your-factories-are-in-horrible-conditions-whate-are-you-going-to-do-about-it-314469-1

frontend/src/queryKeys.ts Show resolved Hide resolved
@robines robines enabled auto-merge (squash) November 6, 2024 13:33
@robines robines merged commit 5612017 into master Nov 6, 2024
5 checks passed
@robines robines deleted the robin/query-keys branch November 6, 2024 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
frontend Task related to frontend.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants