The PR fetches a resource with ['user', id] or 'user-'+id typed in the component. The repo already has a query-key factory ( queryKeys.user.detail(id) , or a similar helper) that list, detail, and mutation hooks share. The new key does not match, so a successful mutation leaves the list stale, or two hooks for the same entity sit in different cache slots.
I've started treating a handmade query key as a cache bug waiting to happen when a factory exists. The fetch may work in the happy path. Invalidation is why the factory is there.
Why the loose key shows up
Examples online use a string or a short array in the hook. The model can write that without finding queryKeys or keys.ts .…