Handing Sub-Resource Queries #8291
Unanswered
ICarpenter
asked this question in
Q&A
Replies: 1 comment
-
see: https://tkdodo.eu/blog/seeding-the-query-cache#seeding-details-from-lists |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm starting a new frontend project and am leaning towards using the TanStack ecosystem. One challenge I've run into is how to handle API calls that return sub-resources (for example, a chat with messages). I initially solved this using
QueryObserver
andqueryClient.setQueryData
, but this approach feels a bit verbose. Sub-resources, especially in GraphQL, are quite common, so I'm wondering if others have encountered this issue and found a more elegant solution. Any advice or feedback would be greatly appreciated!Beta Was this translation helpful? Give feedback.
All reactions