/** * Accept-Language middleware for PostGraphile v5 * * Parses the Accept-Language header and injects `langCodes` into the * GraphQL context so the i18n plugin can resolve the best translation. */ export interface I18nMiddlewareOptions { /** * Supported languages for Accept-Language negotiation. * @default ['en'] */ supportedLanguages?: string[]; } /** * PostGraphile v5 additionalGraphQLContextFromRequest function. * * Parses Accept-Language and injects `langCodes` into the GraphQL context. * * @example * ```typescript * import { makeI18nContext } from 'graphile-i18n'; * * const preset = { * grafast: { * context: makeI18nContext({ supportedLanguages: ['en', 'es', 'fr'] }), * }, * }; * ``` */ export declare function makeI18nContext(options?: I18nMiddlewareOptions): (req: any, _res: any) => Promise<{ langCodes: string[]; }>; /** * Convenience export matching the v4 API signature. */ export declare const additionalGraphQLContextFromRequest: (req: any, _res: any) => Promise<{ langCodes: string[]; }>;