Skip to main content

Lambda

THIS INTEGRATION IS EXPERIMENTAL. PRs improving it are welcome.

Grafserv supports the following AWS lambda configurations:

AWS API Gateway v2

To deploy Grafserv in API Gateway v2:

import { grafserv } from "grafserv/lambda/v1";
import preset from "./graphile.config.mjs";
import schema from "./schema.mjs";

// Create a Grafserv instance
const serv = grafserv({ schema, preset });

// Export a lambda handler for GraphQL
export const handler = serv.createHandler();