feat: prefix infinite queries differently to "normal" queries?
See original GitHub issueDescribe the feature you’d like to request
Currently, the cache gets a bit messed up if you use an endpoint the with .useInfiniteQuery() in one part of the app and .useQuery() in another.
Describe the solution you’d like to see
Currently, we store cache keys as [pathArray, input]-tuple
Maybe, we should store it as ['query' | 'infinite', pathArray, input]-tuple?
Or a [pathArray, 'query' | 'infinite', input]-tuple?
Desribe alternate solutions
Not doing it
Additional information
No response
👨👧👦 Contributing
- 🙋♂️ Yes, I’d be down to file a PR implementing this feature!
Issue Analytics
- State:
- Created 10 months ago
- Comments:15 (15 by maintainers)
Top Results From Across the Web
Infinite Queries | TanStack Query Docs
When an infinite query becomes stale and needs to be refetched, each group is fetched sequentially , starting from the first one. This...
Read more >How to optimistically update an infinite or paginated query?
It seems for now on mutation success I always have to call queryCache.invalidateQueries() which is very wasteful. Some code example would be great....
Read more >React Query Tutorial - 20 - Infinite Queries - YouTube
Courses - https://learn.codevolution.dev/ Support UPI - https://support.codevolution.dev/ Support PayPal ...
Read more >NetSuite Applications Suite - Using Qualified Queries
Cloud · Cloud Applications · NetSuite. NetSuite Applications Suite. Table of Contents; Search. Contents. Expand AllCollapse All.
Read more >PRACTICAL GREMLIN: An Apache TinkerPop Tutorial
This book introduces the Apache TinkerPop 3 Gremlin graph query and traversal language via real examples featuring real-world graph data. That ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

That’s exactly right. Objects have no order so the partial matching will work as you want to here. I’m going into details why the object is pretty good for query keys: https://tkdodo.eu/blog/leveraging-the-query-function-context
yes, those two would work.
I also thought about having one object, but I thought that we then wouldn’t be able to allow having
typeprovided from the params. Having theinputbe a separate entry in the object would solve that nicely I think 👍