abstract class ExtensionFieldDefinition(val field: GraphQLFieldDefinition, val cost: Int = 0) : FieldDefinition

Definition of an extension field on a Node

Parameters

field

the field definition in the GraphQL schema

cost

the cost of this field, defaults to 0

Constructors

Link copied to clipboard
constructor(field: GraphQLFieldDefinition, cost: Int = 0)

Properties

Link copied to clipboard
val cost: Int
Link copied to clipboard
val field: GraphQLFieldDefinition
Link copied to clipboard
open override val graphQLName: String

The name of the field in the GraphQL schema

Link copied to clipboard
val property: KProperty1<*, *>?

Functions

Link copied to clipboard
open override fun createGraphQLResult(result: Any?, lazyLoadingContext: LazyLoadingContext): Any?

Creates the field result for a graphql query

Link copied to clipboard
open override fun createQueryEntry(dfe: DataFetchingEnvironment, context: FieldFetchingContext, nodeQueryParser: NodeQueryParser, onlyOnTypes: List<NodeDefinition>?): NodeQueryEntry<*>

Creates the query part entry which can be used to fetch this field

Link copied to clipboard
abstract fun generateFetcher(dfe: DataFetchingEnvironment, arguments: Map<String, Any?>, node: Node, nodeDefinition: NodeDefinition): Expression

Generates the Cypher expression used to fetch the field

Link copied to clipboard
internal open override fun generateFieldDefinition(transformationContext: SchemaTransformationContext): GraphQLFieldDefinition?

Generates a field definition

Link copied to clipboard
abstract fun transformResult(result: Value): Any

Transforms the result fetched from the database to the result returned via the GraphQL API By default, this is the identity function