Skip to content

Latest commit

 

History

History
41 lines (25 loc) · 1.1 KB

use_ws.md

File metadata and controls

41 lines (25 loc) · 1.1 KB

graphql-ws / use/ws

Module: use/ws

Table of contents

Interfaces

Functions

Server/ws

useServer

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

Type parameters

Name Type
P extends undefined | Record<string, unknown> = undefined | Record<string, unknown>
E extends Record<PropertyKey, unknown> = Record<PropertyKey, never>

Parameters

Name Type Default value
options ServerOptions<P, Extra & Partial<E>> undefined
ws WebSocketServer undefined
keepAlive number 12_000

Returns

Disposable