3.8.0-beta.3
Minor Changes
-
#10895
e187866fdThanks @(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
e187866fdThanks @Gelio! - Use unique opaque types for theDELETEandINVALIDATEApollo cache modifiers.This increases type safety, since these 2 modifiers no longer have the
anytype.
Moreover, it no longer triggers the@typescript-eslint/no-unsafe-return
rule.
Patch Changes
-
#10951
2e833b2caThanks @alessbell! - ImproveuseBackgroundQuerytype interface -
#10964
f33171506Thanks @alessbell! - Fixes a bug inBatchHttpLinkthat removed variables from all requests by default. -
#10968
b102390b2Thanks @phryneas! - Use printed query for query deduplication. Cacheprintcalls for GraphQL documents to speed up repeated operations. -
#10969
525a9317aThanks @phryneas! - Slightly decrease bundle size and memory footprint ofSuspenseCacheby changing how cache entries are stored internally.