All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.github.graphglue.data.execution.NodeSubQuery.kt Maven / Gradle / Ivy

Go to download

A library to develop annotation-based code-first GraphQL servers using GraphQL Kotlin, Spring Boot and Neo4j - excluding Spring GraphQL server dependencies

The newest version!
package io.github.graphglue.data.execution

import io.github.graphglue.definition.NodeDefinition
import io.github.graphglue.definition.RelationshipDefinition

/**
 * Defines a SubQuery which is part of a [NodeQuery]
 * Must only be evaluated if parent type is in `onlyOnTypes`
 *
 * @param  query the subquery
 * @param onlyOnTypes a list of parent types on which this should be evaluated
 * @param relationshipDefinition defines the relationship to fetch
 * @param resultKey used to identify the result
 */
class NodeSubQuery(
    val query: NodeQuery,
    onlyOnTypes: List,
    val relationshipDefinition: RelationshipDefinition,
    resultKey: String
) : NodeQueryPartEntry(onlyOnTypes, resultKey) {

    /**
     * The cost of the underlying [query]
     */
    override val cost: Int get() = query.cost
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy