Skip to content

Commit 9616ff8

Browse files
authored
[docs] fix copy+paste error on downloadSDL task (ExpediaGroup#744)
* [docs] fix copy+paste error on downloadSDL task * fix gradle plugin extension in readme * update gradle plugin readme with complete extension
1 parent b278105 commit 9616ff8

File tree

2 files changed

+17
-3
lines changed

2 files changed

+17
-3
lines changed

docs/plugins/gradle-plugin.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,8 @@ Task can also be explicitly configured in your Gradle build file
142142
// build.gradle.kts
143143
import com.expediagroup.graphql.plugin.gradle.tasks.GraphQLDownloadSDLTask
144144

145-
val graphqlIntrospectSchema by tasks.getting(GraphQLDownloadSDLTask::class) {
146-
graphqlDownloadSDL.set("http://localhost:8080/sdl")
145+
val graphqlDownloadSDL by tasks.getting(GraphQLDownloadSDLTask::class) {
146+
endpoint.set("http://localhost:8080/sdl")
147147
}
148148
```
149149

plugins/graphql-kotlin-gradle-plugin/README.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,22 @@ This extension can be used to configure global options instead of explicitly con
2323

2424
```kotlin
2525
graphql {
26-
packageName = "com.expediagroup.graphql.generated"
26+
client {
27+
// GraphQL server endpoint that will be used to for running introspection queries. Alternatively you can download schema directly from `sdlEndpoint`.
2728
endpoint = "http://localhost:8080/graphql"
29+
// GraphQL server SDL endpoint that will be used to download schema. Alternatively you can run introspection query against `endpoint`.
30+
sdlEndpoint = "http://localhost:8080/sdl"
31+
// Target package name to be used for generated classes.
32+
packageName = "com.example.generated"
33+
// Optional HTTP headers to be specified on an introspection query or SDL request.
34+
headers["X-Custom-Header"] = "Custom-Header-Value"
35+
// Boolean flag indicating whether or not selection of deprecated fields is allowed.
36+
allowDeprecatedFields = false
37+
// Custom GraphQL scalar to converter mapping containing information about corresponding Java type and converter that should be used to serialize/deserialize values.
38+
converters["UUID"] = ScalarConverterMapping("java.util.UUID", "com.example.UUIDScalarConverter")
39+
// List of query files to be processed.
40+
queryFiles.add(file("${project.projectDir}/src/main/resources/queries/MyQuery.graphql"))
41+
}
2842
}
2943
```
3044

0 commit comments

Comments
 (0)