apollo-hooks-codegen
apollo-hooks-codegen copied to clipboard
useQuery: Implement skip option
I've run into a few situations where conditionally executing a query would be very beneficial, for instance when one query returns the ID of the logged in user, and another query would then fetch some more user data based on that ID.
At the moment the (only?) way to do this is to create a component for the query and then conditionally render that. Implementing Apollo's skip option could make this a lot easier 🙂
Maybe some prior art here https://github.com/trojanowski/react-apollo-hooks/pull/42