graphql-ws / use/ws
▸ useServer<P
, E
>(options
, ws
, keepAlive?
): Disposable
Use the server on a ws ws server. This is a basic starter, feel free to copy the code over and adjust it to your needs
Name | Type |
---|---|
P |
extends undefined | Record <string , unknown > = undefined | Record <string , unknown > |
E |
extends Record <PropertyKey , unknown > = Record <PropertyKey , never > |
Name | Type | Default value |
---|---|---|
options |
ServerOptions <P , Extra & Partial <E >> |
undefined |
ws |
WebSocketServer |
undefined |
keepAlive |
number |
12_000 |