Skip to content

Commit

Permalink
Remove queryKeyHashFn to allow default query client access to queries
Browse files Browse the repository at this point in the history
Signed-off-by: Paul Sachs <[email protected]>
  • Loading branch information
paul-sachs committed Oct 29, 2024
1 parent 4f29429 commit 98566f8
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions packages/connect-query/src/create-infinite-query-options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import type { Transport } from "@connectrpc/connect";
import type {
GetNextPageParamFunction,
QueryFunction,
QueryKey,
SkipToken,
} from "@tanstack/react-query";
import { skipToken } from "@tanstack/react-query";
Expand Down Expand Up @@ -65,7 +64,7 @@ function createUnaryInfiniteQueryFn<
pageParamKey,
}: {
pageParamKey: ParamKey;
},
}
): QueryFunction<
MessageShape<O>,
ConnectQueryKey,
Expand Down Expand Up @@ -100,7 +99,7 @@ export function createInfiniteQueryOptions<
transport,
getNextPageParam,
pageParamKey,
}: ConnectInfiniteQueryOptions<I, O, ParamKey> & { transport: Transport },
}: ConnectInfiniteQueryOptions<I, O, ParamKey> & { transport: Transport }
): {
getNextPageParam: ConnectInfiniteQueryOptions<
I,
Expand All @@ -117,7 +116,6 @@ export function createInfiniteQueryOptions<
| SkipToken;
structuralSharing: (oldData: unknown, newData: unknown) => unknown;
initialPageParam: MessageInitShape<I>[ParamKey];
queryKeyHashFn: (queryKey: QueryKey) => string;
} {
const queryKey = createConnectQueryKey({
cardinality: "infinite",
Expand All @@ -141,6 +139,5 @@ export function createInfiniteQueryOptions<
queryKey,
queryFn,
structuralSharing,
queryKeyHashFn: JSON.stringify,
};
}

0 comments on commit 98566f8

Please sign in to comment.