Class GraphQLHandler
-
- All Implemented Interfaces:
public final class GraphQLHandlerServes GraphQL subscriptions over the
graphql-transport-wsprotocol (https://github.com/enisdenjo/graphql-ws/blob/master/PROTOCOL.md).The message types come from graphql-kotlin, but they are annotated for Jackson 3 and fastjson2, so incoming frames are dispatched on the
typefield by hand rather than deserialized into the sealedGraphQLSubscriptionMessage. That keeps the plugin working with whateverJsonMapperthe application has configured.Note on subprotocol negotiation: Javalin exposes no API for it, and the Jetty handshake underneath echoes back whichever subprotocol the client requested first, without checking it. A
graphql-transport-wsclient therefore connects correctly, but a client asking for something this handler does not speak — the legacygraphql-wssubprotocol, say — is told yes and then receives messages it cannot understand. Rejecting those needs a Javalin change.
-
-
Constructor Summary
Constructors Constructor Description GraphQLHandler(GraphQLPluginBuilder graphQLBuilder)
-
Method Summary
-
-
Constructor Detail
-
GraphQLHandler
GraphQLHandler(GraphQLPluginBuilder graphQLBuilder)
-
-
-
-