Don't run query if parameter is null

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,
});