Solution 1:
You can use skip
key of useQuery
hook options to achieve this:
const { data, loading, error } = useQuery(SEARCH_REVIEWS, {
variables: /* snip */,
skip: !param,
});
You can use skip
key of useQuery
hook options to achieve this:
const { data, loading, error } = useQuery(SEARCH_REVIEWS, {
variables: /* snip */,
skip: !param,
});