You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
querytotalUreadNotifications {
me {
notifications {
totalUnread
}
}
}
The path to the data is Query.Me.NotificationsPaginated.totalUnread . This data does exist in the offline cache, however none of it has an Id.
Query is the top level.
Me is a container for any user authenticated data, the users id existing under Profile, but not Me.
NotificationsPaginated is a container that has edges and pageInfo for relay.
I am wondering if this is expected to work with the cache? My understanding is that Me and NotificationsPaginated should be squashed into the parent key becoming Query.Me.NotificationsPaginated which can then read totalUnread.
The behaviour we are seeing though, is that it doesn't return the cached data and instead fetches it from the server.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
We are using Urql's
offlineCache
with the following (relevant) config:We have a query like this:
The path to the data is
Query.Me.NotificationsPaginated.totalUnread
. This data does exist in the offline cache, however none of it has an Id.Query
is the top level.Me
is a container for any user authenticated data, the users id existing underProfile
, but notMe
.NotificationsPaginated
is a container that hasedges
andpageInfo
for relay.I am wondering if this is expected to work with the cache? My understanding is that
Me
andNotificationsPaginated
should be squashed into the parent key becomingQuery.Me.NotificationsPaginated
which can then readtotalUnread
.The behaviour we are seeing though, is that it doesn't return the cached data and instead fetches it from the server.
Beta Was this translation helpful? Give feedback.
All reactions