DEV Community

loading...

Discussion on: Create a serverless API with TypeScript, GraphQL and MongoDB

Collapse
jossdz profile image
Jose Carlos Correa

Does this exact example may fit in a next route api ?
Do you have an example about how to test this?

Collapse
akhilaariyachandra profile image
Akhila Ariyachandra Author

Yes you can use this in a Next.js API route. Just make sure to this to the end of the graphql.ts file.

export const config = {
  api: {
    bodyParser: false,
  },
}
Collapse
jossdz profile image
Jose Carlos Correa

Thank you !

I'm having an issue with the deploy, hope to fix it soon.