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
Apollo has a feature called skip that, being a boolean, if true, will skip the query, for example. This would be awesome for Urql, specially because of the hooks approach.
If I use the component Query, I can check for myself if some needed variable is missing and, just return null in that case, for instance. But, if I were to reproduce this behavior using the useQuery hook, I would need to create a component (HOC) for returning null in order to skip the api request - but I would still be using the component approach, and the hook would lose sense.
So, what if we could pass an prop like skip, either using a component or a hook, that receives a boolean value, and that if true would skip of calling the api?
Thanks
The text was updated successfully, but these errors were encountered:
Apollo has a feature called
skip
that, being a boolean, iftrue
, will skip the query, for example. This would be awesome for Urql, specially because of the hooks approach.If I use the component
Query
, I can check for myself if some needed variable is missing and, just returnnull
in that case, for instance. But, if I were to reproduce this behavior using theuseQuery
hook, I would need to create a component (HOC) for returning null in order to skip the api request - but I would still be using the component approach, and the hook would lose sense.So, what if we could pass an prop like
skip
, either using a component or a hook, that receives a boolean value, and that iftrue
would skip of calling the api?Thanks
The text was updated successfully, but these errors were encountered: