Document spring-graphql-test dependency

This commit documents the fact that the `spring-graphql-test` dependency
is required for the testing support.

Fixes gh-205
This commit is contained in:
Brian Clozel
2021-12-10 22:28:36 +01:00
parent b0994a1409
commit fe76809f3c
2 changed files with 25 additions and 1 deletions

View File

@@ -53,7 +53,7 @@ repositories {
----
<dependencies>
// Spring GraphQL Boot starter
<!-- Spring GraphQL Boot starter -->
<dependency>
<groupId>org.springframework.experimental</groupId>
<artifactId>graphql-spring-boot-starter</artifactId>

View File

@@ -5,6 +5,30 @@ It's possible to test GraphQL requests with Spring's `WebTestClient`, just sendi
receiving JSON, but a number of GraphQL specific details make this approach more
cumbersome than is necessary.
To get the full testing support, you'll need to add the `spring-graphql-test` dependdency
in your build:
[source,groovy,indent=0,subs="verbatim,quotes,attributes",role="primary"]
.Gradle
----
dependencies {
// ...
testImplementation 'org.springframework.graphql:spring-graphql-test:{spring-graphql-version}'
}
----
[source,xml,indent=0,subs="verbatim,quotes,attributes",role="secondary"]
.Maven
----
<dependencies>
<!-- ... -->
<dependency>
<groupId>org.springframework.graphql</groupId>
<artifactId>spring-graphql-test</artifactId>
<version>{spring-graphql-version}</version>
<scope>test</scope>
</dependency>
</dependencies>
----
[[testing-graphqltester]]