import type { NextApiRequest, NextApiResponse } from 'next' import { apolloServer } from 'web/lib/api/graphql' const startServer = apolloServer.start() export const config = { api: { bodyParser: false, }, } export default async function handler( req: NextApiRequest, res: NextApiResponse ) { await startServer await apolloServer.createHandler({ path: '/api/graphql', })(req, res) }