Serve
Deployment
Serverside JS Runtimes
Bun

Integration with Bun

💡

This page is currently under construction and expected to change. Please feel free to reach out to us directly in case you are having any troubles.

GraphQL Mesh provides you a cross-platform GraphQL Server. So you can easily integrate it into any platform besides Node.js. Bun is a modern JavaScript runtime like Node or Deno, and it supports Fetch API as a first class citizen. So the configuration is really simple like any other JS runtime with Mesh;

The following code is a simple example of how to use GraphQL Mesh with Bun.

import { createServeRuntime } from '@graphql-mesh/serve-runtime'
 
const serveRuntime = createServeRuntime(/* Your configuration */)
 
const server = Bun.serve({
  fetch: serveRuntime
})
 
console.info(
  `Server is running on ${new URL(
    server.graphqlEndpoint,
    `http://${server.hostname}:${server.port}`
  )}`
)