handler
handler copied to clipboard
Add a way to configure the GraphiQL subscription endpoint
The current GraphiQL interface served by the handler sends GraphQL subscriptions over HTTP, which is not expected to work. This article describes how GraphiQL can be set up with a custom fetcher that does subscriptions over a GraphQL WebSocket.
It would be great if the handler would support this to work with GraphQL servers that implement WS subscriptions.
This is an example implementation from apollo-server: https://github.com/apollographql/apollo-server/blob/5d15abc681ffc43c2ce1d68d728814b8dbcf91b8/packages/apollo-server-module-graphiql/src/renderGraphiQL.ts