@@ -23,34 +23,68 @@ As outlined in https://graphql.org/learn/serving-over-http this project supports
2323
2424Both produce ` application/json ` .
2525
26- ## Spring Boot Starter
26+ ## Support for webmvc and webflux
27+
28+ We support both spring web types: the fully non-blocking ` webflux ` and the traditional servlet based ` webmvc ` .
29+
30+ Please see [ here] ( https://docs.spring.io/spring/docs/current/spring-framework-reference/web-reactive.html#webflux-framework-choice ) in
31+ the spring documentation itself about the differences.
32+
33+
34+ ## Artifacts
35+
36+ There are four different artifacts:
37+
38+ 1 . graphql-java-spring-webflux
39+ 2 . graphql-java-spring-boot-starter-webflux
40+ 3 . graphql-java-spring-webmvc
41+ 4 . graphql-java-spring-boot-starter-webmvc
42+
43+
44+
45+ ## Getting started with Spring Boot (webflux and webmvc)
2746
2847The Spring Boot Starter artifact provides a HTTP endpoint on ${graphql.url} with the default value "/graphql" just by being on the classpath.
2948
3049The only requirement is to have a Bean of type ` graphql.GraphQL ` available.
3150
3251Add the following dependency to your ` build.gradle ` (make sure ` mavenCentral() ` is among your repos)
3352
53+ for webflux:
3454``` groovy
3555dependencies {
36- implementation "com.graphql-java:graphql-java-spring-boot-starter:1.0"
56+ implementation "com.graphql-java:graphql-java-spring-boot-starter-webflux :1.0"
3757}
58+ ```
3859
60+ for webmvc:
61+ ``` groovy
62+ dependencies {
63+ implementation "com.graphql-java:graphql-java-spring-boot-starter-webmvc:1.0"
64+ }
3965```
4066
4167or to your ` pom.xml `
4268
69+ for webflux
4370``` xml
4471<dependency >
4572 <groupId >com.graphql-java</groupId >
46- <artifactId >graphql-java-spring-boot-starter</artifactId >
73+ <artifactId >graphql-java-spring-boot-starter-webflux </artifactId >
4774 <version >1.0</version >
4875</dependency >
4976
5077```
5178
52- ## Spring Web Artifact
79+ for webmvc:
80+ ``` xml
81+ <dependency >
82+ <groupId >com.graphql-java</groupId >
83+ <artifactId >graphql-java-spring-boot-starter-webmvc</artifactId >
84+ <version >1.0</version >
85+ </dependency >
86+
87+ ```
5388
54- We also provide a artifact for non Boot Application.
5589
5690
0 commit comments