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

Respect enabled:false in QueryClient's default options #369

Closed anuraaga closed 3 months ago

anuraaga commented 3 months ago

Currently, tanstack's useQuery is always passed false or true for enabled. But if a user hasn't provided any explicit enablement, either using disableQuery or queryOptions, then the QueryClient's default options should be used, which requires making sure enabled is unset, not an explicit boolean value.

CLAassistant commented 3 months ago

CLA assistant check
All committers have signed the CLA.

paul-sachs commented 3 months ago

@anuraaga Thanks for the PR. I'd never thought to set enabled to false by default but this makes sense. We'll get this merged and released shortly.