Skip to content

Commit

Permalink
fix build (#125)
Browse files Browse the repository at this point in the history
  • Loading branch information
Andy2003 authored Sep 3, 2020
1 parent e579cd2 commit 0660de0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
6 changes: 2 additions & 4 deletions src/main/kotlin/org/neo4j/graphql/BuildingEnv.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ package org.neo4j.graphql
import graphql.Scalars
import graphql.schema.*

import graphql.schema.GraphQLTypeUtil.simplePrint

class BuildingEnv(val types: MutableMap<String, GraphQLNamedType>) {

private val typesForRelation = types.values
Expand All @@ -25,7 +23,7 @@ class BuildingEnv(val types: MutableMap<String, GraphQLNamedType>) {
type = GraphQLNonNull(type)
}
return GraphQLFieldDefinition.newFieldDefinition()
.name("$prefix${simplePrint(resultType)}")
.name("$prefix${resultType.name()}")
.arguments(getInputValueDefinitions(scalarFields, forceOptionalProvider))
.type(type.ref() as GraphQLOutputType)
}
Expand Down Expand Up @@ -73,7 +71,7 @@ class BuildingEnv(val types: MutableMap<String, GraphQLNamedType>) {
}
val existingFilterType = types[filterName]
if (existingFilterType != null) {
return simplePrint(existingFilterType as? GraphQLInputType)
return (existingFilterType as? GraphQLInputType)?.name()
?: throw IllegalStateException("Filter type $filterName is already defined but not an input type")
}
createdTypes.add(filterName)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ open class ProjectionBase {
} ?: when {
isObjectField -> {
val patternComprehensions = if (fieldDefinition.isNeo4jType()) {
if (propertiesToSkipDeepProjection.contains(fieldDefinition.innerName())) {
if (propertiesToSkipDeepProjection.contains(fieldDefinition.name)) {
// if the property has an internal type like Date or DateTime and we want to compute on this
// type (e.g sorting), we need to pass out the whole property and do the concrete projection
// after the outer computation is done
Expand Down
5 changes: 4 additions & 1 deletion src/test/resources/translator-tests1.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,10 @@ MATCH (person:Person) RETURN person { .name, .age } AS person
.GraphQL-Query
[source,graphql]
----
{ foo:person {n:name } }
{ foo:person {
n:name
}
}
----

.Cypher params
Expand Down

0 comments on commit 0660de0

Please sign in to comment.