diff options
| author | netop://ウィビ <paul@webb.page> | 2026-05-03 12:40:04 -0700 |
|---|---|---|
| committer | netop://ウィビ <paul@webb.page> | 2026-05-03 12:40:04 -0700 |
| commit | 52ee736bd2ac407952863c8e8397770bf1495a45 (patch) | |
| tree | f982218600682f7714a5a5157e940acc0e0e8a13 /source/utility | |
| parent | 83f2352fef7dc93396e3cf8f224acba271f1ef9d (diff) | |
| download | gq-52ee736bd2ac407952863c8e8397770bf1495a45.tar.gz gq-52ee736bd2ac407952863c8e8397770bf1495a45.zip | |
adds support for subscriptions
Diffstat (limited to 'source/utility')
| -rwxr-xr-x | source/utility/types.ts | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/utility/types.ts b/source/utility/types.ts index 0d8b443..2311c25 100755 --- a/source/utility/types.ts +++ b/source/utility/types.ts @@ -41,6 +41,12 @@ export interface GQLOptions<Context, Req extends GQLRequest = GQLRequest> extend playgroundOptions?: Omit<RenderPageOptions, "endpoint">; /** The executable schema to query against. */ schema: GraphQLSchema; + /** + * WebSocket subscription handler returned by `GraphQLWS()`. When set, any + * incoming request with `Upgrade: websocket` is delegated to it before HTTP + * content negotiation runs. + */ + subscriptions?: (request: Request) => Response; } /** A single GraphQL operation — either a `query` or a `mutation`, never both. */ |