You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Imagine I have this query:
This generates this React Query hook:
However, since there are no possible query variables, the first argument should be
options
directly. I expect this output:This is what changed:
export const usePopularAssetsQuery = < TData = PopularAssetsQuery, TError = unknown >( - variables?: PopularAssetsQueryVariables, options?: UseQueryOptions<PopularAssetsQuery, TError, TData> ) => useQuery<PopularAssetsQuery, TError, TData>(...)
Any thoughts on how I could do this? Is there an option for
ignoreEmptyVariables
or something?Why
Currently, to consume this hook and use options, I need to do this:
And it's not that enjoyable to pass
undefined
.Beta Was this translation helpful? Give feedback.
All reactions