DISSINET / InkVisitor

An open-source, browser-based front-end application for the collection of complex structured data from textual resources in history and the social sciences into a RethinkDB database for further analysis.
BSD 3-Clause "New" or "Revised" License
10 stars 3 forks source link

Refactor react-query dependency keys #2162

Open adammertel opened 3 months ago

adammertel commented 3 months ago

Query keys should follow the logic of API calls and prevent the same queries from being run repeatedly. This involves the query invalidation.

Ptrhnk commented 3 months ago

@adammertel can you point on something specific? I'm curious which one you've found, because usually it's separated for a reason.

adammertel commented 3 months ago

Sorry, should have been more specific - I have edited the title. This is mostly concerning the invalidation - for example, when you edit a statement, ALL the territories in react-query cache are invalidated. So the invalidation events should be more specific whenever possible.