Files
spring-graphql/samples/webflux-websocket

GraphQL WebSocket Endpoint with Spring WebFlux

  • Data Controller with reactive methods for queries and subscriptions.
  • WebFilter to insert Reactor Context and check it can be accessed in DataRepository.
  • Subscription tests using Reactor's StepVerifier to verify the stream.

GraphiQL does not support subscriptions. There is a basic index.html page that logs subscriptions the console.