Skip to content

Commit

Permalink
Recommend Hive GW CLI for Bun (#6074)
Browse files Browse the repository at this point in the history
Co-authored-by: Kamil Kisiela <kamil.kisiela@gmail.com>
  • Loading branch information
ardatan and kamilkisiela authored Dec 19, 2024
1 parent b4a75fc commit d1e5f03
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
5 changes: 5 additions & 0 deletions packages/web/docs/src/pages/docs/gateway/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit d1e5f03

Please sign in to comment.