Skip to content

Commit 0660de0

Browse files
authored
fix build (#125)
1 parent e579cd2 commit 0660de0

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

src/main/kotlin/org/neo4j/graphql/BuildingEnv.kt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ package org.neo4j.graphql
33
import graphql.Scalars
44
import graphql.schema.*
55

6-
import graphql.schema.GraphQLTypeUtil.simplePrint
7-
86
class BuildingEnv(val types: MutableMap<String, GraphQLNamedType>) {
97

108
private val typesForRelation = types.values
@@ -25,7 +23,7 @@ class BuildingEnv(val types: MutableMap<String, GraphQLNamedType>) {
2523
type = GraphQLNonNull(type)
2624
}
2725
return GraphQLFieldDefinition.newFieldDefinition()
28-
.name("$prefix${simplePrint(resultType)}")
26+
.name("$prefix${resultType.name()}")
2927
.arguments(getInputValueDefinitions(scalarFields, forceOptionalProvider))
3028
.type(type.ref() as GraphQLOutputType)
3129
}
@@ -73,7 +71,7 @@ class BuildingEnv(val types: MutableMap<String, GraphQLNamedType>) {
7371
}
7472
val existingFilterType = types[filterName]
7573
if (existingFilterType != null) {
76-
return simplePrint(existingFilterType as? GraphQLInputType)
74+
return (existingFilterType as? GraphQLInputType)?.name()
7775
?: throw IllegalStateException("Filter type $filterName is already defined but not an input type")
7876
}
7977
createdTypes.add(filterName)

src/main/kotlin/org/neo4j/graphql/handler/projection/ProjectionBase.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ open class ProjectionBase {
214214
} ?: when {
215215
isObjectField -> {
216216
val patternComprehensions = if (fieldDefinition.isNeo4jType()) {
217-
if (propertiesToSkipDeepProjection.contains(fieldDefinition.innerName())) {
217+
if (propertiesToSkipDeepProjection.contains(fieldDefinition.name)) {
218218
// if the property has an internal type like Date or DateTime and we want to compute on this
219219
// type (e.g sorting), we need to pass out the whole property and do the concrete projection
220220
// after the outer computation is done

src/test/resources/translator-tests1.adoc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,10 @@ MATCH (person:Person) RETURN person { .name, .age } AS person
408408
.GraphQL-Query
409409
[source,graphql]
410410
----
411-
{ foo:person {n:name } }
411+
{ foo:person {
412+
n:name
413+
}
414+
}
412415
----
413416

414417
.Cypher params

0 commit comments

Comments
 (0)