Skip to content

Commit

Permalink
docs: generate
Browse files Browse the repository at this point in the history
  • Loading branch information
enisdenjo committed Sep 10, 2020
1 parent d45c8df commit 87c3b41
Show file tree
Hide file tree
Showing 20 changed files with 161 additions and 57 deletions.
12 changes: 6 additions & 6 deletions docs/enums/_message_.messagetype.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,44 +21,44 @@ Types of messages allowed to be sent by the client/server over the WS protocol.

**Complete**: = "complete"

*Defined in [message.ts:24](https://github.com/enisdenjo/graphql-transport-ws/blob/1c0bdce/src/message.ts#L24)*
*Defined in [message.ts:24](https://github.com/enisdenjo/graphql-transport-ws/blob/d45c8df/src/message.ts#L24)*

___

### ConnectionAck

**ConnectionAck**: = "connection_ack"

*Defined in [message.ts:19](https://github.com/enisdenjo/graphql-transport-ws/blob/1c0bdce/src/message.ts#L19)*
*Defined in [message.ts:19](https://github.com/enisdenjo/graphql-transport-ws/blob/d45c8df/src/message.ts#L19)*

___

### ConnectionInit

**ConnectionInit**: = "connection_init"

*Defined in [message.ts:18](https://github.com/enisdenjo/graphql-transport-ws/blob/1c0bdce/src/message.ts#L18)*
*Defined in [message.ts:18](https://github.com/enisdenjo/graphql-transport-ws/blob/d45c8df/src/message.ts#L18)*

___

### Error

**Error**: = "error"

*Defined in [message.ts:23](https://github.com/enisdenjo/graphql-transport-ws/blob/1c0bdce/src/message.ts#L23)*
*Defined in [message.ts:23](https://github.com/enisdenjo/graphql-transport-ws/blob/d45c8df/src/message.ts#L23)*

___

### Next

**Next**: = "next"

*Defined in [message.ts:22](https://github.com/enisdenjo/graphql-transport-ws/blob/1c0bdce/src/message.ts#L22)*
*Defined in [message.ts:22](https://github.com/enisdenjo/graphql-transport-ws/blob/d45c8df/src/message.ts#L22)*

___

### Subscribe

**Subscribe**: = "subscribe"

*Defined in [message.ts:21](https://github.com/enisdenjo/graphql-transport-ws/blob/1c0bdce/src/message.ts#L21)*
*Defined in [message.ts:21](https://github.com/enisdenjo/graphql-transport-ws/blob/d45c8df/src/message.ts#L21)*
30 changes: 28 additions & 2 deletions docs/interfaces/_client_.client.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

### Methods

* [on](_client_.client.md#on)
* [subscribe](_client_.client.md#subscribe)

## Properties
Expand All @@ -26,7 +27,7 @@

*Inherited from [Disposable](_types_.disposable.md).[dispose](_types_.disposable.md#dispose)*

*Defined in [types.ts:17](https://github.com/enisdenjo/graphql-transport-ws/blob/1c0bdce/src/types.ts#L17)*
*Defined in [types.ts:17](https://github.com/enisdenjo/graphql-transport-ws/blob/d45c8df/src/types.ts#L17)*

Dispose of the instance and clear up resources.

Expand All @@ -36,11 +37,36 @@ Dispose of the instance and clear up resources.

## Methods

### on

**on****E**›(`event`: E, `listener`: [EventListener](../modules/_client_.md#eventlistener)‹E›): *function*

*Defined in [client.ts:69](https://github.com/enisdenjo/graphql-transport-ws/blob/d45c8df/src/client.ts#L69)*

Listens on the client which dispatches events about the socket state.

**Type parameters:**

**E**: *[Event](../modules/_client_.md#event)*

**Parameters:**

Name | Type |
------ | ------ |
`event` | E |
`listener` | [EventListener](../modules/_client_.md#eventlistener)‹E› |

**Returns:** *function*

▸ (): *void*

___

### subscribe

**subscribe****T**›(`payload`: [SubscribePayload](_message_.subscribepayload.md), `sink`: [Sink](_types_.sink.md)‹T›): *function*

*Defined in [client.ts:51](https://github.com/enisdenjo/graphql-transport-ws/blob/1c0bdce/src/client.ts#L51)*
*Defined in [client.ts:75](https://github.com/enisdenjo/graphql-transport-ws/blob/d45c8df/src/client.ts#L75)*

Subscribes through the WebSocket following the config parameters. It
uses the `sink` to emit received data or errors. Returns a _cleanup_
Expand Down
24 changes: 19 additions & 5 deletions docs/interfaces/_client_.clientoptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Configuration used for the `create` client function.

* [connectionParams](_client_.clientoptions.md#optional-connectionparams)
* [lazy](_client_.clientoptions.md#optional-lazy)
* [on](_client_.clientoptions.md#optional-on)
* [retryAttempts](_client_.clientoptions.md#optional-retryattempts)
* [retryTimeout](_client_.clientoptions.md#optional-retrytimeout)
* [url](_client_.clientoptions.md#url)
Expand All @@ -24,7 +25,7 @@ Configuration used for the `create` client function.

**connectionParams**? : *Record‹string, unknown› | function*

*Defined in [client.ts:26](https://github.com/enisdenjo/graphql-transport-ws/blob/1c0bdce/src/client.ts#L26)*
*Defined in [client.ts:39](https://github.com/enisdenjo/graphql-transport-ws/blob/d45c8df/src/client.ts#L39)*

Optional parameters that the client specifies when establishing a connection with the server.

Expand All @@ -34,7 +35,7 @@ ___

**lazy**? : *undefined | false | true*

*Defined in [client.ts:32](https://github.com/enisdenjo/graphql-transport-ws/blob/1c0bdce/src/client.ts#L32)*
*Defined in [client.ts:45](https://github.com/enisdenjo/graphql-transport-ws/blob/d45c8df/src/client.ts#L45)*

Should the connection be established immediately and persisted
or after the first listener subscribed.
Expand All @@ -43,11 +44,24 @@ or after the first listener subscribed.

___

### `Optional` on

**on**? : *Partial‹object›*

*Defined in [client.ts:62](https://github.com/enisdenjo/graphql-transport-ws/blob/d45c8df/src/client.ts#L62)*

Register listeners before initialising the client. This way
you can ensure to catch all client relevant emitted events.
The listeners passed in will **always** be the first ones
to get the emitted event before other registered listeners.

___

### `Optional` retryAttempts

**retryAttempts**? : *undefined | number*

*Defined in [client.ts:37](https://github.com/enisdenjo/graphql-transport-ws/blob/1c0bdce/src/client.ts#L37)*
*Defined in [client.ts:50](https://github.com/enisdenjo/graphql-transport-ws/blob/d45c8df/src/client.ts#L50)*

How many times should the client try to reconnect on abnormal socket closure before it errors out?

Expand All @@ -59,7 +73,7 @@ ___

**retryTimeout**? : *undefined | number*

*Defined in [client.ts:42](https://github.com/enisdenjo/graphql-transport-ws/blob/1c0bdce/src/client.ts#L42)*
*Defined in [client.ts:55](https://github.com/enisdenjo/graphql-transport-ws/blob/d45c8df/src/client.ts#L55)*

How long should the client wait until attempting to retry.

Expand All @@ -71,6 +85,6 @@ ___

**url**: *string*

*Defined in [client.ts:24](https://github.com/enisdenjo/graphql-transport-ws/blob/1c0bdce/src/client.ts#L24)*
*Defined in [client.ts:37](https://github.com/enisdenjo/graphql-transport-ws/blob/d45c8df/src/client.ts#L37)*

URL of the GraphQL server to connect.
4 changes: 2 additions & 2 deletions docs/interfaces/_message_.completemessage.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@

**id**: *string*

*Defined in [message.ts:61](https://github.com/enisdenjo/graphql-transport-ws/blob/1c0bdce/src/message.ts#L61)*
*Defined in [message.ts:61](https://github.com/enisdenjo/graphql-transport-ws/blob/d45c8df/src/message.ts#L61)*

___

### `Readonly` type

**type**: *[Complete](../enums/_message_.messagetype.md#complete)*

*Defined in [message.ts:62](https://github.com/enisdenjo/graphql-transport-ws/blob/1c0bdce/src/message.ts#L62)*
*Defined in [message.ts:62](https://github.com/enisdenjo/graphql-transport-ws/blob/d45c8df/src/message.ts#L62)*
2 changes: 1 addition & 1 deletion docs/interfaces/_message_.connectionackmessage.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@

**type**: *[ConnectionAck](../enums/_message_.messagetype.md#connectionack)*

*Defined in [message.ts:33](https://github.com/enisdenjo/graphql-transport-ws/blob/1c0bdce/src/message.ts#L33)*
*Defined in [message.ts:33](https://github.com/enisdenjo/graphql-transport-ws/blob/d45c8df/src/message.ts#L33)*
4 changes: 2 additions & 2 deletions docs/interfaces/_message_.connectioninitmessage.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@

**payload**? : *Record‹string, unknown›*

*Defined in [message.ts:29](https://github.com/enisdenjo/graphql-transport-ws/blob/1c0bdce/src/message.ts#L29)*
*Defined in [message.ts:29](https://github.com/enisdenjo/graphql-transport-ws/blob/d45c8df/src/message.ts#L29)*

___

### `Readonly` type

**type**: *[ConnectionInit](../enums/_message_.messagetype.md#connectioninit)*

*Defined in [message.ts:28](https://github.com/enisdenjo/graphql-transport-ws/blob/1c0bdce/src/message.ts#L28)*
*Defined in [message.ts:28](https://github.com/enisdenjo/graphql-transport-ws/blob/d45c8df/src/message.ts#L28)*
6 changes: 3 additions & 3 deletions docs/interfaces/_message_.errormessage.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,20 @@

**id**: *string*

*Defined in [message.ts:55](https://github.com/enisdenjo/graphql-transport-ws/blob/1c0bdce/src/message.ts#L55)*
*Defined in [message.ts:55](https://github.com/enisdenjo/graphql-transport-ws/blob/d45c8df/src/message.ts#L55)*

___

### `Readonly` payload

**payload**: *readonly GraphQLError[]*

*Defined in [message.ts:57](https://github.com/enisdenjo/graphql-transport-ws/blob/1c0bdce/src/message.ts#L57)*
*Defined in [message.ts:57](https://github.com/enisdenjo/graphql-transport-ws/blob/d45c8df/src/message.ts#L57)*

___

### `Readonly` type

**type**: *[Error](../enums/_message_.messagetype.md#error)*

*Defined in [message.ts:56](https://github.com/enisdenjo/graphql-transport-ws/blob/1c0bdce/src/message.ts#L56)*
*Defined in [message.ts:56](https://github.com/enisdenjo/graphql-transport-ws/blob/d45c8df/src/message.ts#L56)*
6 changes: 3 additions & 3 deletions docs/interfaces/_message_.nextmessage.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,20 @@

**id**: *string*

*Defined in [message.ts:49](https://github.com/enisdenjo/graphql-transport-ws/blob/1c0bdce/src/message.ts#L49)*
*Defined in [message.ts:49](https://github.com/enisdenjo/graphql-transport-ws/blob/d45c8df/src/message.ts#L49)*

___

### `Readonly` payload

**payload**: *ExecutionResult*

*Defined in [message.ts:51](https://github.com/enisdenjo/graphql-transport-ws/blob/1c0bdce/src/message.ts#L51)*
*Defined in [message.ts:51](https://github.com/enisdenjo/graphql-transport-ws/blob/d45c8df/src/message.ts#L51)*

___

### `Readonly` type

**type**: *[Next](../enums/_message_.messagetype.md#next)*

*Defined in [message.ts:50](https://github.com/enisdenjo/graphql-transport-ws/blob/1c0bdce/src/message.ts#L50)*
*Defined in [message.ts:50](https://github.com/enisdenjo/graphql-transport-ws/blob/d45c8df/src/message.ts#L50)*
6 changes: 3 additions & 3 deletions docs/interfaces/_message_.subscribemessage.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,20 @@

**id**: *string*

*Defined in [message.ts:37](https://github.com/enisdenjo/graphql-transport-ws/blob/1c0bdce/src/message.ts#L37)*
*Defined in [message.ts:37](https://github.com/enisdenjo/graphql-transport-ws/blob/d45c8df/src/message.ts#L37)*

___

### `Readonly` payload

**payload**: *[SubscribePayload](_message_.subscribepayload.md)*

*Defined in [message.ts:39](https://github.com/enisdenjo/graphql-transport-ws/blob/1c0bdce/src/message.ts#L39)*
*Defined in [message.ts:39](https://github.com/enisdenjo/graphql-transport-ws/blob/d45c8df/src/message.ts#L39)*

___

### `Readonly` type

**type**: *[Subscribe](../enums/_message_.messagetype.md#subscribe)*

*Defined in [message.ts:38](https://github.com/enisdenjo/graphql-transport-ws/blob/1c0bdce/src/message.ts#L38)*
*Defined in [message.ts:38](https://github.com/enisdenjo/graphql-transport-ws/blob/d45c8df/src/message.ts#L38)*
6 changes: 3 additions & 3 deletions docs/interfaces/_message_.subscribepayload.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,20 @@

**operationName**: *string*

*Defined in [message.ts:43](https://github.com/enisdenjo/graphql-transport-ws/blob/1c0bdce/src/message.ts#L43)*
*Defined in [message.ts:43](https://github.com/enisdenjo/graphql-transport-ws/blob/d45c8df/src/message.ts#L43)*

___

### `Readonly` query

**query**: *string | DocumentNode*

*Defined in [message.ts:44](https://github.com/enisdenjo/graphql-transport-ws/blob/1c0bdce/src/message.ts#L44)*
*Defined in [message.ts:44](https://github.com/enisdenjo/graphql-transport-ws/blob/d45c8df/src/message.ts#L44)*

___

### `Readonly` variables

**variables**: *Record‹string, unknown›*

*Defined in [message.ts:45](https://github.com/enisdenjo/graphql-transport-ws/blob/1c0bdce/src/message.ts#L45)*
*Defined in [message.ts:45](https://github.com/enisdenjo/graphql-transport-ws/blob/d45c8df/src/message.ts#L45)*
12 changes: 6 additions & 6 deletions docs/interfaces/_server_.context.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

**acknowledged**: *boolean*

*Defined in [server.ts:163](https://github.com/enisdenjo/graphql-transport-ws/blob/1c0bdce/src/server.ts#L163)*
*Defined in [server.ts:172](https://github.com/enisdenjo/graphql-transport-ws/blob/d45c8df/src/server.ts#L172)*

Indicates that the connection was acknowledged
by having dispatched the `ConnectionAck` message
Expand All @@ -35,7 +35,7 @@ ___

**connectionInitReceived**: *boolean*

*Defined in [server.ts:157](https://github.com/enisdenjo/graphql-transport-ws/blob/1c0bdce/src/server.ts#L157)*
*Defined in [server.ts:166](https://github.com/enisdenjo/graphql-transport-ws/blob/d45c8df/src/server.ts#L166)*

Indicates that the `ConnectionInit` message
has been received by the server. If this is
Expand All @@ -48,7 +48,7 @@ ___

**connectionParams**? : *Readonly‹Record‹string, unknown››*

*Defined in [server.ts:165](https://github.com/enisdenjo/graphql-transport-ws/blob/1c0bdce/src/server.ts#L165)*
*Defined in [server.ts:174](https://github.com/enisdenjo/graphql-transport-ws/blob/d45c8df/src/server.ts#L174)*

The parameters passed during the connection initialisation.

Expand All @@ -58,7 +58,7 @@ ___

**request**: *IncomingMessage*

*Defined in [server.ts:150](https://github.com/enisdenjo/graphql-transport-ws/blob/1c0bdce/src/server.ts#L150)*
*Defined in [server.ts:159](https://github.com/enisdenjo/graphql-transport-ws/blob/d45c8df/src/server.ts#L159)*

The initial HTTP request before the actual
socket and connection is established.
Expand All @@ -69,7 +69,7 @@ ___

**socket**: *WebSocket*

*Defined in [server.ts:145](https://github.com/enisdenjo/graphql-transport-ws/blob/1c0bdce/src/server.ts#L145)*
*Defined in [server.ts:154](https://github.com/enisdenjo/graphql-transport-ws/blob/d45c8df/src/server.ts#L154)*

The actual WebSocket connection between the server and the client.

Expand All @@ -79,7 +79,7 @@ ___

**subscriptions**: *Record‹[UUID](../modules/_types_.md#uuid), AsyncIterator‹unknown››*

*Defined in [server.ts:171](https://github.com/enisdenjo/graphql-transport-ws/blob/1c0bdce/src/server.ts#L171)*
*Defined in [server.ts:180](https://github.com/enisdenjo/graphql-transport-ws/blob/d45c8df/src/server.ts#L180)*

Holds the active subscriptions for this context.
Subscriptions are for `subscription` operations **only**,
Expand Down
4 changes: 2 additions & 2 deletions docs/interfaces/_server_.server.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

*Inherited from [Disposable](_types_.disposable.md).[dispose](_types_.disposable.md#dispose)*

*Defined in [types.ts:17](https://github.com/enisdenjo/graphql-transport-ws/blob/1c0bdce/src/types.ts#L17)*
*Defined in [types.ts:17](https://github.com/enisdenjo/graphql-transport-ws/blob/d45c8df/src/types.ts#L17)*

Dispose of the instance and clear up resources.

Expand All @@ -37,4 +37,4 @@ ___

**webSocketServer**: *Server*

*Defined in [server.ts:175](https://github.com/enisdenjo/graphql-transport-ws/blob/1c0bdce/src/server.ts#L175)*
*Defined in [server.ts:184](https://github.com/enisdenjo/graphql-transport-ws/blob/d45c8df/src/server.ts#L184)*
Loading

0 comments on commit 87c3b41

Please sign in to comment.