openapi-codegen icon indicating copy to clipboard operation
openapi-codegen copied to clipboard

[Improvement] - allow passing React Query's `skipToken` to add typesafe disabling of queries

Open AronBe opened this issue 1 year ago • 0 comments

TRPC and consequently React Query implemented skipToken to disable queries in "typesafe" way, basically dealing with enabled needing extra undefined handling.

https://tanstack.com/query/latest/docs/framework/react/guides/disabling-queries#typesafe-disabling-of-queries-using-skiptoken https://trpc.io/docs/client/react/disabling-queries

trpc implementation https://github.com/trpc/trpc/blob/5027209bc300d299224ecef764adeac09b8cab8d/packages/react-query/src/shared/hooks/createHooksInternal.tsx

AronBe avatar May 19 '24 17:05 AronBe