Skip to content

Commit 27e8831

Browse files
committed
Polishing websocket sample
1 parent 16ee8ec commit 27e8831

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

samples/webflux-websocket/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,6 @@
22

33
- Reactive [DataFetcher's](src/main/java/io/spring/sample/graphql/SampleWiring.java), for queries and subscriptions.
44
- [WebFilter](src/main/java/io/spring/sample/graphql/ContextWebFilter.java) to insert Reactor `Context` and check it can be accessed in [DataRepository](src/main/java/io/spring/sample/graphql/DataRepository.java).
5-
- Subscription [tests](src/test/java/io/spring/sample/graphql/SubscriptionTests.java) using Reactor's `StepVerifier` to verify the stream.
5+
- Subscription [tests](src/test/java/io/spring/sample/graphql/SubscriptionTests.java) using Reactor's `StepVerifier` to verify the stream.
6+
7+
GraphiQL does not support subscriptions. There is a basic index.html page that logs subscriptions the console.

samples/webflux-websocket/src/main/resources/static/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
<script type="text/javascript" src="https://unpkg.com/graphql-ws/umd/graphql-ws.js"></script>
77
</head>
88
<body>
9+
<p>Check the console for subscription messages.</p>
910
<script type="text/javascript">
1011
const client = graphqlWs.createClient({
1112
url: 'ws://localhost:8080/graphql',

0 commit comments

Comments
 (0)