Skip to content

Latest commit

 

History

History
71 lines (40 loc) · 1.32 KB

client.Client.md

File metadata and controls

71 lines (40 loc) · 1.32 KB

graphql-http / client / Client

Interface: Client

client.Client

Table of contents

Properties

Methods

Properties

dispose

dispose: () => void

Type declaration

▸ (): void

Dispose of the client, cancel all active requests and clean up resources.

Returns

void

Methods

subscribe

subscribe<Data, Extensions>(request, sink): () => void

Subscribes to receive a response by making an HTTP request.

It uses the sink to emit the received data or errors. Returns a dispose function used for canceling active requests and cleaning up.

Type parameters

Name Type
Data Record<string, unknown>
Extensions unknown

Parameters

Name Type
request RequestParams
sink Sink<ExecutionResult<Data, Extensions>>

Returns

fn

▸ (): void

Subscribes to receive a response by making an HTTP request.

It uses the sink to emit the received data or errors. Returns a dispose function used for canceling active requests and cleaning up.

Returns

void