You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
GraphQL Kotlin consists of number of libraries that aim to simplify running a GraphQL server in Kotlin.
8
+
GraphQL Kotlin is a collection of libraries built on top of [graphql-java](https://www.graphql-java.com/)that aim to simplify running a GraphQL server in Kotlin
10
9
11
10
## 📦 Modules
12
11
13
12
*[graphql-kotlin-schema-generator](/graphql-kotlin-schema-generator) - Code only GraphQL schema generation for Kotlin
14
13
*[graphql-kotlin-federation](/graphql-kotlin-federation) - Schema generator extension to build federated GraphQL schemas
15
-
*[graphql-kotlin-spring-server](/graphql-kotlin-spring-server) - Spring Boot auto-configuration library to create GraphQL web app
14
+
*[graphql-kotlin-spring-server](/graphql-kotlin-spring-server) - Spring Boot auto-configuration library to create a GraphQL web app
16
15
*[examples](/examples) - Example apps that use graphql-kotlin libraries to test and demonstrate usages
17
16
18
17
## ⌨️ Usage
19
18
20
-
Below is a basic example of how `graphql-kotlin-schema-generator` converts your Kotlin code into a GraphQL schema. For more details, see our documentation below or in the individual module READMEs
19
+
Below is a basic example of how [graphql-kotlin-schema-generator](/graphql-kotlin-schema-generator) converts your Kotlin code into a GraphQL schema. For more details, see our documentation below or in the individual module READMEs
21
20
22
21
```kotlin
23
-
// Your existing Kotlin code
24
-
25
22
data classWidget(valid:Int, valvalue:String)
26
23
27
24
classWidgetService {
@@ -31,7 +28,6 @@ class WidgetService {
31
28
}
32
29
33
30
// Generate the schema
34
-
35
31
val config =SchemaGeneratorConfig(supportedPackages =listOf("org.example"))
36
32
val queries =listOf(TopLevelObject(WidgetService()))
37
33
@@ -51,11 +47,30 @@ type Widget {
51
47
}
52
48
```
53
49
50
+
Thenusing [graphql-kotlin-spring-server](/graphql-kotlin-spring-server) youcaneasilymakeyourschema available as a GraphQL server with Spring Boot.
Examples and documentation are available on our [documentation site](https://expediagroup.github.io/graphql-kotlin) hosted in GitHub Pages.
70
+
71
+
If you have a question about something you can not find in our documentation, the indivdual module READMEs, or [javadocs](https://www.javadoc.io/doc/com.expediagroup/graphql-kotlin-schema-generator), feel free to [create an issue](https://github.com/ExpediaGroup/graphql-kotlin/issues) and tag it with the question label.
Copy file name to clipboardExpand all lines: examples/README.md
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -2,5 +2,5 @@
2
2
3
3
Example apps that use `graphql-kotlin` libraries to test and demonstrate usages.
4
4
5
-
*[spring](https://github.com/ExpediaGroup/graphql-kotlin/tree/master/examples/spring) - This is a sample Spring Boot app that uses `graphql-kotlin-spring-server` to create reactive GraphQL web application. Please refer to the README file for details on how to run the target application.
6
-
*[federation](https://github.com/ExpediaGroup/graphql-kotlin/tree/master/examples/federation) - Example Spring Boot apps generating Federated GraphQL schema and Apollo Gateway that exposes single federated schema are provided in examples/federation project. Please refer to their README files for details on how to run the target applications.
5
+
*[spring](https://github.com/ExpediaGroup/graphql-kotlin/tree/master/examples/spring) - This is a sample Spring Boot app that uses `graphql-kotlin-spring-server` to create a reactive GraphQL web application. Please refer to the README file for details on how to run the application.
6
+
*[federation](https://github.com/ExpediaGroup/graphql-kotlin/tree/master/examples/federation) - Example Spring Boot apps generating federated GraphQL schemas and an Apollo Gateway in NodeJS that exposes the merged federated schema. Please refer to the README files for details on how to run each federated service.
0 commit comments