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
[plugin] update Maven Mojo names to follow hyphen-name (#719)
* [plugin] update Maven Mojo names to follow hyphen-name
Maven plugins generally follow `hyphen-name` for defining different Mojos and build lifecycle phases. Updating GraphQL Kotlin Maven plugin to follow the convention.
* fix build
We can execute multiple goals in single execution OR specify execution IDs for each execution
You can find detailed information about `graphql-kotlin-maven-plugin` and all its goals by running `mvn help:describe -Dplugin=com.expediagroup:graphql-kotlin-maven-plugin -Ddetail`.
11
11
12
-
### downloadSDL
12
+
### download-sdl
13
13
14
14
GraphQL endpoints are often public and as such many servers might disable introspection queries in production environment.
15
15
Since GraphQL schema is needed to generate type safe clients, as alternative GraphQL servers might expose private
16
16
endpoints (e.g. accessible only from within network, etc) that could be used to download schema in Schema Definition
17
17
Language (SDL) directly. This Mojo attempts to download schema from the specified `graphql.endpoint`, validates the
18
18
result whether it is a valid schema and saves it locally as `schema.graphql` under build directory. In general, this
19
19
goal provides limited functionality by itself and instead should be used to generate input for the subsequent
20
-
`generateClient` goal.
20
+
`generate-client` goal.
21
21
22
22
**Attributes**
23
23
@@ -29,7 +29,7 @@ goal provides limited functionality by itself and instead should be used to gene
29
29
| -------- | ---- | -------- | ----------- |
30
30
|`endpoint`| String | yes | Target GraphQL server SDL endpoint that will be used to download schema.<br/>**User property is**: `graphql.endpoint`. |
31
31
32
-
### generateClient
32
+
### generate-client
33
33
34
34
Generate GraphQL client code based on the provided GraphQL schema and target queries.
35
35
@@ -68,7 +68,7 @@ Generate GraphQL client code based on the provided GraphQL schema and target que
68
68
</converters>
69
69
```
70
70
71
-
### generateTestClient
71
+
### generate-test-client
72
72
73
73
Generate GraphQL test client code based on the provided GraphQL schema and target queries.
74
74
@@ -107,11 +107,11 @@ Generate GraphQL test client code based on the provided GraphQL schema and targe
107
107
</converters>
108
108
```
109
109
110
-
### introspectSchema
110
+
### introspect-schema
111
111
112
112
Executes GraphQL introspection query against specified `graphql.endpoint` and saves the underlying schema file as
113
113
`schema.graphql` under build directory. In general, this goal provides limited functionality by itself and instead
114
-
should be used to generate input for the subsequent `generateClient` goal.
114
+
should be used to generate input for the subsequent `generate-client` goal.
115
115
116
116
**Attributes**
117
117
@@ -127,11 +127,11 @@ should be used to generate input for the subsequent `generateClient` goal.
127
127
128
128
### Downloading Schema SDL
129
129
130
-
DownloadSDL Mojo requires target GraphQL server `endpoint` to be specified. Task can be executed directly from the
130
+
Download SDL Mojo requires target GraphQL server `endpoint` to be specified. Task can be executed directly from the
131
131
command line by explicitly specifying `graphql.endpoint` property.
Mojo can also be configured in your Maven build file
@@ -143,9 +143,8 @@ Mojo can also be configured in your Maven build file
143
143
<version>${graphql-kotlin.version}</version>
144
144
<executions>
145
145
<execution>
146
-
<id>download-sdl</id>
147
146
<goals>
148
-
<goal>downloadSDL</goal>
147
+
<goal>download-sdl</goal>
149
148
</goals>
150
149
<configuration>
151
150
<endpoint>http://localhost:8080/sdl</endpoint>
@@ -155,15 +154,15 @@ Mojo can also be configured in your Maven build file
155
154
</plugin>
156
155
```
157
156
158
-
By default, `downloadSDL` goal will be executed as part of the `generate-sources`[build lifecycle phase](https://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html).
157
+
By default, `download-sdl` goal will be executed as part of the `generate-sources`[build lifecycle phase](https://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html).
159
158
160
159
### Introspecting Schema
161
160
162
161
Introspection Mojo requires target GraphQL server `endpoint` to be specified. Task can be executed directly from the
163
162
command line by explicitly specifying `graphql.endpoint` property
@@ -187,7 +185,7 @@ Mojo can also be configured in your Maven build file
187
185
</plugin>
188
186
```
189
187
190
-
By default, `introspectSchema` goal will be executed as part of the `generate-sources`[build lifecycle phase](https://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html).
188
+
By default, `introspect-schema` goal will be executed as part of the `generate-sources`[build lifecycle phase](https://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html).
191
189
192
190
### Generating Client
193
191
@@ -196,7 +194,7 @@ generated under specified `packageName`. When using default configuration and st
196
194
directories, task can be executed directly from the command line by explicitly providing required properties.
Copy file name to clipboardExpand all lines: plugins/graphql-kotlin-maven-plugin/src/main/kotlin/com/expediagroup/graphql/plugin/maven/DownloadSDLMojo.kt
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -27,7 +27,7 @@ import java.io.File
27
27
/**
28
28
* Download GraphQL schema from a specified SDL endpoint.
Copy file name to clipboardExpand all lines: plugins/graphql-kotlin-maven-plugin/src/main/kotlin/com/expediagroup/graphql/plugin/maven/GenerateClientMojo.kt
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -26,7 +26,7 @@ import java.io.File
26
26
* Generate GraphQL Kotlin client data model based on the provided GraphQL schema and target queries. Upon successful client generation
27
27
* project main sources will be updated with newly generated client code.
0 commit comments