Skip to content

Commit 2f7fdb2

Browse files
committed
Update to latest version of graphql-java (16.2)
1 parent 692b7a4 commit 2f7fdb2

File tree

6 files changed

+10
-8
lines changed

6 files changed

+10
-8
lines changed

core/pom.xml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,17 @@
3737
<dependency>
3838
<groupId>com.graphql-java</groupId>
3939
<artifactId>graphql-java</artifactId>
40-
<version>15.0</version>
40+
<version>16.2</version>
4141
</dependency>
4242
<dependency>
4343
<groupId>org.atteo</groupId>
4444
<artifactId>evo-inflector</artifactId>
4545
<version>1.2.2</version>
4646
</dependency>
47+
<dependency>
48+
<groupId>org.slf4j</groupId>
49+
<artifactId>slf4j-api</artifactId>
50+
</dependency>
4751

4852
<dependency>
4953
<groupId>org.junit.jupiter</groupId>

core/src/main/kotlin/org/neo4j/graphql/AugmentationHandler.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -308,8 +308,6 @@ abstract class AugmentationHandler(
308308
null
309309
}
310310

311-
fun DirectivesContainer<*>.hasDirective(name: String): Boolean = getDirective(name) != null
312-
313311
fun <T> DirectivesContainer<*>.getDirectiveArgument(directiveName: String, argumentName: String, defaultValue: T? = null): T? =
314312
getDirectiveArgument(neo4jTypeDefinitionRegistry, directiveName, argumentName, defaultValue)
315313

core/src/main/kotlin/org/neo4j/graphql/GraphQLExtensions.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,8 @@ fun <T> DirectivesContainer<*>.getDirectiveArgument(typeRegistry: TypeDefinition
136136
?: defaultValue
137137
}
138138

139+
fun DirectivesContainer<*>.getDirective(name: String): Directive? = directives.firstOrNull { it.name == name }
140+
139141
@Suppress("UNCHECKED_CAST")
140142
fun <T> DirectivesContainer<*>.getMandatoryDirectiveArgument(typeRegistry: TypeDefinitionRegistry, directiveName: String, argumentName: String, defaultValue: T? = null): T =
141143
getDirectiveArgument(typeRegistry, directiveName, argumentName, defaultValue)

core/src/main/kotlin/org/neo4j/graphql/Translator.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ import graphql.language.FragmentDefinition
77
import graphql.language.OperationDefinition
88
import graphql.language.OperationDefinition.Operation.MUTATION
99
import graphql.language.OperationDefinition.Operation.QUERY
10+
import graphql.parser.InvalidSyntaxException
1011
import graphql.parser.Parser
1112
import graphql.schema.DataFetchingEnvironmentImpl.newDataFetchingEnvironment
1213
import graphql.schema.GraphQLFieldDefinition
1314
import graphql.schema.GraphQLObjectType
1415
import graphql.schema.GraphQLSchema
15-
import org.antlr.v4.runtime.misc.ParseCancellationException
1616
import java.math.BigDecimal
1717
import java.math.BigInteger
1818

@@ -85,7 +85,7 @@ class Translator(val schema: GraphQLSchema) {
8585
try {
8686
val parser = Parser()
8787
return parser.parseDocument(query)
88-
} catch (e: ParseCancellationException) {
88+
} catch (e: InvalidSyntaxException) {
8989
// todo proper structured error
9090
throw e
9191
}

core/src/test/resources/augmentation-tests.adoc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -668,8 +668,6 @@ input _HasMoviesFilter {
668668
movies_some: _MovieFilter
669669
}
670670
671-
input _HasMoviesInput
672-
673671
input _Knows0Filter {
674672
AND: [_Knows0Filter!]
675673
NOT: [_Knows0Filter!]

examples/graphql-spring-boot/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
<properties>
1818
<testcontainers.version>1.15.3</testcontainers.version>
19-
<graphql-kotlin.version>4.0.1</graphql-kotlin.version>
19+
<graphql-kotlin.version>4.1.1</graphql-kotlin.version>
2020
<spring-boot.version>2.3.10.RELEASE</spring-boot.version>
2121
</properties>
2222

0 commit comments

Comments
 (0)