Recommend Hive GW CLI for Bun (#6074)

Co-authored-by: Kamil Kisiela <kamil.kisiela@gmail.com>
This commit is contained in:
Arda TANRIKULU 2024-12-19 05:55:18 -05:00 committed by GitHub
parent b4a75fcc31
commit d1e5f03937
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 15 additions and 1 deletions

View file

@ -13,7 +13,16 @@ platform besides Node.js. [Bun](https://bun.sh) is a modern JavaScript runtime l
and it supports Fetch API as a first class citizen. So the configuration is really simple like any
other JS runtime with Hive Gateway;
The following code is a simple example of how to use Hive Gateway with Bun.
## Hive Gateway CLI
You can follow the introduction page directly to [use Hive Gateway CLI](/docs/gateway#installation).
Since Bun has the compatibility layer for Node.js, all Node specific features are available in Bun.
## Hive Gateway Runtime
Use this method only if you know what you are doing. It is recommended to use Hive Gateway CLI for
most cases.
```ts
import { createGatewayRuntime } from '@graphql-hive/gateway-runtime'

View file

@ -83,6 +83,11 @@ environment. Then, you can install Hive Gateway CLI with your preferred package
npm i @graphql-hive/gateway
```
<Callout>
You can also use [Bun](https://bun.sh) as a runtime to run the JavaScript package with the same
installation steps.
</Callout>
</Tabs.Tab>
</Tabs>