Skip to content

Commit 57c43dd

Browse files
committed
Remove unneeded destructure
1 parent 0ff610d commit 57c43dd

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

src/local-state/LocalState.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -712,14 +712,13 @@ export class LocalState<
712712
// Warn when a resolver is not defined.
713713
: (
714714
() => {
715-
const { cache } = client;
716715
const fieldFromCache = getCacheResultAtPath(diff, path);
717716

718717
if (fieldFromCache !== undefined) {
719718
return fieldFromCache;
720719
}
721720

722-
if (cache.resolvesClientField?.(typename, fieldName)) {
721+
if (client.cache.resolvesClientField?.(typename, fieldName)) {
723722
if (fetchPolicy === "no-cache") {
724723
invariant.warn(
725724
"The '%s' field resolves the value from the cache, for example from a 'read' function, but a 'no-cache' fetch policy was used. The field value has been set to `null`. Either define a local resolver or use a fetch policy that uses the cache to ensure the field is resolved correctly.",

0 commit comments

Comments
 (0)