@@ -225,6 +225,7 @@ open class ProjectionBase(
225225 values.size > 1 -> values.mapIndexed { index, value -> handleLogicalOperator(value, " ${classifier}${index + 1 } " , variables) }
226226 else -> values.map { value -> handleLogicalOperator(value, " " , variables) }
227227 }
228+
228229 else -> emptyList()
229230 }
230231 }
@@ -275,9 +276,8 @@ open class ProjectionBase(
275276 projections.addAll(pro)
276277 subQueries + = sub
277278 }
278- if (nodeType is GraphQLInterfaceType
279- && ! handledFields.contains(TYPE_NAME )
280- && (env.getContext() as ? QueryContext )?.queryTypeOfInterfaces == true
279+ if ((nodeType is GraphQLInterfaceType
280+ && ! handledFields.contains(TYPE_NAME )) && env.queryContext().queryTypeOfInterfaces
281281 ) {
282282 // for interfaces the typename is required to determine the correct implementation
283283 val (pro, sub) = projectField(propertyContainer, variable, TYPE_NAME_SELECTED_FIELD , nodeType, env, variableSuffix)
@@ -348,6 +348,7 @@ open class ProjectionBase(
348348 schemaConfig.useTemporalScalars && fieldDefinition.isNeo4jTemporalType() -> {
349349 projections + = getNeo4jTypeConverter(fieldDefinition).projectField(variable, field, " " )
350350 }
351+
351352 isObjectField -> {
352353 if (fieldDefinition.isNeo4jType()) {
353354 projections + = projectNeo4jObjectType(variable, field, fieldDefinition)
@@ -357,9 +358,11 @@ open class ProjectionBase(
357358 subQueries + = sub
358359 }
359360 }
361+
360362 fieldDefinition.isNativeId() -> {
361363 projections + = id(anyNode(variable))
362364 }
365+
363366 else -> {
364367 val dynamicPrefix = fieldDefinition.dynamicPrefix()
365368 when {
@@ -376,6 +379,7 @@ open class ProjectionBase(
376379 )
377380 .asFunction()
378381 }
382+
379383 field.aliasOrName() != fieldDefinition.propertyName() -> {
380384 projections + = variable.property(fieldDefinition.propertyName())
381385 }
@@ -481,6 +485,7 @@ open class ProjectionBase(
481485 ? : " " )), variableSuffix, field.selectionSet)
482486 propertyContainer.project(projectionEntries) to subQueries
483487 }
488+
484489 is Relationship -> projectNodeFromRichRelationship(parent, fieldDefinition, variable, field, env)
485490 else -> throw IllegalArgumentException (" ${propertyContainer.javaClass.name} cannot be handled for field ${fieldDefinition.name} of type ${parent.name} " )
486491 }
@@ -543,6 +548,7 @@ open class ProjectionBase(
543548 val label = nodeType.getRelevantFieldDefinition(relInfo.endField)!! .type.innerName()
544549 node(label).named(" $childVariable${relInfo.endField.capitalize()} " ) to relInfo.endField
545550 }
551+
546552 else -> node(nodeType.name).named(childVariableName) to null
547553 }
548554
0 commit comments