Skip to main content

GraphQL Server: Apollo

Apollo Logo

Since we are hosting our GraphQL endpoint on a Vercel API route, I believe our only option is to use Apollo Server via apollo-server-micro.

Might change soon?


yarn add apollo-server-micro

Next Serverless Endpoint#

We set up the GraphQL endpoint with Apollo Server via apollo-server-micro:

import { ApolloServer } from 'apollo-server-micro'
import schema from '../../lib/api/graphql/schema'
export const config = {
api: { bodyParser: false },
export default new ApolloServer({ schema }).createHandler({
path: '/api/graphql',