Skip to content

Commit e108f14

Browse files
committed
Try bun
1 parent ec486aa commit e108f14

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

federation-v1/gateways/mesh-supergraph-bun/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
FROM oven/bun:1.1.30
1+
FROM oven/bun:latest
22

33
COPY package.json ./
44
COPY .meshrc.yaml ./
55
COPY .mesh ./.mesh
6+
COPY supergraph.graphql ./
67
COPY index.ts ./
78

89
ENV PORT 4000
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
import { createBuiltMeshHTTPHandler } from './.mesh'
1+
import { createGatewayRuntime } from '@graphql-hive/gateway';
22

33
const server = Bun.serve({
44
port: Bun.env.PORT ? parseInt(Bun.env.PORT) : 4000,
5-
fetch: createBuiltMeshHTTPHandler(),
5+
fetch: (createGatewayRuntime({
6+
supergraph: () => Bun.file('./supergraph.graphql').text(),
7+
}) as any),
68
})
79

810
console.info(`Server is running on http://localhost:${server.port}/graphql`);

federation-v1/gateways/mesh-supergraph-bun/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"@graphql-mesh/http": "^0.103.0",
1313
"@graphql-mesh/store": "^0.102.0",
1414
"@graphql-mesh/types": "^0.102.0",
15+
"@graphql-hive/gateway": "1.3.0-alpha-20241021113825-68afe0a0364f9599b9937b5094a6f564ac40b14d",
1516
"bun-types": "^1.0.0"
1617
}
1718
}

0 commit comments

Comments
 (0)