Skip to content

Commit 749dc8e

Browse files
committed
Enable JIT
1 parent e108f14 commit 749dc8e

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed
Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
import { createGatewayRuntime } from '@graphql-hive/gateway';
2+
import { useJIT } from '@graphql-mesh/plugin-jit';
23

34
const server = Bun.serve({
45
port: Bun.env.PORT ? parseInt(Bun.env.PORT) : 4000,
5-
fetch: (createGatewayRuntime({
6+
fetch: (createGatewayRuntime as any)({
67
supergraph: () => Bun.file('./supergraph.graphql').text(),
7-
}) as any),
8+
plugins: () => [
9+
useJIT(),
10+
]
11+
}),
812
})
913

1014
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
@@ -13,6 +13,7 @@
1313
"@graphql-mesh/store": "^0.102.0",
1414
"@graphql-mesh/types": "^0.102.0",
1515
"@graphql-hive/gateway": "1.3.0-alpha-20241021113825-68afe0a0364f9599b9937b5094a6f564ac40b14d",
16+
"@graphql-mesh/plugin-jit": "0.0.1-alpha-20241021113825-68afe0a0364f9599b9937b5094a6f564ac40b14d",
1617
"bun-types": "^1.0.0"
1718
}
1819
}

0 commit comments

Comments
 (0)