@@ -217,6 +217,7 @@ open class ProjectionBase(
217217 values.size > 1 -> values.mapIndexed { index, value -> handleLogicalOperator(value, " ${classifier}${index + 1 } " , variables) }
218218 else -> values.map { value -> handleLogicalOperator(value, " " , variables) }
219219 }
220+
220221 else -> emptyList()
221222 }
222223 }
@@ -267,9 +268,8 @@ open class ProjectionBase(
267268 projections.addAll(pro)
268269 subQueries + = sub
269270 }
270- if (nodeType is GraphQLInterfaceType
271- && ! handledFields.contains(TYPE_NAME )
272- && (env.getContext() as ? QueryContext )?.queryTypeOfInterfaces == true
271+ if ((nodeType is GraphQLInterfaceType
272+ && ! handledFields.contains(TYPE_NAME )) && env.queryContext().queryTypeOfInterfaces
273273 ) {
274274 // for interfaces the typename is required to determine the correct implementation
275275 val (pro, sub) = projectField(propertyContainer, variable, TYPE_NAME_SELECTED_FIELD , nodeType, env, variableSuffix)
@@ -340,6 +340,7 @@ open class ProjectionBase(
340340 schemaConfig.useTemporalScalars && fieldDefinition.isNeo4jTemporalType() -> {
341341 projections + = getNeo4jTypeConverter(fieldDefinition).projectField(variable, field, " " )
342342 }
343+
343344 isObjectField -> {
344345 if (fieldDefinition.isNeo4jType()) {
345346 projections + = projectNeo4jObjectType(variable, field, fieldDefinition)
@@ -349,9 +350,11 @@ open class ProjectionBase(
349350 subQueries + = sub
350351 }
351352 }
353+
352354 fieldDefinition.isNativeId() -> {
353355 projections + = id(anyNode(variable))
354356 }
357+
355358 else -> {
356359 val dynamicPrefix = fieldDefinition.dynamicPrefix()
357360 when {
@@ -368,6 +371,7 @@ open class ProjectionBase(
368371 )
369372 .asFunction()
370373 }
374+
371375 field.aliasOrName() != fieldDefinition.propertyName() -> {
372376 projections + = variable.property(fieldDefinition.propertyName())
373377 }
@@ -473,6 +477,7 @@ open class ProjectionBase(
473477 ? : " " )), variableSuffix, field.selectionSet)
474478 propertyContainer.project(projectionEntries) to subQueries
475479 }
480+
476481 is Relationship -> projectNodeFromRichRelationship(parent, fieldDefinition, variable, field, env)
477482 else -> throw IllegalArgumentException (" ${propertyContainer.javaClass.name} cannot be handled for field ${fieldDefinition.name} of type ${parent.name} " )
478483 }
@@ -535,6 +540,7 @@ open class ProjectionBase(
535540 val label = nodeType.getRelevantFieldDefinition(relInfo.endField)!! .type.innerName()
536541 node(label).named(" $childVariable${relInfo.endField.capitalize()} " ) to relInfo.endField
537542 }
543+
538544 else -> node(nodeType.name).named(childVariableName) to null
539545 }
540546
0 commit comments