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

bugfix: invalidate query on update and create #174

Merged

Conversation

choffmann
Copy link
Member

@choffmann choffmann commented Oct 15, 2024

Close #170

@choffmann choffmann added the need-reviewer Send notification in Discord label Oct 15, 2024
@choffmann choffmann self-assigned this Oct 15, 2024
@choffmann choffmann linked an issue Oct 15, 2024 that may be closed by this pull request
@@ -41,8 +44,9 @@ function EditTreeCluster() {
replace: true,
})
showToast('Die Bewässerungsgruppe wurde erfolgreich editiert.')
queryClient.invalidateQueries(treeClusterIdQuery(clusterId))
Copy link
Contributor

Choose a reason for hiding this comment

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

What does that mean and how do I test it?

Copy link
Member Author

Choose a reason for hiding this comment

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

The query client caches the response from the backend for a period of time. Here I invalidate the caches after each update and create so that we can guarantee that the data on the next screen is up to date.

Copy link
Contributor

@doriengr doriengr left a comment

Choose a reason for hiding this comment

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

🔥

@choffmann choffmann merged commit fdd6383 into release/v1.0.0 Oct 16, 2024
1 check passed
@choffmann choffmann deleted the bugfix/invalidate-query-on-update-and-create branch October 16, 2024 21:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need-reviewer Send notification in Discord
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Invalide query on update and create
2 participants