Skip to content

Instantly share code, notes, and snippets.

@dagda1
Created February 11, 2021 12:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dagda1/418e0e115f9ec186173c7075e4720bd9 to your computer and use it in GitHub Desktop.
Save dagda1/418e0e115f9ec186173c7075e4720bd9 to your computer and use it in GitHub Desktop.
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