Skip to content

Commit

Permalink
fix: Update koa's integration guide for body parsing (#3670)
Browse files Browse the repository at this point in the history
* fix: Update koa's integration guide for body parsing

* fix: typo
  • Loading branch information
aryascripts authored Jan 16, 2025
1 parent 611c67a commit 537cf57
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions website/src/pages/docs/integrations/integration-with-koa.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ const yoga = createYoga<Koa.ParameterizedContext>()
// Bind GraphQL Yoga to `/graphql` endpoint
app.use(async ctx => {
// Second parameter adds Koa's context into GraphQL Context
// Make sure it is not `ctx.request` not `ctx.req`
// Because sometimes Koa parses the body and puts it in `ctx.req`
// If you use any body parsing middleware in your application,
// Make sure it is `ctx.request` and not `ctx.req`
const response = await yoga.handleNodeRequestAndResponse(ctx.request, ctx.res, ctx)

// Set status code
Expand Down

0 comments on commit 537cf57

Please sign in to comment.