Safely setting store state based on query data/status - TanStack