Hi Team How does “Refresh Data” action works? And when do we usually need to use it?
Hi @tasteful_possum! It clears the cache of data queries, re-running all of them. You should use it when you see stale data in studio. For example, you are editing something in studio and change something in your database. To re-do the queries and see visualize your updated data, you can hit “Refresh data”.
There is also the Refresh data action, which can be used for other purposes, right?
Oh, yes! I thought the question was referring to “Refresh data” under “View” in the top bar. The “Refresh data” action is used to clear data queries cache in production, during an interaction. You can use it, for example, if you are designing a forum board and you want the list of posts to update after the user inserts a new post.
Does the action refresh all the queries in the app? So say I have 100 queries all over the app, will “Refresh Data” action runs all of them?
It refreshes All data everywhere - in all the pages of the app, in all your other projects and all queries in my apps and projects also . Just kidding. I think it refreshes all queries of the app by default, but you can also select individual queries. I haven’t experimented with query groups myself yet.
Yes! By default it refreshes all data queries on the current page/component, but you can specify individual queries.
Would it be possible to select a query I want to refresh @tiago ?
Oh there you go! Thanks!
Ok, so only all the queries of the respective page. I was confused about the fact that when you click inside the field next to All, it lists all queries in the app. But what does query Invalidation mean?
By current page, does it mean that the Query on the Condition Guard will also be refreshed? Sorry just want to make sure hehe
Great question as well about what does the queryInvalidation means?
“Query invalidation” means invalidating the current result of the query, making the query re-run. Yes, all queries will be refreshed, including queries on condition guards.