You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Let's say I have endpoint /todos with support of all filters that on demand mode provides this endpoint returns only preview of todo items not their full content. And also /todos/:id which returns exact todo item with all data.
In tanstack query i would use ['todos'] and ['todos', someId] keys accordingly. Lets say todo item have a lot of data attached which isn't required to show list of todo but required to present single todo item on separate page.
How to deal with it using tanstack db? I figured out how to deal with list of items from docs:
But how I should define collection for single (expanded, full) todo item? What queryKey should I use? How to query this data?
Maybe I missing something but I didn't find anything in docs about this case
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Let's say I have endpoint
/todoswith support of all filters that on demand mode provides this endpoint returns only preview of todo items not their full content. And also/todos/:idwhich returns exact todo item with all data.In tanstack query i would use ['todos'] and ['todos', someId] keys accordingly. Lets say todo item have a lot of data attached which isn't required to show list of todo but required to present single todo item on separate page.
How to deal with it using tanstack db? I figured out how to deal with list of items from docs:
But how I should define collection for single (expanded, full) todo item? What queryKey should I use? How to query this data?
Maybe I missing something but I didn't find anything in docs about this case
Beta Was this translation helpful? Give feedback.
All reactions