Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

useSuspenseQuery: remove promiseCache #11363

Merged
merged 12 commits into from
Dec 1, 2023
Prev Previous commit
Next Next commit
review feedback
  • Loading branch information
phryneas committed Dec 1, 2023
commit 4665fd421386f8aad7feb7ff73f2deb69547591f
3 changes: 1 addition & 2 deletions src/react/cache/QueryReference.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
createFulfilledPromise,
createRejectedPromise,
} from "../../utilities/index.js";
import type { CacheKey, QueryKey } from "./types.js";
import type { QueryKey } from "./types.js";
import type { useBackgroundQuery, useReadQuery } from "../hooks/index.js";

type Listener<TData> = (promise: Promise<ApolloQueryResult<TData>>) => void;
Expand All @@ -32,7 +32,6 @@ export interface QueryReference<TData = unknown> {
}

interface InternalQueryReferenceOptions {
key: CacheKey;
onDispose?: () => void;
autoDisposeTimeoutMs?: number;
}
Expand Down
1 change: 0 additions & 1 deletion src/react/cache/SuspenseCache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ export class SuspenseCache {

if (!ref.current) {
ref.current = new InternalQueryReference(createObservable(), {
key: cacheKey,
autoDisposeTimeoutMs: this.options.autoDisposeTimeoutMs,
onDispose: () => {
delete ref.current;
Expand Down