@apollo/client-react-streaming
Version:
This package provides building blocks to create framework-level integration of Apollo Client with React's streaming SSR. See the [@apollo/client-integration-nextjs](https://github.com/apollographql/apollo-client-integrations/tree/main/packages/nextjs) pac
18 lines • 1.23 kB
TypeScript
import type { ApolloClient, DocumentNode, OperationVariables, TypedDocumentNode } from "@apollo/client";
import type { ReactNode } from "react";
import React from "react";
import type { PreloadTransportedQueryOptions, TransportedQueryRef } from "./transportedQueryRef.js";
/** @deprecated use `PreloadQuery.Options` instead */
export type PreloadQueryOptions<TVariables extends OperationVariables, TData> = PreloadQuery.Options<TData, TVariables>;
export declare namespace PreloadQuery {
type Options<TData, TVariables extends OperationVariables> = PreloadTransportedQueryOptions<TData, TVariables> & {
query: DocumentNode | TypedDocumentNode<TData, TVariables>;
};
type Props<TData, TVariables extends OperationVariables> = PreloadQuery.Options<TData, TVariables> & {
children: ReactNode | ((queryRef: TransportedQueryRef<NoInfer<TData>, NoInfer<TVariables>>) => ReactNode);
};
}
export declare function PreloadQuery<TData, TVariables extends OperationVariables>({ getClient, children, query, ...transportedOptions }: PreloadQuery.Props<TData, TVariables> & {
getClient: () => ApolloClient | Promise<ApolloClient>;
}): Promise<React.ReactElement>;
//# sourceMappingURL=PreloadQuery.d.ts.map