From 52ee736bd2ac407952863c8e8397770bf1495a45 Mon Sep 17 00:00:00 2001 From: "netop://ウィビ" Date: Sun, 3 May 2026 12:40:04 -0700 Subject: adds support for subscriptions --- source/utility/types.ts | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'source/utility/types.ts') 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 extend playgroundOptions?: Omit; /** 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. */ -- cgit v1.2.3