|
| 1 | +# GraphQL Kotlin Toolkit |
| 2 | +[](https://github.com/AurityLab/graphql-kotlin-toolkit/actions) |
| 3 | +[](https://ktlint.github.io/) |
| 4 | +[](https://mvnrepository.com/artifact/com.auritylab.graphql-kotlin-toolkit/codegen) |
| 5 | +[](https://mvnrepository.com/artifact/com.auritylab.graphql-kotlin-toolkit/spring-boot) |
| 6 | + |
| 7 | +A toolkit for GraphQL, specifically for [Kotlin](https://kotlinlang.org/). This toolkit provides some useful tools that are compatible with [graphql-java](https://github.com/graphql-java/graphql-java). |
| 8 | + |
| 9 | +## Code generation |
| 10 | +This tool follows the **schema-first** approach, in which you first write your *schema.graphqls* files and implement the server-side code for it afterwards. |
| 11 | +This code generator additionally creates an interface for each resolver. |
| 12 | +These can be used to implement each resolver in a clean way. The tool also provides specific parameters for each argument, allowing a more type safe way to access the incoming data. |
| 13 | +This code generator also **supports Kotlin's null safety feature**! |
| 14 | + |
| 15 | +Example resolver: |
| 16 | +```kotlin |
| 17 | +class MutationUpdateUser : GQLMutationUpdateUser { |
| 18 | + override fun resolve(input: GQLUpdateUserInput, env: GQLMutationUpdateUser.Env): User { |
| 19 | + TODO("implement your resolver") |
| 20 | + } |
| 21 | +} |
| 22 | +``` |
| 23 | + |
| 24 | +**Getting started [here](docs/codegen/gettings-started.md)!** |
| 25 | + |
| 26 | + |
| 27 | +## Spring Boot integration |
| 28 | +This integration works in a more opinionated way as it provides additional annotations which can be used to register code for various GraphQL types. |
| 29 | +It also comes with a servlet, which handles all GraphQL requests. |
| 30 | + |
| 31 | +**Getting started [here](docs/spring-boot-integration/getting-started.md)!** |
| 32 | + |
| 33 | + |
| 34 | +## Documentation |
| 35 | +* Code generation |
| 36 | + * [Getting started (Gradle Plugin)](docs/codegen/gettings-started.md) |
| 37 | + * [Schema configuration](docs/codegen/schema-configuration.md) |
| 38 | + * [Advanced configuration (Gradle Plugin)](docs/codegen/advanced-configuration.md) |
| 39 | + * [Code generation with Spring Boot integration](docs/codegen/code-generation-with-spring-boot-integration.md) |
| 40 | +* Spring Boot integration |
| 41 | + * [Getting started](docs/spring-boot-integration/getting-started.md) |
| 42 | + * [Annotations](docs/spring-boot-integration/annotations.md) |
0 commit comments