How to call useQuery hook conditionally?
React-Apollo: In apollo’s documentation, it shows that there’s a skip option you can add: useQuery(query,{skip:someState===someValue}) Otherwise, you can also useLazyQuery if you want to have a query that you run when you desire it to be run rather than immediately. If you are using the suspense based hooks useSuspenseQuery and useBackgroundQuery you need to use … Read more