class NodeQueryParser(val nodeDefinitionCollection: NodeDefinitionCollection, val filterDefinitionCollection: FilterDefinitionCollection?, val objectMapper: ObjectMapper)
Parser to get NodeQuerys Can be used to create queries which load a subtree of nodes in one query
Parameters
nodeDefinitionCollection
used to get the NodeDefinition for a specific Node
filterDefinitionCollection
used to get the FilterDefinition for a specific Node, if existing
objectMapper
used to parse cursors
Constructors
Link copied to clipboard
constructor(nodeDefinitionCollection: NodeDefinitionCollection, filterDefinitionCollection: FilterDefinitionCollection?, objectMapper: ObjectMapper)
Functions
Link copied to clipboard
fun generateManyNodeQuery(definition: NodeDefinition, dataFetchingEnvironment: DataFetchingEnvironment, additionalConditions: List<CypherConditionGenerator>, requiredPermission: Permission?): NodeQuery
Link copied to clipboard
fun generateOneNodeQuery(definition: NodeDefinition, dataFetchingEnvironment: DataFetchingEnvironment, additionalConditions: List<CypherConditionGenerator>, requiredPermission: Permission?): NodeQuery
Link copied to clipboard
fun generateSearchQuery(definition: NodeDefinition, dataFetchingEnvironment: DataFetchingEnvironment, requiredPermission: Permission?): SearchQuery
Generates a SearchQuery which loads multiple Nodes Can use the dataFetchingEnvironment to fetch a subtree of node
Link copied to clipboard
fun generateSubQuery(fieldDefinition: FieldDefinition, relationshipDefinitions: List<RelationshipDefinition>, context: FieldFetchingContext, dataFetchingEnvironment: DataFetchingEnvironment, onlyOnTypes: List<NodeDefinition>?): NodeSubQuery
Generates a NodeSubQuery for the provided fieldDefinition
Link copied to clipboard
private fun getAuthorizationCondition(requiredPermission: Permission?, nodeDefinition: NodeDefinition): CypherConditionGenerator?
Gets the authorization condition for a NodeDefinition and an Permission
Link copied to clipboard
private fun getAuthorizationConditionWithRelationshipDefinition(requiredPermission: Permission?, relationshipDefinition: RelationshipDefinition): CypherConditionGenerator?
Gets the authorization condition for the related nodes of a RelationshipDefinition
Link copied to clipboard
private fun getAuthorizedRelationshipDefinitions(relationshipDefinitions: List<RelationshipDefinition>, requiredPermission: Permission?): List<AuthorizedRelationDefinition>
Maps the provided RelationshipDefinitions to AuthorizedRelationDefinitions