Types

Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.FUNCTION])
annotation class AutoPayloadType(val description: String, val fieldName: String = "")

Can be applied to GraphQL mutation functions Results in automatically generated payload return types The generated type has a single field, which is the return value of the method annotated with this annotation

Link copied to clipboard
object DefaultSchemaGeneratorHooks : SchemaGeneratorHooks

SchemaGeneratorHooks which support the TypeGraphQLType annotation Also adds support for scalars:

Link copied to clipboard
@Configuration
class GraphQLConfiguration

Contains bean necessary for GraphQL configuration Provides additional scalars

Link copied to clipboard
class GropiusFunctionDataFetcher(val target: Any?, val function: KFunction<*>, applicationContext: ApplicationContext) : SpringDataFetcher

FunctionDataFetcher which handles files parameter mapping for parameters of GraphQL type JSON correctly Allows input classes to have lateinit properties which are correctly deserialized. Also handles wrapping the result of a mutation when using AutoPayloadType Extends SpringDataFetcher

Link copied to clipboard
class JSONCoercing(val objectMapper: ObjectMapper) : Coercing<JsonNode, JsonNode>

GraphQL Coercing which maps JSON objects from / to JsonNode

Link copied to clipboard
class PayloadWrapper(val payload: Any?)

Wrapper for the result of a mutation when using AutoPayloadType

Properties

Link copied to clipboard
private val DurationCoercing: <anonymous>

Coercing for DurationScalar

Link copied to clipboard
val DurationScalar: GraphQLScalarType

Scalar for an ISO 8601 Duration String

Link copied to clipboard

Property to check if a type is an OptionalInput type

Link copied to clipboard

Delay before the next retry

Link copied to clipboard

Name of the GraphQL enum providing all types of timeline items

Link copied to clipboard
private val URLCoercing: <anonymous>

Coercing for the URLScalar

Link copied to clipboard
val URLScalar: GraphQLScalarType

A URL scalar backed by a URI which guarantees that a protocol is present

Functions

Link copied to clipboard
internal fun convertArgumentValue(argumentName: String, type: KType, param: KAnnotatedElement, argumentMap: Map<String, Any?>): Any?

Convert the argument from the argument map to a class we can pass to the Kotlin function.

Link copied to clipboard
internal fun convertArgumentValueFromParam(param: KParameter, argumentMap: Map<String, Any?>): Any?

Convert the argument from the argument map to a class we can pass to the Kotlin function.

Link copied to clipboard
internal fun convertArgumentValueFromProperty(param: KProperty1<*, *>, argumentMap: Map<String, Any?>): Any?

Convert the argument from the argument map to a class we can pass to the Kotlin function.

Link copied to clipboard
private fun convertValue(paramType: KType, argumentValue: Any?): Any?

The value may already be parsed, so we can perform some checks to avoid duplicate deserialization

Link copied to clipboard
private fun mapToEnumValue(paramType: KType, enumValue: String): Enum<*>

Map a value to an enum entry

Link copied to clipboard
private fun <T : Any> mapToInlineValueClass(value: Any?, targetClass: KClass<T>): T

Maps a value to an instance of an inline value class If already is an instance of the class, this is a NO-OP

Link copied to clipboard
private fun <T : Any> mapToKotlinObject(input: Map<String, *>, targetClass: KClass<T>): T

At this point all custom scalars have been converted by graphql-java so the only thing left to parse is object maps into the nested Kotlin classes