Skip to content

v2.3.0

Compare
Choose a tag to compare
@enisdenjo enisdenjo released this 07 Sep 20:28
· 37 commits to master since this release

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');