import '../middleware/types'; import type { GraphileConfig } from 'graphile-config'; import type { DocumentNode } from 'graphql'; /** * The protected root fields of the mutation that will execute: the operation * `operationName` selects, with its fragments followed. An alias, the * operation's own name and the document's other operations play no part. * `@skip`/`@include` are not evaluated, so a conditional field counts. */ export declare const protectedMutationFields: (document: DocumentNode, operationName?: string | null) => string[]; /** * CaptchaPlugin — with the tenant's `enable_captcha` on, a sign-up or * password-reset mutation executes only for a request whose * `X-Captcha-Token` the reCAPTCHA service accepts. * * The check wraps grafast's `execute`, so it sees the document grafserv * parsed and the operation about to run. An Express middleware in front of * grafserv cannot do this: grafserv reads the request body itself, so * `req.body` is not there to inspect, and the operation name a client sends * says nothing about the fields that run. A refusal is returned as the * operation's result rather than thrown: grafserv reports a throw from here * as a bare message, without the error's code. */ export declare const CaptchaPlugin: GraphileConfig.Plugin;