Convex Query is called multiple times even in production build

The first time the identity which is called via
const identity = await ctx.auth.getUserIdentity();
const identity = await ctx.auth.getUserIdentity();
is null but the other time it has the right identity
No description
3 Replies
Michal Srb
Michal Srb•7mo ago
You don't have the component that has the useQuery hook call wrapped in Authenticated
FleetAdmiralJakob 🗕 🗗 🗙
Ok, I understand why there is a identity === undefined but why does the query get called multiple times? Is it that the query gets recalled when the authetication state changes?
Michal Srb
Michal Srb•7mo ago
Correct.