Skip to content

Commit f488214

Browse files
authored
Merge pull request #999 from kobylynskyi/develop
5.5.0 Release
2 parents 7364f7d + 7b81f74 commit f488214

File tree

49 files changed

+632
-146
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+632
-146
lines changed

.github/workflows/github.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ jobs:
8282

8383
sonar:
8484
needs: build
85+
if: github.event_name != 'pull_request'
8586
runs-on: ubuntu-latest
8687
steps:
8788
- uses: actions/checkout@v2
@@ -117,4 +118,5 @@ jobs:
117118
- name: Generate and publish Sonar report
118119
run: ./gradlew sonarqube -Dsonar.projectKey=kobylynskyi_graphql-java-codegen -Dsonar.organization=kobylynskyi -Dsonar.host.url=https://sonarcloud.io -Dsonar.login=${{ secrets.SONAR_LOGIN }} --stacktrace
119120
env:
120-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
121+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
122+

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ plugins {
99
id "org.sonarqube" version "3.2.0"
1010
}
1111

12-
def graphqlCodegenVersion = '5.4.1' // This variable used in the automatic release process
12+
def graphqlCodegenVersion = '5.5.0' // This variable used in the automatic release process
1313

1414
group = "io.github.kobylynskyi"
1515
version = graphqlCodegenVersion

docs/codegen-options.md

Lines changed: 92 additions & 93 deletions
Large diffs are not rendered by default.

plugins/gradle/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
```groovy
1919
plugins {
20-
id "io.github.kobylynskyi.graphql.codegen" version "5.4.1"
20+
id "io.github.kobylynskyi.graphql.codegen" version "5.5.0"
2121
}
2222
```
2323

@@ -31,7 +31,7 @@ buildscript {
3131
}
3232
}
3333
dependencies {
34-
classpath "io.github.kobylynskyi.graphql.codegen:graphql-codegen-gradle-plugin:5.4.1"
34+
classpath "io.github.kobylynskyi.graphql.codegen:graphql-codegen-gradle-plugin:5.5.0"
3535
}
3636
}
3737

plugins/gradle/example-client-kotlin/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ import io.github.kobylynskyi.graphql.codegen.gradle.GraphQLCodegenGradleTask
44
plugins {
55
id "java"
66
id "org.jetbrains.kotlin.jvm" version "1.6.21"
7-
id "io.github.kobylynskyi.graphql.codegen" version "5.4.1"
7+
id "io.github.kobylynskyi.graphql.codegen" version "5.5.0"
88
}
99

10-
def graphqlCodegenClientKotlinVersion = '5.4.1' // Variable used in the automatic release process
10+
def graphqlCodegenClientKotlinVersion = '5.5.0' // Variable used in the automatic release process
1111

1212
group = 'io.github.dreamylost'
1313
version = graphqlCodegenClientKotlinVersion
@@ -29,7 +29,7 @@ repositories {
2929

3030

3131
dependencies {
32-
implementation "io.github.kobylynskyi:graphql-java-codegen:5.4.1"
32+
implementation "io.github.kobylynskyi:graphql-java-codegen:5.5.0"
3333
implementation "javax.validation:validation-api:2.0.1.Final"
3434
implementation "com.squareup.okhttp3:okhttp:4.2.2"
3535
implementation "com.fasterxml.jackson.core:jackson-core:2.13.3"

plugins/gradle/example-client/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ plugins {
77

88
// use the latest available version:
99
// https://plugins.gradle.org/plugin/io.github.kobylynskyi.graphql.codegen
10-
id "io.github.kobylynskyi.graphql.codegen" version "5.4.1"
10+
id "io.github.kobylynskyi.graphql.codegen" version "5.5.0"
1111
}
1212

1313
mainClassName = "io.github.kobylynskyi.order.Application"
@@ -22,7 +22,7 @@ dependencies {
2222

2323
// use the latest available version:
2424
// https://search.maven.org/artifact/io.github.kobylynskyi/graphql-java-codegen
25-
implementation "io.github.kobylynskyi:graphql-java-codegen:5.4.1"
25+
implementation "io.github.kobylynskyi:graphql-java-codegen:5.5.0"
2626

2727
implementation "org.apache.httpcomponents:httpclient:4.5.13"
2828
implementation "javax.validation:validation-api:2.0.1.Final"

plugins/gradle/example-server/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ plugins {
66
//
77
// use the latest available version:
88
// https://plugins.gradle.org/plugin/io.github.kobylynskyi.graphql.codegen
9-
id "io.github.kobylynskyi.graphql.codegen" version "5.4.1"
9+
id "io.github.kobylynskyi.graphql.codegen" version "5.5.0"
1010
}
1111

1212
mainClassName = "io.github.kobylynskyi.product.Application"

plugins/gradle/graphql-java-codegen-gradle-plugin/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ apply plugin: "java"
1616
apply plugin: "idea"
1717
apply plugin: "maven-publish"
1818

19-
def graphqlCodegenGradlePluginVersion = '5.4.1' // This variable used in the automatic release process
19+
def graphqlCodegenGradlePluginVersion = '5.5.0' // This variable used in the automatic release process
2020

2121
group = "io.github.kobylynskyi"
2222
version = graphqlCodegenGradlePluginVersion

plugins/gradle/graphql-java-codegen-gradle-plugin/src/main/java/io/github/kobylynskyi/graphql/codegen/gradle/GraphQLCodegenGradleTask.java

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@ public class GraphQLCodegenGradleTask extends DefaultTask implements GraphQLCode
8787
private Set<String> fieldsWithResolvers = new HashSet<>();
8888
private Set<String> fieldsWithoutResolvers = new HashSet<>();
8989
private Set<String> typesAsInterfaces = new HashSet<>();
90+
private Set<String> resolverArgumentAnnotations = new HashSet<>();
91+
private Set<String> parametrizedResolverAnnotations = new HashSet<>();
9092
private final RelayConfig relayConfig = new RelayConfig();
9193

9294

@@ -109,6 +111,8 @@ public class GraphQLCodegenGradleTask extends DefaultTask implements GraphQLCode
109111
private Boolean supportUnknownFields = MappingConfigConstants.DEFAULT_SUPPORT_UNKNOWN_FIELDS;
110112
private String unknownFieldsPropertyName = MappingConfigConstants.DEFAULT_UNKNOWN_FIELDS_PROPERTY_NAME;
111113

114+
private Boolean skip = false;
115+
112116
public GraphQLCodegenGradleTask() {
113117
setGroup("codegen");
114118
setDescription("Generates Java POJOs and interfaces based on GraphQL schemas");
@@ -164,6 +168,10 @@ public void generate() throws Exception {
164168
fieldsWithoutResolvers != null ? fieldsWithoutResolvers : new HashSet<>());
165169
mappingConfig.setTypesAsInterfaces(
166170
typesAsInterfaces != null ? typesAsInterfaces : new HashSet<>());
171+
mappingConfig.setResolverArgumentAnnotations(
172+
resolverArgumentAnnotations != null ? resolverArgumentAnnotations : new HashSet<>());
173+
mappingConfig.setParametrizedResolverAnnotations(
174+
parametrizedResolverAnnotations != null ? parametrizedResolverAnnotations : new HashSet<>());
167175
mappingConfig.setRelayConfig(relayConfig);
168176

169177
mappingConfig.setGenerateClient(generateClient);
@@ -188,6 +196,11 @@ public void generate() throws Exception {
188196
mappingConfig.setSupportUnknownFields(isSupportUnknownFields());
189197
mappingConfig.setUnknownFieldsPropertyName(getUnknownFieldsPropertyName());
190198

199+
if (Boolean.TRUE.equals(skip)) {
200+
getLogger().info("Skipping code generation");
201+
return;
202+
}
203+
191204
instantiateCodegen(mappingConfig).generate();
192205
}
193206

@@ -689,6 +702,28 @@ public void setTypesAsInterfaces(Set<String> typesAsInterfaces) {
689702
this.typesAsInterfaces = typesAsInterfaces;
690703
}
691704

705+
@Input
706+
@Optional
707+
@Override
708+
public Set<String> getResolverArgumentAnnotations() {
709+
return resolverArgumentAnnotations;
710+
}
711+
712+
public void setResolverArgumentAnnotations(Set<String> resolverArgumentAnnotations) {
713+
this.resolverArgumentAnnotations = resolverArgumentAnnotations;
714+
}
715+
716+
@Input
717+
@Optional
718+
@Override
719+
public Set<String> getParametrizedResolverAnnotations() {
720+
return parametrizedResolverAnnotations;
721+
}
722+
723+
public void setParametrizedResolverAnnotations(Set<String> parametrizedResolverAnnotations) {
724+
this.parametrizedResolverAnnotations = parametrizedResolverAnnotations;
725+
}
726+
692727
@Nested
693728
@Optional
694729
@Override
@@ -897,6 +932,15 @@ public String getUnknownFieldsPropertyName() {
897932
public void setUnknownFieldsPropertyName(String unknownFieldsPropertyName) {
898933
this.unknownFieldsPropertyName = unknownFieldsPropertyName;
899934
}
900-
935+
936+
@Input
937+
@Optional
938+
public Boolean isSkip() {
939+
return skip;
940+
}
941+
942+
public void setSkip(Boolean skip) {
943+
this.skip = skip;
944+
}
901945

902946
}

plugins/maven/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<plugin>
2121
<groupId>io.github.kobylynskyi</groupId>
2222
<artifactId>graphql-codegen-maven-plugin</artifactId>
23-
<version>5.4.1</version>
23+
<version>5.5.0</version>
2424
<executions>
2525
<execution>
2626
<goals>

0 commit comments

Comments
 (0)