aboutsummaryrefslogtreecommitdiff
path: root/source/utility/types.ts
diff options
context:
space:
mode:
Diffstat (limited to 'source/utility/types.ts')
-rwxr-xr-xsource/utility/types.ts6
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. */