Skip to main content

graphql

Overview of the graphql module in the sst/node package.

import { ... } from "sst/node/graphql"

The graphql module has the following exports.


Handlers

The handlers can wrap around your Lambda function handler.


GraphQLHandler

A Lambda-optimized GraphQL Yoga server that minimizes cold starts.

import { GraphQLHandler } from "sst/node/graphql";

export const handler = GraphQLHandler({
schema,
});

Options

The options passed to GraphQLHandler are used to create a GraphQL Yoga server instance. This means you can leverage the Envelop plugin system and GraphQL Tools to build your GraphQL API.