import { MeshInstance } from 'meshql-core'; import { FastifyPluginAsync } from 'fastify'; /** * Fastify plugin for MeshQL HTTP endpoints. * * @module * * @example * ```ts * import Fastify from "fastify"; * import { createMesh } from "meshql-core"; * import { createMeshFastifyPlugin } from "meshql-http/fastify"; * * const app = Fastify(); * await app.register(createMeshFastifyPlugin(createMesh({ entities: {} }))); * ``` */ /** Options for the MeshQL Fastify plugin. */ interface MeshFastifyOptions { basePath?: string; /** Max multipart upload size in bytes. Default 25 MiB. */ maxUploadBytes?: number; } /** Create a Fastify plugin that serves MeshQL routes. */ declare function createMeshFastifyPlugin(mesh: MeshInstance, options?: MeshFastifyOptions): FastifyPluginAsync; export { type MeshFastifyOptions, createMeshFastifyPlugin };