Documentation
Modules
client

Module: client

Classes

Interfaces

Client

createClient

createClient<SingleConnection>(options): Client<SingleConnection>

Creates a disposable GraphQL over SSE client to transmit GraphQL operation results.

If you have an HTTP/2 server, it is recommended to use the client in “distinct connections mode” (singleConnection = false) which will create a new SSE connection for each subscribe. This is the default.

However, when dealing with HTTP/1 servers from a browser, consider using the “single connection mode” (singleConnection = true) which will use only one SSE connection.

Type parameters

NameType
SingleConnectionextends boolean = false

Parameters

NameType
optionsClientOptions<SingleConnection>

Returns

Client<SingleConnection>

Defined in

src/client.ts:272

Other

ExecutionPatchResult

Re-exports ExecutionPatchResult


ExecutionResult

Re-exports ExecutionResult


RequestParams

Re-exports RequestParams


Sink

Re-exports Sink


StreamData

Re-exports StreamData


StreamDataForID

Re-exports StreamDataForID


StreamEvent

Re-exports StreamEvent


StreamMessage

Re-exports StreamMessage


TOKEN_HEADER_KEY

Re-exports TOKEN_HEADER_KEY


TOKEN_QUERY_KEY

Re-exports TOKEN_QUERY_KEY


isAsyncGenerator

Re-exports isAsyncGenerator


isAsyncIterable

Re-exports isAsyncIterable


parseStreamData

Re-exports parseStreamData


print

Re-exports print


validateStreamEvent

Re-exports validateStreamEvent