Skip to content

Commit d8413b1

Browse files
authored
Merge branch 'master' into timward/unused-types
2 parents 6e1bae1 + f1d12cc commit d8413b1

17 files changed

Lines changed: 315 additions & 96 deletions

‎.github/workflows/pull-request.yml‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,17 @@ jobs:
77
runs-on: ubuntu-latest
88
strategy:
99
matrix:
10-
java: [ '11', '15', '17' ]
10+
java: [ '11', '17', '21', '25' ]
1111
steps:
1212
- name: Checkout
13-
uses: actions/checkout@v4
13+
uses: actions/checkout@v7
1414
- name: Setup java
15-
uses: actions/setup-java@v4
15+
uses: actions/setup-java@v6
1616
with:
1717
java-version: ${{ matrix.java }}
18-
distribution: 'adopt'
18+
distribution: 'temurin'
1919
- name: Cache Maven packages
20-
uses: actions/cache@v4
20+
uses: actions/cache@v6
2121
with:
2222
path: ~/.m2
2323
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}

‎.github/workflows/release.yml‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ jobs:
55
runs-on: ubuntu-latest
66
steps:
77
- name: Checkout
8-
uses: actions/checkout@v4
8+
uses: actions/checkout@v7
99
- name: Setup java
10-
uses: actions/setup-java@v4
10+
uses: actions/setup-java@v6
1111
with:
1212
java-version: '11'
13-
distribution: 'adopt'
13+
distribution: 'temurin'
1414
- name: Build with Maven
1515
run: mvn --batch-mode --update-snapshots verify
1616

@@ -19,13 +19,13 @@ jobs:
1919
needs: build
2020
steps:
2121
- name: Checkout
22-
uses: actions/checkout@v4
22+
uses: actions/checkout@v7
2323
- name: Setup Maven Central
24-
uses: actions/setup-java@v4
24+
uses: actions/setup-java@v6
2525
with:
2626
java-version: '11'
27-
distribution: 'adopt'
28-
server-id: ossrh
27+
distribution: 'temurin'
28+
server-id: central
2929
server-username: MAVEN_USERNAME
3030
server-password: MAVEN_PASSWORD
3131
gpg-private-key: ${{ secrets.GPG_SIGNING_KEY }}
@@ -38,7 +38,7 @@ jobs:
3838
GPG_PASSPHRASE: ${{ secrets.GPG_SIGNING_PASSWORD }}
3939
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4040
- name: Create Release PR
41-
uses: peter-evans/create-pull-request@v7
41+
uses: peter-evans/create-pull-request@v8
4242
with:
4343
branch: version-release
4444
title: Version Release

‎.github/workflows/snapshot.yml‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ jobs:
88
runs-on: ubuntu-latest
99
steps:
1010
- name: Checkout
11-
uses: actions/checkout@v4
11+
uses: actions/checkout@v7
1212
- name: Setup java
13-
uses: actions/setup-java@v4
13+
uses: actions/setup-java@v6
1414
with:
1515
java-version: '11'
16-
distribution: 'adopt'
16+
distribution: 'temurin'
1717
- name: Build with Maven
1818
run: mvn --batch-mode --update-snapshots verify
1919

@@ -22,13 +22,13 @@ jobs:
2222
needs: build
2323
steps:
2424
- name: Checkout
25-
uses: actions/checkout@v4
25+
uses: actions/checkout@v7
2626
- name: Setup Maven Central
27-
uses: actions/setup-java@v4
27+
uses: actions/setup-java@v6
2828
with:
2929
java-version: '11'
30-
distribution: 'adopt'
31-
server-id: ossrh
30+
distribution: 'temurin'
31+
server-id: central
3232
server-username: MAVEN_USERNAME
3333
server-password: MAVEN_PASSWORD
3434
- name: Publish release

‎README.md‎

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# GraphQL Java Tools
22

33
[![Github Build](https://github.com/graphql-java-kickstart/graphql-java-tools/actions/workflows/snapshot.yml/badge.svg)](https://github.com/graphql-java-kickstart/graphql-java-tools/actions/workflows/snapshot.yml)
4-
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.graphql-java-kickstart/graphql-java-tools/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.graphql-java-kickstart/graphql-java-tools)
4+
[![Maven Central](https://maven-badges.sml.io/maven-central/io.github.graphql-java-kickstart/graphql-java-tools/badge.svg)](https://maven-badges.sml.io/maven-central/io.github.graphql-java-kickstart/graphql-java-tools)
55
[![Discuss on GitHub](https://img.shields.io/badge/GitHub-discuss-orange)](https://github.com/graphql-java-kickstart/graphql-java-tools/discussions)
66

77
This library allows you to use the GraphQL schema language to build your [graphql-java](https://github.com/graphql-java/graphql-java) schema.
@@ -21,29 +21,29 @@ Are you interested in improving our documentation, working on the codebase, revi
2121
### Using Gradle
2222
Set the Kotlin version in your `gradle.properties`:
2323
```
24-
kotlin.version=2.0.20
24+
kotlin.version=2.3.10
2525
```
2626

2727
Add the dependency:
2828
```groovy
29-
compile 'com.graphql-java-kickstart:graphql-java-tools:14.0.0'
29+
compile 'io.github.graphql-java-kickstart:graphql-java-tools:14.0.3'
3030
```
3131

3232
### Using Maven
3333
Set the Kotlin version in your `<properties>` section:
3434
```xml
3535

3636
<properties>
37-
<kotlin.version>2.0.20</kotlin.version>
37+
<kotlin.version>2.3.10</kotlin.version>
3838
</properties>
3939
```
4040

4141
Add the dependency:
4242
```xml
4343
<dependency>
44-
<groupId>com.graphql-java-kickstart</groupId>
44+
<groupId>io.github.graphql-java-kickstart</groupId>
4545
<artifactId>graphql-java-tools</artifactId>
46-
<version>14.0.0</version>
46+
<version>14.0.3</version>
4747
</dependency>
4848
```
4949

@@ -65,4 +65,3 @@ A few libraries exist to ease the boilerplate pain, including [GraphQL-Java's bu
6565
## Known Issues
6666

6767
[Known issues are aggregated at the wiki](https://github.com/graphql-java-kickstart/graphql-java-tools/wiki/Known-Issues).
68-

‎pom.xml‎

Lines changed: 28 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
33
<modelVersion>4.0.0</modelVersion>
44

5-
<groupId>com.graphql-java-kickstart</groupId>
5+
<groupId>io.github.graphql-java-kickstart</groupId>
66
<artifactId>graphql-java-tools</artifactId>
7-
<version>14.0.1-SNAPSHOT</version>
7+
<version>14.0.4-SNAPSHOT</version>
88
<packaging>jar</packaging>
99

1010
<name>GraphQL Java Tools</name>
@@ -14,10 +14,10 @@
1414
<properties>
1515
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
1616
<java.version>11</java.version>
17-
<kotlin.version>2.0.20</kotlin.version>
18-
<kotlin-coroutines.version>1.9.0</kotlin-coroutines.version>
19-
<jackson.version>2.18.0</jackson.version>
20-
<graphql-java.version>22.3</graphql-java.version>
17+
<kotlin.version>2.3.10</kotlin.version>
18+
<kotlin-coroutines.version>1.10.2</kotlin-coroutines.version>
19+
<jackson.version>2.22.3</jackson.version>
20+
<graphql-java.version>25.1</graphql-java.version>
2121
<reactive-streams.version>1.0.4</reactive-streams.version>
2222

2323
<maven.compiler.source>${java.version}</maven.compiler.source>
@@ -63,24 +63,24 @@
6363
<dependency>
6464
<groupId>com.fasterxml</groupId>
6565
<artifactId>classmate</artifactId>
66-
<version>1.7.0</version>
66+
<version>1.7.3</version>
6767
</dependency>
6868
<dependency>
6969
<groupId>org.slf4j</groupId>
7070
<artifactId>slf4j-api</artifactId>
71-
<version>2.0.16</version>
71+
<version>2.0.20</version>
7272
</dependency>
7373
<dependency>
7474
<groupId>org.apache.commons</groupId>
7575
<artifactId>commons-lang3</artifactId>
76-
<version>3.17.0</version>
76+
<version>3.21.0</version>
7777
</dependency>
7878

7979
<!-- Optional for supporting Javassist proxies -->
8080
<dependency>
8181
<groupId>org.javassist</groupId>
8282
<artifactId>javassist</artifactId>
83-
<version>3.30.2-GA</version>
83+
<version>3.33.0-GA</version>
8484
<scope>provided</scope>
8585
</dependency>
8686
<!-- Optional for supporting Spring proxies -->
@@ -100,7 +100,7 @@
100100
<dependency>
101101
<groupId>ch.qos.logback</groupId>
102102
<artifactId>logback-classic</artifactId>
103-
<version>1.5.9</version>
103+
<version>1.6.5</version>
104104
</dependency>
105105
<dependency>
106106
<groupId>javax.servlet</groupId>
@@ -115,7 +115,7 @@
115115
<dependency>
116116
<groupId>org.objenesis</groupId>
117117
<artifactId>objenesis</artifactId>
118-
<version>3.4</version>
118+
<version>3.6</version>
119119
</dependency>
120120
<dependency>
121121
<groupId>org.reactivestreams</groupId>
@@ -240,7 +240,7 @@
240240
<plugin>
241241
<groupId>org.codehaus.mojo</groupId>
242242
<artifactId>build-helper-maven-plugin</artifactId>
243-
<version>3.6.0</version>
243+
<version>3.6.2</version>
244244
<executions>
245245
<execution>
246246
<id>add-test-source</id>
@@ -284,7 +284,7 @@
284284
<plugin>
285285
<groupId>org.apache.maven.plugins</groupId>
286286
<artifactId>maven-compiler-plugin</artifactId>
287-
<version>3.13.0</version>
287+
<version>3.16.0</version>
288288
<configuration>
289289
<source>11</source>
290290
<target>11</target>
@@ -294,12 +294,12 @@
294294
<plugin>
295295
<groupId>org.apache.maven.plugins</groupId>
296296
<artifactId>maven-surefire-plugin</artifactId>
297-
<version>3.5.1</version>
297+
<version>3.6.0</version>
298298
<dependencies>
299299
<dependency>
300300
<groupId>org.apache.maven.surefire</groupId>
301301
<artifactId>surefire-junit4</artifactId>
302-
<version>3.5.1</version>
302+
<version>3.5.6</version>
303303
</dependency>
304304
</dependencies>
305305
<configuration>
@@ -311,7 +311,7 @@
311311
<plugin>
312312
<groupId>org.apache.maven.plugins</groupId>
313313
<artifactId>maven-jar-plugin</artifactId>
314-
<version>3.4.2</version>
314+
<version>3.5.1</version>
315315
<executions>
316316
<execution>
317317
<id>test-jar</id>
@@ -326,7 +326,7 @@
326326
<plugin>
327327
<groupId>org.apache.maven.plugins</groupId>
328328
<artifactId>maven-enforcer-plugin</artifactId>
329-
<version>3.5.0</version>
329+
<version>3.6.3</version>
330330
<executions>
331331
<execution>
332332
<id>enforce</id>
@@ -342,14 +342,13 @@
342342
</executions>
343343
</plugin>
344344
<plugin>
345-
<groupId>org.sonatype.plugins</groupId>
346-
<artifactId>nexus-staging-maven-plugin</artifactId>
347-
<version>1.7.0</version>
345+
<groupId>org.sonatype.central</groupId>
346+
<artifactId>central-publishing-maven-plugin</artifactId>
347+
<version>0.11.0</version>
348348
<extensions>true</extensions>
349349
<configuration>
350-
<serverId>ossrh</serverId>
351-
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
352-
<autoReleaseAfterClose>true</autoReleaseAfterClose>
350+
<publishingServerId>central</publishingServerId>
351+
<autoPublish>true</autoPublish>
353352
</configuration>
354353
</plugin>
355354
</plugins>
@@ -363,7 +362,7 @@
363362
<plugin>
364363
<groupId>org.apache.maven.plugins</groupId>
365364
<artifactId>maven-source-plugin</artifactId>
366-
<version>3.3.1</version>
365+
<version>3.4.0</version>
367366
<executions>
368367
<execution>
369368
<id>attach-sources</id>
@@ -377,7 +376,7 @@
377376
<plugin>
378377
<groupId>org.apache.maven.plugins</groupId>
379378
<artifactId>maven-javadoc-plugin</artifactId>
380-
<version>3.10.1</version>
379+
<version>3.12.0</version>
381380
<executions>
382381
<execution>
383382
<id>attach-javadocs</id>
@@ -390,7 +389,7 @@
390389
<plugin>
391390
<groupId>org.apache.maven.plugins</groupId>
392391
<artifactId>maven-gpg-plugin</artifactId>
393-
<version>3.2.7</version>
392+
<version>3.2.8</version>
394393
<executions>
395394
<execution>
396395
<id>sign-artifacts</id>
@@ -429,8 +428,8 @@
429428
</licenses>
430429
<distributionManagement>
431430
<snapshotRepository>
432-
<id>ossrh</id>
433-
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
431+
<id>central</id>
432+
<url>https://central.sonatype.com/repository/maven-snapshots/</url>
434433
</snapshotRepository>
435434
</distributionManagement>
436435
<scm>

‎renovate.json‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,13 @@
3030
"org.springframework"
3131
],
3232
"allowedVersions": "<6.0.0"
33+
},
34+
{
35+
"description": "Release/snapshot builds use the minimum supported JDK",
36+
"matchDepNames": [
37+
"java-jdk"
38+
],
39+
"enabled": false
3340
}
3441
]
3542
}

‎src/main/kotlin/graphql/kickstart/tools/GenericType.kt‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,13 @@ internal open class GenericType(protected val mostSpecificType: JavaType, protec
151151
}
152152
}
153153
is TypeVariable<*> -> {
154-
if (declaringType is ParameterizedType) {
155-
TypeUtils.getRawType(type, declaringType)
154+
val genericDeclaration = type.genericDeclaration
155+
if (declaringType is ParameterizedType && genericDeclaration is Class<*>) {
156+
// keep the full type argument (e.g. List<Foo>) rather than its raw class so nested generics aren't lost
157+
TypeUtils.getTypeArguments(declaringType, genericDeclaration)?.get(type)
158+
?.takeIf { it != type }
159+
?.let { replaceTypeVariable(it) }
160+
?: type
156161
} else {
157162
type
158163
}

‎src/main/kotlin/graphql/kickstart/tools/SchemaClassScanner.kt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ internal class SchemaClassScanner(
371371
handleFoundType(typeClassMatcher.match(TypeClassMatcher.PotentialMatch.parameterType(
372372
inputValueDefinition.type,
373373
inputValueJavaType,
374-
GenericType(javaType, options).relativeToType(inputValueJavaType),
374+
GenericType(javaType, options).relativeToType(javaType),
375375
InputObjectReference(inputValueDefinition)
376376
)))
377377
} else {

0 commit comments

Comments
 (0)