Skip to content

Instantly share code, notes, and snippets.

@jomicega
Last active October 21, 2019 15:47
Show Gist options
  • Save jomicega/fc627fa218b1a402956bf825c536d10c to your computer and use it in GitHub Desktop.
Save jomicega/fc627fa218b1a402956bf825c536d10c to your computer and use it in GitHub Desktop.
{
"template": {
"name": "templateName",
"adress": "templateAdress",
"phone": "templatePhone",
"nit": "templateNit",
"operationModes": [
{
"station": "station1",
"base": {
"rules": ["rule1"]
},
"compound": [
{
"name": "compound1",
"rules": ["rule1"],
"initDate": "2007-12-03",
"endDate": "2007-12-03",
"initHour": 360,
"endHour": 1000,
"operationDays": ["MONDAY"]
}
],
"maintenance": {
"rules": ["rule1"]
}
}
],
"devices": [
{
"name": "devices1name",
"station": "devices1station",
"configurator": "devices1configurator"
}
],
"equipments": [
{
"name": "equipments1name",
"station": "equipments1station"
}
],
"rules": [
{
"name": "rules1name",
"station": "rules1station",
"notifications": ["EMAIL"]
}
]
}
}
query($id:ID!){
getTemplateStation(id: $id){
devices {
...fragmentDevices
}
equipments {
...fragmentEquipments
}
rules {
...fragmentRule
}
operationModes {
...fragmentOperationMode
}
}
}
fragment fragmentRule on Rule {
name
notifications
validations {
variable {
name
}
value
operator
}
}
fragment fragmentDevices on Device {
name
configurator {
name
analogInputs {
quantity
prefix
}
analogOutputs {
quantity
prefix
}
digitalInputs {
quantity
prefix
}
digitalOutputs {
quantity
prefix
}
virtualInputs {
quantity
prefix
}
virtualOutputs {
quantity
prefix
}
}
}
fragment fragmentEquipments on Equipment {
name
variables {
name
parameter {
device {
name
}
usedBy {
name
}
}
sensor {
name
operation
}
}
}
fragment fragmentOperationMode on OperationMode {
base {
rules {
...fragmentRule
}
}
compound {
name
initDate
endDate
initHour
endHour
operationDays
rules {
...fragmentRule
}
}
maintenance {
initDate
endDate
initHour
endHour
operationDays
rules {
...fragmentRule
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment