A single API group on the typed query client.
Each endpoint in the group is mapped to its EndpointQueryHooks. The group also exposes a queryKey() method for group-level cache invalidation.
EndpointQueryHooks
queryKey()
Returns a query key prefix for this entire group. Use with queryClient.invalidateQueries() to invalidate all queries in the group at once.
queryClient.invalidateQueries()
queryClient.invalidateQueries({ queryKey: queryApi.todos.queryKey()}); Copy
queryClient.invalidateQueries({ queryKey: queryApi.todos.queryKey()});
A single API group on the typed query client.
Each endpoint in the group is mapped to its
EndpointQueryHooks. The group also exposes aqueryKey()method for group-level cache invalidation.