Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
type Service {
name: String!
ur!: String!
}
union Any = String | Float | Int | Boolean
type KeyValue {
key: String!
value: Any
}
type Scenario {
name: String!
parameters: [KeyValue!]
}
type Simulator {
name: String!
scenarios: [String!]!
}
type Simulation {
id: ID!
simulators: [Simulator!]!
services: [Service!]!
}
type Query {
simulators: [Simulator!]!
}
union ScenarioOrName = Scenario | String
type SimulationResult {
success: Boolean!
message: String
}
union AvailableSimulators = 'giraffeql' | 'auth0'
type Thing {
id: ID!
}
type Mutation {
createSimulation(
name: AvailableSimulators!
scenario: ScenarioOrName
timeToLiveInMS: Int
): Simulation
# CRUD functions
create(simulationID: ID!, type: String!, attributes: [KeyValue!]): Thing
resetSimulation(id: ID!): SimulationResult
destroySimulation(id: ID!): SimulationResult
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment