import { type Door } from '@fougere/core'; import type { ResponseResult } from '@fougere/http'; import { type GraphQLSchema } from 'graphql'; /** A document, its variables, and which operation of it to run. */ export interface GraphQLDocument { query?: string; variables?: Record; operationName?: string; } /** What a host hands the GraphQL door — the document still to read, so the door reads it. */ export interface GraphQLReceived { /** A POST's body, or a GET's query string. */ document: () => Promise; /** GET is the cacheable half of the protocol, so a mutation over it is refused rather than run. */ readOnly?: boolean; state: Record; /** The request's headers — what a cookie-kept state arrives in. None, and the door keeps no state. */ headers?: Headers; } /** GraphQL's door over one schema: one call per root field and per relation, all within this request. */ export declare function graphqlDoor(schema: GraphQLSchema): Door; }, ResponseResult>; //# sourceMappingURL=door.d.ts.map