SimulationHandler

class SimulationHandler(graphqlClient: GraphQLClient)

Utility to control simulation lifecycle through GraphQL operations.

Parameters

graphqlClient

the GraphQL client connected to the server.

Constructors

Link copied to clipboard
constructor(graphqlClient: GraphQLClient)

Functions

Link copied to clipboard

Pauses the simulation and returns the mutation data.

Link copied to clipboard

Starts or resumes the simulation and returns the mutation data. The method checks that the returned status is "RUNNING" and throws an exception otherwise.

Link copied to clipboard
suspend fun status(): String?

Returns the current simulation status string (if available) or null.

Link copied to clipboard

Terminates the simulation and returns the mutation data.