@benzene/ws
TypeScript icon, indicating that this package has built-in type declarations

0.7.2 • Public • Published

@benzene/ws

npm CI codecov PRs Welcome

Fast and simple GraphQL over WebSocket implementing the upcoming GraphQL over WebSocket Protocol.

Installation

npm i graphql @benzene/ws

Usage

import * as WebSocket from "ws";
import { Benzene, makeHandler } from "@benzene/ws";

const GQL = new Benzene({ schema });

const wss = new WebSocket.Server({ path: "/graphql", port: 3000 });
wss.on("connection", makeHandler(GQL, options));

Documentation

Documentation is available at benzene.vercel.app. Check out examples for integrations with different server libraries.

Package Sidebar

Install

npm i @benzene/ws

Weekly Downloads

252

Version

0.7.2

License

MIT

Unpacked Size

19.8 kB

Total Files

9

Last publish

Collaborators

  • hoangvvo