Token undefined on first render in next-auth causes useSuspenseQuery to fetch with no bearer token set

I am using the new useSuspenseQuery from react-query and I noticed that the enabled property is not present on this hook. My useGetApiToken returns null on first render and because of this, the suspenseQuery fetches with null as value for the bearer token.

One way to solve this is to put the refetchInterval property very low (500ms – 1000ms), but this comes at the cost of constantly polling my api with requests.