Defines a filter for a specific Node type Also handles parsing filters of that node type, including meta filters (filters joined by and, or, not)

Parameters

entryType

class of the type, used to have runtime type information

Type Parameters

T

the type of Node

Constructors

Link copied to clipboard
constructor(entryType: KClass<T>)

Properties

Link copied to clipboard
private lateinit var entries: Map<String, FilterEntryDefinition>

Entries of the filter (typically for fields of the type) Joined by AND in the filter generation

Link copied to clipboard
private val entryType: KClass<T>

Functions

Link copied to clipboard

Initializes FilterDefinition.entries Used so that the FilterDefinition can be created before its entries are created, allowing for cyclic filter definition. Should be called only once

Link copied to clipboard
fun parseFilter(value: Any?, permission: Permission?): Filter

Parses the GraphQL input into a filter

Link copied to clipboard
fun parseNodeFilter(value: Any?, permission: Permission?): NodeFilter

Parses a node filter Requires for each field that either

Link copied to clipboard
open override fun toGraphQLType(inputTypeCache: CacheMap<String, GraphQLInputType>): GraphQLInputType

Transforms this into a GraphQLInputType