ADVERTISEMENT

urql useQuery's pause option doesn't freezes the request temporarily

Urql maintainer here, I'd assume if the component keeps remounting that something extra is happening. This hook should never make the wrapping component remount.

That being said you can always utilize the useClient hook to get the urql-client and then use client.query().toPromise() in that hook and use the returned result.

In your case this could be:

const MyComponent = () => {
  const client = useClient();
  useEffect(() => {
     client.query(
       INITIAL_CONFIG_QUERY
     ).toPromise().then(result => /* do something */)
  }, [])
}