connectrpc / connect-query-es

TypeScript-first expansion pack for TanStack Query that gives you Protobuf superpowers.
https://connectrpc.com/docs/web/query/getting-started
Apache License 2.0
218 stars 14 forks source link

Does this work with @tanstack/vue-query or other variants? #358

Closed Jisu-Woniu closed 4 months ago

Jisu-Woniu commented 4 months ago

Since the official doc uses react-query as an example, and the code here uses hard-coded @tanstack/react-query:

https://github.com/connectrpc/connect-query-es/blob/fb8b677ad9587d4de9c4ec234c79893e26fe6b09/packages/connect-query/src/use-mutation.ts#L17-L21

I wonder whether this package work with @tanstack/vue-query, @tanstack/solid-query or @tanstack/svelte-query. If not, is it possible to let users inject the useQuery or other functions themselves?

paul-sachs commented 4 months ago

This package does provide the basic building blocks (primarily createQueryOptions) that can be used to work with other tanstack variants, but hasn't been designed around it. More details can be found in #324 but for now, you're limited to installing this package and having to build your own useQuery variants.