Skip to content

Commit f9b84cb

Browse files
committed
Update documentation for RSocketGraphQlTester
See gh-339
1 parent d41ced2 commit f9b84cb

File tree

2 files changed

+32
-13
lines changed

2 files changed

+32
-13
lines changed

spring-graphql-docs/src/docs/asciidoc/client.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ an instance, you'll need to start from either the <<client-httpgraphqlclient,
2020
HttpGraphQlClient>> or the <<client-websocketgraphqlclient,WebSocketGraphQlClient>>
2121
extensions.
2222

23-
The main purpose of a `GraphQlClient` extension is to provide a transport specific
24-
`Builder`. There is also a common <<client-graphqlclient-builder>> in `GraphQlClient`
25-
with configuration options that apply to any extension.
23+
Each `GraphQlClient` extension provides a transport specific `Builder`. There is also a
24+
shared, base <<client-graphqlclient-builder>> in `GraphQlClient` with common options for
25+
all extensions.
2626

2727

2828

spring-graphql-docs/src/docs/asciidoc/testing.adoc

Lines changed: 29 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ include::attributes.adoc[]
66
[[testing]]
77
= Testing
88

9-
Spring for GraphQL provides dedicated support for testing GraphQL requests over HTTP or
10-
WebSocket, and for testing GraphQL requests executed directly against a server.
9+
Spring for GraphQL provides dedicated support for testing GraphQL requests over HTTP,
10+
WebSocket, and RSocket, as well as for testing directly against a server.
1111

1212
To make use of this, add `spring-graphql-test` to your build:
1313

@@ -43,14 +43,15 @@ dependencies {
4343
independent of and agnostic to the underlying transport. To create an instance, you'll
4444
need to choose a specific `GraphQlTester` extension as a starting point.
4545

46-
To test with a client sending requests to a server over a transport, use the
47-
<<testing-httpgraphqltester>> or the <<testing-websocketgraphqltester>> `GraphQlTester`
48-
extensions. For server side tests, executed without any client, use the
49-
<<testing-graphqlservicetester>> or the <<testing-webgraphqlhandlertester>> extensions.
46+
To test with a client sending requests over a transport, use one of the
47+
<<testing-httpgraphqltester>>, <<testing-websocketgraphqltester>>, or
48+
<<testing-rsocketgraphqltester>> extensions. To test the server without client,
49+
use the<<testing-graphqlservicetester>> or <<testing-webgraphqlhandlertester>>
50+
extensions.
5051

51-
The main purpose of a `GraphQlTester` extension is to provide a transport specific
52-
`Builder`. There is also a <<testing-graphqltester-builder>> in `GraphQlTester` with
53-
common configuration options that apply to any extension.
52+
Each `GraphQlTester` extension provides a transport specific `Builder`. There is also a
53+
shared, base <<testing-graphqltester-builder>> in `GraphQlTester` with common options
54+
for all extensions.
5455

5556

5657

@@ -148,7 +149,7 @@ from Spring WebFlux to execute GraphQL requests over WebSocket:
148149
----
149150

150151
Once created, `WebSocketGraphQlTester` exposes the same transport agnostic workflow for
151-
request execution as any `GrahQlTeste`. To change any transport details, use `mutate()`
152+
request execution as any `GraphQlTester`. To change any transport details, use `mutate()`
152153
on an existing `WebSocketGraphQlTester` to create another with different configuration:
153154

154155
[source,java,indent=0,subs="verbatim,quotes"]
@@ -174,6 +175,24 @@ connection closed, e.g. after a test runs.
174175

175176

176177

178+
[[testing-rsocketgraphqltester]]
179+
=== RSocket
180+
181+
`RSocketGraphQlTester` uses `RSocketRequester` from spring-messaging to execute GraphQL
182+
requests over RSocket:
183+
184+
[source,java,indent=0,subs="verbatim,quotes"]
185+
----
186+
RSocketGraphQlTester tester = RSocketGraphQlTester.builder()
187+
.webSocket(URI.create("http://localhost:8080/graphql"))
188+
.build();
189+
----
190+
191+
Once created, `RSocketGraphQlTester` exposes the same transport agnostic workflow for
192+
request execution as any `GraphQlTester`.
193+
194+
195+
177196
[[testing-graphqlservicetester]]
178197
=== `GraphQlService`
179198

0 commit comments

Comments
 (0)