QueryOptions
I just upgraded to the latest version and now my query options don't build.
Doesn't work any more. Getting TS2527 The inferred type of 'userProfile' references an inaccessible 'unqiue symbol' type. A type annotation is necessary.
??????
4 Replies
round-purple•8mo ago
GitHub
TypeScript errors when using exported queryOptions factory in @tans...
Describe the bug When using the factory queryOptions and exporting the result, TypeScript errors appear: Exported variable 'shopsQuery' has or is using name 'dataTagErrorSymbol' fro...
round-purple•8mo ago
v5.62.7 should work. I hope a solution can be found for the typing error. It affects all frameworks
rare-sapphire•8mo ago
I think here the docs also are misleading
https://tanstack.com/query/latest/docs/framework/angular/guides/query-options
They show the query options being returned directly, but it seems to me like injectQuery wants to have a function like alan showed in their example
Query Options | TanStack Query Angular Docs
One of the best ways to share queryKey and queryFn between multiple places, yet keep them co-located to one another, is to use the queryOptions helper. At runtime, this helper just returns whatever yo...
fascinating-indigo•8mo ago
Yes the doc is wrong here, it should be a function which does return query options.