v2.3.0
2.3.0 (2023-09-07)
Features
Examples
Server usage with Koa
import Koa from 'koa'; // yarn add koa
import mount from 'koa-mount'; // yarn add koa-mount
import { createHandler } from 'graphql-sse/lib/use/koa';
import { schema } from './my-graphql';
// Create a Koa app
const app = new Koa();
// Serve all methods on `/graphql/stream`
app.use(mount('/graphql/stream', createHandler({ schema })));
app.listen({ port: 4000 });
console.log('Listening to port 4000');