diff --git a/integration-test/nextjs/src/app/rsc/dynamic/PreloadQuery/queryRef-refTest/page.tsx b/integration-test/nextjs/src/app/rsc/dynamic/PreloadQuery/queryRef-refTest/page.tsx index 4566c376..9315e936 100644 --- a/integration-test/nextjs/src/app/rsc/dynamic/PreloadQuery/queryRef-refTest/page.tsx +++ b/integration-test/nextjs/src/app/rsc/dynamic/PreloadQuery/queryRef-refTest/page.tsx @@ -13,14 +13,12 @@ export default function Page() {
{(queryRef1) => ( @@ -31,14 +29,12 @@ export default function Page() { )} {(queryRef2) => ( diff --git a/integration-test/nextjs/src/app/rsc/dynamic/PreloadQuery/queryRef-useReadQuery/page.tsx b/integration-test/nextjs/src/app/rsc/dynamic/PreloadQuery/queryRef-useReadQuery/page.tsx index 93061b61..ee7de02d 100644 --- a/integration-test/nextjs/src/app/rsc/dynamic/PreloadQuery/queryRef-useReadQuery/page.tsx +++ b/integration-test/nextjs/src/app/rsc/dynamic/PreloadQuery/queryRef-useReadQuery/page.tsx @@ -10,12 +10,10 @@ export default function Page({ searchParams }: { searchParams?: any }) { return ( {(queryRef) => ( diff --git a/integration-test/nextjs/src/app/rsc/dynamic/PreloadQuery/useSuspenseQuery/page.tsx b/integration-test/nextjs/src/app/rsc/dynamic/PreloadQuery/useSuspenseQuery/page.tsx index 1644506c..ea2e632d 100644 --- a/integration-test/nextjs/src/app/rsc/dynamic/PreloadQuery/useSuspenseQuery/page.tsx +++ b/integration-test/nextjs/src/app/rsc/dynamic/PreloadQuery/useSuspenseQuery/page.tsx @@ -10,12 +10,10 @@ export default function Page({ searchParams }: { searchParams?: any }) { return ( loading}> diff --git a/packages/client-react-streaming/src/PreloadQuery.tsx b/packages/client-react-streaming/src/PreloadQuery.tsx index f7fffbb3..ffcc1cd0 100644 --- a/packages/client-react-streaming/src/PreloadQuery.tsx +++ b/packages/client-react-streaming/src/PreloadQuery.tsx @@ -25,11 +25,10 @@ export type PreloadQueryOptions = QueryOptions< RestrictedPreloadOptions; export function PreloadQuery({ - options, getClient, children, -}: { - options: PreloadQueryOptions; + ...options +}: PreloadQueryOptions & { getClient: () => ApolloClient | Promise>; children: | ReactNode diff --git a/packages/client-react-streaming/src/registerApolloClient.tsx b/packages/client-react-streaming/src/registerApolloClient.tsx index b5eaae2c..d171cad7 100644 --- a/packages/client-react-streaming/src/registerApolloClient.tsx +++ b/packages/client-react-streaming/src/registerApolloClient.tsx @@ -144,8 +144,8 @@ return a new instance every time \`makeClient\` is called. return getClient; } -interface PreloadQueryProps { - options: PreloadQueryOptions; +interface PreloadQueryProps + extends PreloadQueryOptions { children: | ReactNode | ((