@benzene/ws
v0.7.2
Published
Fast, minimal, agnostic GraphQL over WebSockets
Downloads
29
Maintainers
Readme
@benzene/ws
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.