IrModelType

@Serializable
@SerialName(value = "model")
data class IrModelType(val path: String, val nullable: Boolean = false, val optional: Boolean = false, val catchTo: IrCatchTo = IrCatchTo.NoCatch, val maybeError: Boolean = false) : IrNamedType

Parameters

path

a unique path identifying a given model.

  • responseBased: Each dot is a dot in the Json response operationData.

    $operationName.Data.DroidHero fragmentData.$

    fragmentName.Data.Hero // interface fragmentData.

    $fragmentName.Data.OtherHero fragmentData.$

    fragmentName.Data.DroidHero fragmentData.

    $fragmentName.Data.HumanHero fragmentData.$

    fragmentName.Data.HumanHero.CharacterFriend fragmentInterface.$fragmentName.Data.CharacterHero

  • experimental_operationBasedWithInterfaces: operationData.

    $operationName.Data.Hero // interface operationData.$

    operationName.Data.DroidHero.OnDroid.HumanFriend.onHuman operationData.$operationName.Data.OtherHero.Starship

Constructors

Link copied to clipboard
constructor(path: String, nullable: Boolean = false, optional: Boolean = false, catchTo: IrCatchTo = IrCatchTo.NoCatch, maybeError: Boolean = false)

Properties

Link copied to clipboard
open override val catchTo: IrCatchTo

reading this type must catch exceptions during parsing

Link copied to clipboard
open override val maybeError: Boolean

Whether this type is nullable in the schema, regardless of semantic nullability. This is used for @catchByDefault

Link copied to clipboard
open override val name: String
Link copied to clipboard
open override val nullable: Boolean

This type is nullable in Kotlin

Link copied to clipboard
open override val optional: Boolean

This type is optional in Kotlin

Link copied to clipboard

Functions

Link copied to clipboard
open override fun copyWith(maybeError: Boolean, nullable: Boolean, optional: Boolean, catchTo: IrCatchTo): IrType
Link copied to clipboard
fun IrType.nullable(nullable: Boolean): IrType
Link copied to clipboard
fun IrType.optional(optional: Boolean): IrType
Link copied to clipboard
open override fun rawType(): IrModelType