Samyak
NNovu
•Created by Samyak on 6/23/2024 in #💬│support
Setting custom queryKey in useFetchNotifications
Hi @Pawan Jain ,
I'm trying to fetch all notifications and only unread notifications separately.
I'm doing something like
I believe
useInfiniteQuery
underneath useFetchNotifications
is using infinite_notifications
as queryKey
for both requests. Hence, returning the same cached notifications. I was wondering if there's a way to modify the queryKey
for each request to fetch all notifications and unread notifications in separate requests.
Thanks!9 replies