VariableClassGenerator

Generates Kotlin data classes for operation variables.

Example output:

public data class GetMarketPlaceAppsVariables(
public val after: String? = null,
public val before: String? = null,
public val first: Int,
) : GraphQLVariables

Functions

Link copied to clipboard
fun generate(operation: GraphQLOperationInfo, packageName: String, scalarMappings: Map<String, String>, schemaIndex: SchemaIndex): FileSpec?

Generates a variable class for a single operation that has variables. Returns null if the operation has no variables.