-
Notifications
You must be signed in to change notification settings - Fork 8
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
Configuring the cache key of related data #35
Comments
Please provide some example, it will be easier for me to understand the issue. Thanks! |
I have an API that returns the following data, say,
Now this API data is built up of multiple objects, for example, assignees, components, status, parent, etc. For the Now when I normlize this data, I want normy to cache the assignee data to the react cache key for the Is this behaviour configurable? |
Normy does not affect at all the way how react query cache data per key. Normy has own cache. React query data is assumed to be denormalized, and normy normalizes it. I suspect that your use case is hard to translate to generic things which could be added to this library. Normy is very flexible, albeit it is opinionated for what it does, and all it does is adding normalizing feature to data fetching libraries. Your use case seems different, as you have API which returns normalized data already. I am not sure this will help you, but you could:
If you need some help to understand some parts, pls let me know and I will try to help. |
I have a API that for some fields returns a summary object for that field. I have another API for which some react query key has already been configured. Can I configure react query in such a way that the react query cache key used for the response of the API and the summary object are the same. Since they represent the same object
The text was updated successfully, but these errors were encountered: