@apollo/client
Advanced tools
Changelog
3.11.7
e471cef
Thanks @jerelmiller! - Fixes a regression from where passing an invalid identifier to from
in useFragment
would result in the warning TypeError: Cannot read properties of undefined (reading '__typename')
.Changelog
3.11.6
#12049 9c26892
Thanks @phryneas and @maciesielka! - Fix a bug where useFragment
did not re-render as expected
#12044 04462a2
Thanks @DoctorJohn! - Cache the useSubscription
hook's restart
function definition between re-renders.
Changelog
3.11.5
#12027 eb3e21b
Thanks @JavaScriptBach! - Type MutationResult.reset
as an arrow function
#12020 82d8cb4
Thanks @jerelmiller! - Better conform to Rules of React by avoiding write of ref in render for useFragment
.
Changelog
3.11.4
#11994 41b17e5
Thanks @jerelmiller! - Update the Modifier
function type to allow cache.modify
to return deeply partial data.
#11989 e609156
Thanks @phryneas! - Fix a potential crash when calling clearStore
while a query was running.
Previously, calling client.clearStore()
while a query was running had one of these results:
useQuery
would stay in a loading: true
state.useLazyQuery
would stay in a loading: true
state, but also crash with a "Cannot read property 'data' of undefined"
error.Now, in both cases, the hook will enter an error state with a networkError
, and the promise returned by the useLazyQuery
execute
function will return a result in an error state.
#11994 41b17e5
Thanks @jerelmiller! - Prevent accidental distribution on cache.modify
field modifiers when a field is a union type array.