3.8.0-beta.3
Minor Changes
-
#10895
e187866fd
Thanks @(author)! - Add generic type parameter for the entity modified incache.modify
. Improves
TypeScript type inference for that type's fields and values of those fields.Example:
cache.modify<Book>({ id: cache.identify(someBook), fields: { title: (title) => { // title has type `string`. // It used to be `any`. }, => { // author has type `Reference | Book["author"]`. // It used to be `any`. }, }, });
-
#10895
e187866fd
Thanks @Gelio! - Use unique opaque types for theDELETE
andINVALIDATE
Apollo cache modifiers.This increases type safety, since these 2 modifiers no longer have the
any
type.
Moreover, it no longer triggers the@typescript-eslint/no-unsafe-return
rule.
Patch Changes
-
#10951
2e833b2ca
Thanks @alessbell! - ImproveuseBackgroundQuery
type interface -
#10964
f33171506
Thanks @alessbell! - Fixes a bug inBatchHttpLink
that removed variables from all requests by default. -
#10968
b102390b2
Thanks @phryneas! - Use printed query for query deduplication. Cacheprint
calls for GraphQL documents to speed up repeated operations. -
#10969
525a9317a
Thanks @phryneas! - Slightly decrease bundle size and memory footprint ofSuspenseCache
by changing how cache entries are stored internally.