diff --git a/packages/client-react-streaming/src/PreloadQuery.tsx b/packages/client-react-streaming/src/PreloadQuery.tsx index c5db2270..628d037a 100644 --- a/packages/client-react-streaming/src/PreloadQuery.tsx +++ b/packages/client-react-streaming/src/PreloadQuery.tsx @@ -35,7 +35,7 @@ export function PreloadQuery({ | (( queryRef: TransportedQueryRef, NoInfer> ) => ReactNode); -}) { +}): React.ReactElement { const preloadOptions = { ...options, fetchPolicy: "cache-first" as const, diff --git a/packages/client-react-streaming/src/registerApolloClient.tsx b/packages/client-react-streaming/src/registerApolloClient.tsx index 1d2f9051..be03c4bb 100644 --- a/packages/client-react-streaming/src/registerApolloClient.tsx +++ b/packages/client-react-streaming/src/registerApolloClient.tsx @@ -156,7 +156,7 @@ interface PreloadQueryProps interface PreloadQueryComponent { ( props: PreloadQueryProps - ): React.ReactNode; + ): React.ReactElement; } function makePreloadQuery( @@ -164,7 +164,7 @@ function makePreloadQuery( ) { return function PreloadQuery( props: PreloadQueryProps - ): React.ReactNode { + ): React.ReactElement { // we directly execute the bound component instead of returning JSX to keep the tree a bit tidier return UnboundPreloadQuery({ ...props, getClient }); };