1919
2020<!-- END doctoc generated TOC please keep comment here to allow auto update -->
2121
22+ ## WARNING: NoClassDefFoundError when using GraphQL Java Tools 5.4.x
2223
23- # Intro
24+ If you're using ` graphl-java-tools ` you need to set the ` kotlin.version ` in your Spring Boot project explicitly to
25+ version 1.3.10, because Spring Boot Starter parent currently overrides it with a 1.2.* version of Kotlin.
26+ ` graphql-java-tools ` requires 1.3.* however because of its coroutine support. If you don't override this version
27+ you will run into a ` NoClassDefFoundError ` .
28+
29+ Spring Boot team has indicated the Kotlin version will be upgraded to 1.3 in Spring Boot 2.2.
30+
31+ ### Using Gradle
32+ Set the Kotlin version in your ` gradle.properties `
33+ ```
34+ kotlin.version=1.3.10
35+ ```
36+
37+ ### Using Maven
38+ Set the Kotlin version in your ` <properties> ` section
39+ ``` xml
40+ <properties >
41+ <kotlin .version>1.3.10</kotlin .version>
42+ </properties >
43+ ```
44+
45+ # Documentation
46+
47+ See our new [ Documentation] ( https://www.graphql-java-kickstart.com/spring-boot/ ) .
2448
2549Repository contains:
2650
@@ -42,13 +66,16 @@ repositories {
4266}
4367
4468dependencies {
45- compile 'com.graphql-java-kickstart:graphql-spring-boot-starter:5.0.5 '
69+ compile 'com.graphql-java-kickstart:graphql-spring-boot-starter:5.3.1 '
4670
4771 // to embed GraphiQL tool
48- compile 'com.graphql-java-kickstart:graphiql-spring-boot-starter:5.0.5 '
72+ compile 'com.graphql-java-kickstart:graphiql-spring-boot-starter:5.3.1 '
4973
5074 // to embed Voyager tool
51- compile 'com.graphql-java-kickstart:voyager-spring-boot-starter:5.0.5'
75+ compile 'com.graphql-java-kickstart:voyager-spring-boot-starter:5.3.1'
76+
77+ // testing facilities
78+ testCompile 'com.graphql-java-kickstart:graphql-spring-boot-starter-test:5.3.1'
5279}
5380```
5481
@@ -57,22 +84,31 @@ Maven:
5784<dependency >
5885 <groupId >com.graphql-java-kickstart</groupId >
5986 <artifactId >graphql-spring-boot-starter</artifactId >
60- <version >5.0.5 </version >
87+ <version >5.3.1 </version >
6188</dependency >
6289
6390<!-- to embed GraphiQL tool -->
6491<dependency >
6592 <groupId >com.graphql-java-kickstart</groupId >
6693 <artifactId >graphiql-spring-boot-starter</artifactId >
67- <version >5.0.5 </version >
94+ <version >5.3.1 </version >
6895</dependency >
6996
7097<!-- to embed Voyager tool -->
7198<dependency >
7299 <groupId >com.graphql-java-kickstart</groupId >
73100 <artifactId >voyager-spring-boot-starter</artifactId >
74- <version >5.0.5 </version >
101+ <version >5.3.1 </version >
75102</dependency >
103+
104+ <!-- testing facilities -->
105+ <dependency >
106+ <groupId >com.graphql-java-kickstart</groupId >
107+ <artifactId >graphql-spring-boot-starter-test</artifactId >
108+ <version >5.3.1</version >
109+ <scope >test</scope >
110+ </dependency >
111+
76112```
77113
78114New releases will be available faster in the JCenter repository than in Maven Central. Add the following to use for Maven
@@ -104,9 +140,11 @@ Available Spring Boot configuration parameters (either `application.yml` or `app
104140``` yaml
105141graphql :
106142 servlet :
107- mapping : /graphql
108- enabled : true
109- corsEnabled : true
143+ mapping : /graphql
144+ enabled : true
145+ corsEnabled : true
146+ # if you want to @ExceptionHandler annotation for custom GraphQLErrors
147+ exception-handlers-enabled : true
110148` ` `
111149
112150By default a global CORS filter is enabled for ` /graphql/**` context.
@@ -166,34 +204,15 @@ Available Spring Boot configuration parameters (either `application.yml` or `app
166204` ` ` yaml
167205graphql:
168206 tools:
169- schemaLocationPattern : "**/*.graphqls"
207+ schema-location-pattern : "**/*.graphqls"
170208 # Enable or disable the introspection query. Disabling it puts your server in contravention of the GraphQL
171209 # specification and expectations of most clients, so use this option with caution
172- introspectionEnabled : true
210+ introspection-enabled : true
173211` ` `
174212By default GraphQL tools uses the location pattern `**/*.graphqls` to scan for GraphQL schemas on the classpath.
175213Use the `schemaLocationPattern` property to customize this pattern.
176214
177215
178- # # GraphQL Spring Common [LATEST SUPPORTED VERSION: 3.1.1]
179- **https://github.com/oembedler/spring-graphql-common**
180-
181- See the [Readme](https://github.com/oembedler/spring-graphql-common#usage) and the [example](https://github.com/graphql-java-kickstart/graphql-spring-boot/tree/master/example-spring-common) for usage instructions.
182-
183- # ### Application Properties
184- ` ` ` yaml
185- graphql:
186- spring-graphql-common:
187- clientMutationIdName: clientMutationId
188- injectClientMutationId: true
189- allowEmptyClientMutationId: false
190- mutationInputArgumentName: input
191- outputObjectNamePrefix: Payload
192- inputObjectNamePrefix: Input
193- schemaMutationObjectName: Mutation
194- ` ` `
195-
196-
197216# Contributions
198217
199218Contributions are welcome. Please respect the [Code of Conduct](http://contributor-covenant.org/version/1/3/0/).
@@ -203,8 +222,6 @@ Contributions are welcome. Please respect the [Code of Conduct](http://contribu
203222
204223` graphql-spring-boot-starter` and `graphiql-spring-boot-starter` are licensed under the MIT License. See [LICENSE](LICENSE.md) for details.
205224
206- [spring-graphql-common License](https://github.com/oembedler/spring-graphql-common/blob/master/LICENSE.md)
207-
208225[graphql-java License](https://github.com/andimarek/graphql-java/blob/master/LICENSE.md)
209226
210227[graphiql License](https://github.com/graphql/graphiql/blob/master/LICENSE)
0 commit comments