Merge pull request #4298 from omnivore-app/fix/web-dont-cache-null-viewer
If we get null for viewer do not cache it as theres no stale key
This commit is contained in:
@ -10,6 +10,9 @@ export function useGetViewer() {
|
||||
staleTime: Infinity,
|
||||
queryFn: async () => {
|
||||
const response = (await gqlFetcher(GQL_GET_VIEWER)) as ViewerData
|
||||
if (!response.me) {
|
||||
throw new Error('no user found')
|
||||
}
|
||||
return response.me
|
||||
},
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user