*[Plugin configuration in build.gradle](example-client/build.gradle)
*[Building GraphQL request and parsing response using Spring RestTemplate](example-client/src/main/java/io/github/kobylynskyi/order/external/ProductServiceGraphQLClient.java)
*[Building GraphQL request and parsing response using RestAssured](example-client/src/test/java/io/github/kobylynskyi/order/service/CreateProductIntegrationTest.java)
### Different configurations for graphql schemas
If you want to have different configuration for different `.graphqls` files (e.g.: different javaPackage, outputDir, etc.), then you will need to create separate gradle tasks for each set of schemas. E.g.:
If you want to have different configuration for different `.graphqls` files (e.g.: different javaPackage, outputDir, etc.), then you will need to create separate gradle tasks for each set of schemas. E.g.:
...
@@ -179,12 +191,6 @@ Later on you can call each task separately or together:
...
@@ -179,12 +191,6 @@ Later on you can call each task separately or together:
2. Access generated classes as normal Kotlin classes.
2. Access generated classes as normal Kotlin classes.
### Example
* GraphQL server code generation: [example-server](example-server)
*[Plugin configuration in pom.xml](example-client/pom.xml)
*[Building GraphQL request and parsing response using Spring RestTemplate](example-client/src/main/java/io/github/kobylynskyi/order/external/ProductServiceGraphQLClient.java)
*[Building GraphQL request and parsing response using RestAssured](example-client/src/test/java/io/github/kobylynskyi/order/service/CreateProductIntegrationTest.java)
### Different configurations for graphql schemas
If you want to have different configuration for different `.graphqls` files (e.g.: different javaPackage, outputDir, etc.), then you will need to define separate executions for each set of schemas. E.g.:
If you want to have different configuration for different `.graphqls` files (e.g.: different javaPackage, outputDir, etc.), then you will need to define separate executions for each set of schemas. E.g.:
```xml
```xml
...
@@ -140,11 +153,6 @@ If you want to have different configuration for different `.graphqls` files (e.g
...
@@ -140,11 +153,6 @@ If you want to have different configuration for different `.graphqls` files (e.g
</executions>
</executions>
```
```
### Example
* GraphQL server code generation: [example-server](example-server)