Skip to content

Commit

Permalink
await using in cf workers is not supported
Browse files Browse the repository at this point in the history
  • Loading branch information
enisdenjo committed Nov 18, 2024
1 parent c10b333 commit a9cc321
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,16 @@ import http from '@graphql-mesh/transport-http'
import supergraph from './supergraph'

export default {
async fetch(request, env, ctx) {
await using gateway = createGatewayRuntime({
fetch(request, env, ctx) {
const gateway = createGatewayRuntime({
// All options available in `gateway.config.ts` configuration can also be passed here.
supergraph,
transports: {
http // http transport is required for subgraphs using standard GraphQL over HTTP.
}
})
return await gateway(request, env, ctx)
ctx.waitUntil(gateway[Symbol.asyncDispose]())
return gateway(request, env, ctx)
}
}
```
Expand Down

0 comments on commit a9cc321

Please sign in to comment.