Skip to content

AppBuilderTypes

Maps operation, Template and Item keys to the application-specific types an AppBuilder uses in its method signatures.

This base version is broadly typed. The Alpyne compiler generates a specialized version for each App, keyed by operation key, Template key and Template PRN, so that handlers receive parsed input and typed Items without casts. Pass the generated interface as the TTypes parameter of AppBuilder.

Run and test it for compiling an App

readonly MutationInput: Record<string, any>

Parsed input type of each Mutation, keyed by Mutation key.


readonly MutationOutput: Record<string, any>

Result type of each Mutation, keyed by Mutation key.


readonly QueryInput: Record<string, any>

Parsed input type of each Query, keyed by Query key.


readonly QueryOutput: Record<string, any>

Result type of each Query, keyed by Query key.


readonly ReadAppInstance: ReadAppInstance

Read-only App instance handed to Query handlers as current.


readonly ReadItem: Record<string, ReadItem>

Read-only Item type of each Template, keyed by Template PRN.


readonly ReadRuntimeInstance: ReadRuntimeInstance

Read-only Runtime context handed to Query handlers as ctx.


readonly Template: Record<string, TemplateBuilder>

Template builder of each Template, keyed by Template key and by Template PRN.


readonly WriteAppInstance: WriteAppInstance

Writable App instance handed to Mutation handlers and Event Listeners as current.


readonly WriteItem: Record<string, WriteItem>

Writable Item type of each Template, keyed by Template PRN.


readonly WriteRuntimeInstance: WriteRuntimeInstance

Writable Runtime context handed to Mutation handlers and Event Listeners as ctx.