forked from enisdenjo/graphql-ws
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(server): Use uWebSockets (enisdenjo#89)
Closes enisdenjo#61 Co-authored-by: enisdenjo <badurinadenis@gmail.com>
- Loading branch information
Showing
14 changed files
with
1,052 additions
and
610 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
[graphql-ws](../README.md) / [use/uWebSockets](../modules/use_uwebsockets.md) / Extra | ||
|
||
# Interface: Extra | ||
|
||
[use/uWebSockets](../modules/use_uwebsockets.md).Extra | ||
|
||
The extra that will be put in the `Context`. | ||
|
||
## Table of contents | ||
|
||
### Properties | ||
|
||
- [request](use_uwebsockets.extra.md#request) | ||
- [socket](use_uwebsockets.extra.md#socket) | ||
|
||
## Properties | ||
|
||
### request | ||
|
||
• `Readonly` **request**: HttpRequest | ||
|
||
The initial HTTP request before the actual | ||
socket and connection is established. | ||
|
||
___ | ||
|
||
### socket | ||
|
||
• `Readonly` **socket**: WebSocket | ||
|
||
The actual socket connection between the server and the client. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
[graphql-ws](../README.md) / use/uWebSockets | ||
|
||
# Module: use/uWebSockets | ||
|
||
## Table of contents | ||
|
||
### Interfaces | ||
|
||
- [Extra](../interfaces/use_uwebsockets.extra.md) | ||
|
||
### Functions | ||
|
||
- [makeBehavior](use_uwebsockets.md#makebehavior) | ||
|
||
## Functions | ||
|
||
### makeBehavior | ||
|
||
▸ **makeBehavior**(`options`: [*ServerOptions*](../interfaces/server.serveroptions.md)<[*Extra*](../interfaces/use_uwebsockets.extra.md)\>, `behavior?`: uWS.WebSocketBehavior, `keepAlive?`: *number*): uWS.WebSocketBehavior | ||
|
||
Make the behaviour for using a [uWebSockets.js](https://github.com/uNetworking/uWebSockets.js) WebSocket server. | ||
This is a basic starter, feel free to copy the code over and adjust it to your needs | ||
|
||
#### Parameters: | ||
|
||
Name | Type | | ||
:------ | :------ | | ||
`options` | [*ServerOptions*](../interfaces/server.serveroptions.md)<[*Extra*](../interfaces/use_uwebsockets.extra.md)\> | | ||
`behavior` | uWS.WebSocketBehavior | | ||
`keepAlive` | *number* | | ||
|
||
**Returns:** uWS.WebSocketBehavior |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.