TanStackT
TanStack•3y ago•
6 replies
dry-scarlet

objects matching behaviour

Say I have the following query keys:
{
   singleTodoById: (id?: string) => ['todos', { id }];
}

and say I do this
queryClient.refetchQueries(keys.singleTodoById());


note I didn't pass an Id, so the generated key would be ['todos', {}].
Would that match all my subsequent keys, with
id
s defined, or not? šŸ¤”
Was this page helpful?