Class GraphQLWSClient
java.lang.Object
org.eclipse.microprofile.graphql.tck.dynamic.subscription.GraphQLWSClient
- All Implemented Interfaces:
AutoCloseable
A simple WebSocket client that implements the graphql-transport-ws protocol using java.net.http.
This client is used for testing GraphQL subscriptions over WebSocket. It implements the graphql-transport-ws protocol
as specified in: https://github.com/enisdenjo/graphql-ws/blob/master/PROTOCOL.md
- Author:
- Phillip Kruger (phillip.kruger@redhat.com)
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceHandler interface for subscription events -
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
GraphQLWSClient
-
-
Method Details
-
connect
- Throws:
Exception
-
subscribe
public String subscribe(String query, jakarta.json.JsonObject variables, GraphQLWSClient.SubscriptionHandler handler) -
stop
-
close
- Specified by:
closein interfaceAutoCloseable- Throws:
IOException
-