When I am not logged in I receiving this error:
Unhandled Rejection (Error): GraphQL error: Refresh has expired
And it occurrs in this code block:
const { loading, error, data } = useQuery(GET_BILLABLE_EVENTS, {
fetchPolicy: 'no-cache',
errorPolicy: 'ignore',
onError: (err) => {
console.log({ err });
},
});
return <div>hello</div>;
I really want it to be handled gracefully, but it just crashes React and throws the error, despite the error policy and the onError being set in options.
It seems to get stuck in this error loop when create-react-app is restarted.