ResponseFieldVariant

data class ResponseFieldVariant(val responseName: String, val schemaName: String, val outputType: GraphQLType, val argumentsIdentity: String = "", val condition: SelectionCondition = SelectionCondition.UNCONDITIONAL, val selectionSet: ResponseSelectionSet? = null, val runtimePaths: Set<RuntimePath> = emptySet())(source)

A single field variant in a response selection set, normalized against the schema so generators can produce correct Kotlin types.

Fields are preserved as variants rather than merged prematurely. Variants with the same responseName but different schemaName or incompatible runtimePaths are kept as separate entries.

Parameters

responseName

The key in the JSON response (alias if present, otherwise the schema field name).

schemaName

The actual field name on the schema type.

outputType

The return type of this field as resolved from the schema.

argumentsIdentity

A normalized string representation of the field's arguments, or empty if there are no arguments.

condition

The directive-derived condition controlling whether this field appears in the response.

selectionSet

Nested selections when this field returns an object, interface, or union type; null for leaf fields.

runtimePaths

The set of RuntimePath values that control when this variant is active. A field with runtimePaths empty is unconditional within its current selection set.

Constructors

Link copied to clipboard
constructor(responseName: String, schemaName: String, outputType: GraphQLType, argumentsIdentity: String = "", condition: SelectionCondition = SelectionCondition.UNCONDITIONAL, selectionSet: ResponseSelectionSet? = null, runtimePaths: Set<RuntimePath> = emptySet())

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard