Overview

The Nexus server component supports two modes: "serverful" and "serverless" (experimental).

Serverless

Nexus has experimental support for serverless deployments. Support for serverless is being tracked in GitHub issue #782.

Note: API documentation for the serverless features is not yet available.

The server component of Nexus exposes HTTP request handlers:

1import { server } from 'nexus'
2
3server.handlers.graphql // call with (req, res)

Use these to handle to requests in your serverless environment:

1import { server } from 'nexus'
2
3export default (req, res) => {
4 server.handlers.graphql(req, res)
5}

See the Next.JS example for a functioning serverless reference.

Edit this page on Github