import type { FastifyInstance } from 'fastify'; import type { GraphQLYogaOptions } from '@cedarjs/graphql-server'; export interface CedarFastifyGraphQLOptions { cedar: { apiRootPath?: string; graphql?: GraphQLYogaOptions; configureServer?: (server: FastifyInstance) => void | Promise; }; } export declare function cedarFastifyGraphQLServer(fastify: FastifyInstance, options: CedarFastifyGraphQLOptions): Promise; /** * Detects errors that indicate the client disconnected before the response * finished, rather than a genuine server-side failure. * * `ERR_STREAM_PREMATURE_CLOSE` can surface from the underlying Node stream * closing early. The `DOMException` named `AbortError` is thrown by Yoga * when the AbortSignal wired up in `createFetchRequest`'s * `reply.raw.on('close', ...)` handler is aborted, which only happens when * the client itself has gone away. * * The `DOMException` check (rather than just `name === 'AbortError'`) is * deliberate: a resolver or hook could throw a plain `Error` renamed to * `AbortError`, which would otherwise be misclassified as a benign * disconnect and hide a real server-side failure behind a 499. */ export declare function isClientDisconnectError(e: unknown): boolean; //# sourceMappingURL=graphql.d.ts.map