Skip to content

Latest commit

 

History

History
68 lines (41 loc) · 1.63 KB

server.md

File metadata and controls

68 lines (41 loc) · 1.63 KB

graphql-ws / server

Module: server

Table of contents

Interfaces

Type aliases

Functions

Server

GraphQLExecutionContextValue

Ƭ GraphQLExecutionContextValue: object | symbol | number | string | boolean | undefined | null

A concrete GraphQL execution context value type.

Mainly used because TypeScript collapes unions with any or unknown to any or unknown. So, we use a custom type to allow definitions such as the context server option.


OperationResult

Ƭ OperationResult: Promise<AsyncIterableIterator<ExecutionResult> | ExecutionResult> | AsyncIterableIterator<ExecutionResult> | ExecutionResult


makeServer

makeServer<E>(options): Server<E>

Makes a Protocol complient WebSocket GraphQL server. The server is actually an API which is to be used with your favourite WebSocket server library!

Read more about the Protocol in the PROTOCOL.md documentation file.

Type parameters

Name Type
E E = unknown

Parameters

Name Type
options ServerOptions<E>

Returns

Server<E>