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
If a query is disabled initially, there is still an entry created in the query-cache for it.
Let's take the following example to build something like a useLazyQuery:
exportconstuseLazyQuery=defineQuery(()=>{constexternalId=ref<string>('')const{
data,
refresh,
status
}=useQuery({key: ()=>['group',`external-${externalId.value}`],query: async()=>{// fetch something here},enabled: false})asyncfunctionfetchAsync(id: string){externalId.value=idconst{ data }=awaitrefresh()returndata}return{data, fetchAsync}
It can be observed, that a cache entry is created for the disabled query before the first fetch.
It has the key external-.
After the fetchAsync function has been called the first time, another cache entry external-<ID> is created.
Seems like this doesn't break anything in my app right now, but I discovered it during debugging and thought this is worth reporting.
The text was updated successfully, but these errors were encountered:
If a query is disabled initially, there is still an entry created in the query-cache for it.
Let's take the following example to build something like a
useLazyQuery
:It can be observed, that a cache entry is created for the disabled query before the first fetch.
It has the key
external-
.After the
fetchAsync
function has been called the first time, another cache entryexternal-<ID>
is created.Seems like this doesn't break anything in my app right now, but I discovered it during debugging and thought this is worth reporting.
The text was updated successfully, but these errors were encountered: