Skip to content

Commit 4a0017d

Browse files
authored
Merge pull request #800 from graphql-java-kickstart/renovate/major-graphql-java.version
fix(deps): update dependency com.graphql-java:graphql-java to v25
2 parents cdb8d7a + e21e339 commit 4a0017d

File tree

11 files changed

+51
-40
lines changed

11 files changed

+51
-40
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
with:
2626
java-version: '11'
2727
distribution: 'adopt'
28-
server-id: ossrh
28+
server-id: central
2929
server-username: MAVEN_USERNAME
3030
server-password: MAVEN_PASSWORD
3131
gpg-private-key: ${{ secrets.GPG_SIGNING_KEY }}

.github/workflows/snapshot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
with:
2929
java-version: '11'
3030
distribution: 'adopt'
31-
server-id: ossrh
31+
server-id: central
3232
server-username: MAVEN_USERNAME
3333
server-password: MAVEN_PASSWORD
3434
- name: Publish release

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ kotlin.version=2.1.20
2626

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

3232
### Using Maven
@@ -41,7 +41,7 @@ Set the Kotlin version in your `<properties>` section:
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>
4646
<version>14.0.1</version>
4747
</dependency>

pom.xml

Lines changed: 10 additions & 11 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.2-SNAPSHOT</version>
7+
<version>14.0.3-SNAPSHOT</version>
88
<packaging>jar</packaging>
99

1010
<name>GraphQL Java Tools</name>
@@ -17,7 +17,7 @@
1717
<kotlin.version>2.3.10</kotlin.version>
1818
<kotlin-coroutines.version>1.10.2</kotlin-coroutines.version>
1919
<jackson.version>2.21.0</jackson.version>
20-
<graphql-java.version>23.1</graphql-java.version>
20+
<graphql-java.version>25.0</graphql-java.version>
2121
<reactive-streams.version>1.0.4</reactive-streams.version>
2222

2323
<maven.compiler.source>${java.version}</maven.compiler.source>
@@ -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.9.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>
@@ -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>

src/main/kotlin/graphql/kickstart/tools/relay/RelayConnectionFactory.kt

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ class RelayConnectionFactory : TypeDefinitionFactory {
5454
.fieldDefinition(FieldDefinition("pageInfo", TypeName("PageInfo")))
5555
.build()
5656

57-
private fun createEdgeDefinition(connectionType: String, nodeType: String): ObjectTypeDefinition =
57+
private fun createEdgeDefinition(connectionType: String, nodeType: String?): ObjectTypeDefinition =
5858
ObjectTypeDefinition.newObjectTypeDefinition()
5959
.name(connectionType + "Edge")
6060
.fieldDefinition(FieldDefinition("cursor", TypeName("String")))
@@ -70,7 +70,7 @@ class RelayConnectionFactory : TypeDefinitionFactory {
7070
.fieldDefinition(FieldDefinition("endCursor", TypeName("String")))
7171
.build()
7272

73-
private fun Directive.forTypeName(): String {
73+
private fun Directive.forTypeName(): String? {
7474
return (this.getArgument("for").value as StringValue).value
7575
}
7676

@@ -82,7 +82,13 @@ class RelayConnectionFactory : TypeDefinitionFactory {
8282
return this.directives.map { it.withField(this) }
8383
}
8484

85-
class DirectiveWithField(val field: FieldDefinition, name: String, arguments: List<Argument>, sourceLocation: SourceLocation, comments: List<Comment>) : Directive(name, arguments, sourceLocation, comments, IgnoredChars.EMPTY, emptyMap()) {
85+
class DirectiveWithField(
86+
val field: FieldDefinition,
87+
name: String,
88+
arguments: List<Argument>,
89+
sourceLocation: SourceLocation?,
90+
comments: List<Comment>
91+
) : Directive(name, arguments, sourceLocation, comments, IgnoredChars.EMPTY, emptyMap()) {
8692
fun getTypeName(): String {
8793
val type = field.type
8894
if (type is NonNullType) {

src/main/kotlin/graphql/kickstart/tools/resolver/FieldResolverScanner.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,9 @@ internal class FieldResolverScanner(val options: SchemaParserOptions) {
202202
isSubscription = isSubscription || search.source is GraphQLSubscriptionResolver
203203
}
204204

205-
val sourceName = if (field.sourceLocation != null && field.sourceLocation.sourceName != null) field.sourceLocation.sourceName else "<unknown>"
206-
val sourceLocation = if (field.sourceLocation != null) "$sourceName:${field.sourceLocation.line}" else "<unknown>"
205+
val sourceName = field.sourceLocation?.sourceName ?: "<unknown>"
206+
val sourceLocation = field.sourceLocation?.let { "$sourceName:${it.line}" } ?: "<unknown>"
207+
207208
return "No method${if (scannedProperties) " or field" else ""} found as defined in schema $sourceLocation with any of the following signatures " +
208209
"(with or without one of $allowedLastArgumentTypes as the last argument), in priority order:\n${signatures.joinToString("\n ")}" +
209210
if (isSubscription) "\n\nNote that a Subscription data fetcher must return a Publisher of events" else ""

src/test/kotlin/graphql/kickstart/tools/EndToEndSpecHelper.kt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,7 @@ val customScalarUUID = GraphQLScalarType.newScalar()
501501
val customScalarMap = GraphQLScalarType.newScalar()
502502
.name("customScalarMap")
503503
.description("customScalarMap")
504-
.coercing(object : Coercing<Map<String, Any>, Map<String, Any>> {
504+
.coercing(object : Coercing<Map<String, Any?>, Map<String, Any?>> {
505505

506506
@Suppress("UNCHECKED_CAST")
507507
override fun parseValue(input: Any, context: GraphQLContext, locale: Locale): Map<String, Any> = input as Map<String, Any>
@@ -515,8 +515,10 @@ val customScalarMap = GraphQLScalarType.newScalar()
515515
variables: CoercedVariables,
516516
context: GraphQLContext,
517517
locale: Locale
518-
): Map<String, Any> =
519-
(input as ObjectValue).objectFields.associateBy { it.name }.mapValues { (it.value.value as StringValue).value }
518+
): Map<String, Any?> =
519+
(input as ObjectValue).objectFields
520+
.associateBy { it.name }
521+
.mapValues { (it.value.value as StringValue).value }
520522
})
521523
.build()
522524

src/test/kotlin/graphql/kickstart/tools/MethodFieldResolverDataFetcherTest.kt

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -296,22 +296,25 @@ class MethodFieldResolverDataFetcherTest {
296296
return FieldResolverScanner(options).findFieldResolver(field, resolverInfo).createDataFetcher()
297297
}
298298

299-
private fun createEnvironment(source: Any = Object(), arguments: Map<String, Any> = emptyMap(), context: GraphQLContext? = null): DataFetchingEnvironment {
300-
return DataFetchingEnvironmentImpl.newDataFetchingEnvironment(buildExecutionContext())
301-
.source(source)
302-
.arguments(arguments)
303-
.graphQLContext(context)
304-
.build()
305-
}
306-
307-
private fun buildExecutionContext(): ExecutionContext {
299+
private fun createEnvironment(
300+
source: Any = Object(),
301+
arguments: Map<String, Any> = emptyMap(),
302+
context: GraphQLContext = GraphQLContext.newContext().build()
303+
) = DataFetchingEnvironmentImpl.newDataFetchingEnvironment(buildExecutionContext(context))
304+
.source(source)
305+
.arguments(arguments)
306+
.graphQLContext(context)
307+
.build()
308+
309+
private fun buildExecutionContext(context: GraphQLContext): ExecutionContext {
308310
val executionStrategy = object : ExecutionStrategy() {
309311
override fun execute(executionContext: ExecutionContext, parameters: ExecutionStrategyParameters): CompletableFuture<ExecutionResult> {
310312
throw AssertionError("should not be called")
311313
}
312314
}
313315
val executionId = ExecutionId.from("executionId123")
314316
return ExecutionContextBuilder.newExecutionContextBuilder()
317+
.graphQLContext(context)
315318
.instrumentation(SimplePerformantInstrumentation.INSTANCE)
316319
.executionId(executionId)
317320
.queryStrategy(executionStrategy)

src/test/kotlin/graphql/kickstart/tools/MethodFieldResolverTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ class MethodFieldResolverTest {
246246
val value get() = internalValue
247247

248248
companion object {
249-
fun of(input: Any) = when (input) {
249+
fun of(input: Any?) = when (input) {
250250
is String -> CustomScalar(input)
251251
else -> throw IllegalArgumentException()
252252
}

src/test/kotlin/graphql/kickstart/tools/SchemaClassScannerDirectiveTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class SchemaClassScannerDirectiveTest {
3737
assertEquals(value.value, "some thing")
3838
}
3939

40-
data class CustomValue(val value: String)
40+
data class CustomValue(val value: String?)
4141
private val customValueScalar: GraphQLScalarType = GraphQLScalarType.newScalar()
4242
.name("CustomValue")
4343
.coercing(object : Coercing<CustomValue, String> {

0 commit comments

Comments
 (0)