I'm having to do a lot of invalidations of queries. TanStack react query allows you to use partial query key matching via prefix. But using the OptionKey function doesn't allow this as it forces you to input all required parameters (in my case, it's required to input limit/offset, but the query key prefix shouldn't include the limit/offset search parameters).
The current solution is to write:
void queryClient.invalidateQueries({ queryKey: [{ _id: "getApiV1Endpoint" }] })
manually. If there was auto generated ids, that would be nice.
hm i guess you could do getApiV1Endpoint.name which works...
I'm having to do a lot of invalidations of queries. TanStack react query allows you to use partial query key matching via prefix. But using the OptionKey function doesn't allow this as it forces you to input all required parameters (in my case, it's required to input limit/offset, but the query key prefix shouldn't include the limit/offset search parameters).
The current solution is to write:
manually. If there was auto generated ids, that would be nice.
hm i guess you could do
getApiV1Endpoint.namewhich works...