UNPKG

@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

56 lines 1.57 kB
import { ApolloLink } from "@apollo/client"; interface SSRMultipartLinkConfig { /** * Whether to strip fragments with `@defer` directives * from queries before sending them to the server. * * Defaults to `true`. * * Can be overwritten by adding a label starting * with either `"SsrDontStrip"` or `"SsrStrip"` to the * directive. */ stripDefer?: boolean; /** * The maximum delay in milliseconds * from receiving the first response * until the accumulated data will be flushed * and the connection will be closed. * * Defaults to `0`. */ cutoffDelay?: number; } /** * A convenient combination of `RemoveMultipartDirectivesLink` and `AccumulateMultipartResponsesLink`. * * @example * ```ts * new SSRMultipartLink({ * // Whether to strip fragments with `@defer` directives * // from queries before sending them to the server. * // * // Defaults to `true`. * // * // Can be overwritten by adding a label starting * // with either `"SsrDontStrip"` or `"SsrStrip"` to the * // directive. * stripDefer: true, * // The maximum delay in milliseconds * // from receiving the first response * // until the accumulated data will be flushed * // and the connection will be closed. * // * // Defaults to `0`. * // * cutoffDelay: 100, * }); * ``` * * @public */ export declare class SSRMultipartLink extends ApolloLink { constructor(config?: SSRMultipartLinkConfig); } export {}; //# sourceMappingURL=SSRMultipartLink.d.ts.map