anchor.diff: -
  -
  -mutation getToken {
  -  getToken(username: "User123456", password: "123456") {
  -    token
  -    error
  -  }
  -}
  -
  -
  -query aaa {
  -  FortuneCookie
  -  Config {
  -    alarmTypes {
  -      code
  -      label
  -    }
  -  }
  -  User(token: "c482dc1c-1c18-4ca6-be26-dd69cb9ed79a") {
  +{
  +  "token": "fbe3ec12-6436-4504-a61f-ea26176b9580",
  +  "districtID": 8, "siteID": 12, "cabinetID": 50, "deviceID": 37,
  +	"areaType": "Company", "fromTime": "2016-10-20", "toTime": "2016-10-23"
  +}
  +query MainPageData($token: String!) {
  +  User(token: $token) {
  +    id
       logined
       name
  -  }
  -  Company(token: "c482dc1c-1c18-4ca6-be26-dd69cb9ed79a") {
  -    id
  -    areaType
  +    companyName
  +    departmentName
  +    role
  +  }
  +  Company(token: $token) {
  +    id
  +    name
       pie {
         total
         current
         rate
         unit
       }
  -    districts: children {
  -      sites: children {
  -        id
  -      }
  -    }
  -  }
  -}
  -
  -
  -query aaa {
  -  Company(token: "c482dc1c-1c18-4ca6-be26-dd69cb9ed79a") {
  -    id
  -    districts: children {
  -      id
  -      sites: children {
  -        id
  +    unreadAlarmAmount
  +    unConfirmedAlarmAmount
  +  }
  +}
  +
  +query SiteDetailData($token: String!, $districtID: Int!, $siteID: Int!) {
  +  Config {
  +    indicatorTypes(token: $token) {
  +      id
  +      key
  +      name
  +      unit
  +    }
  +  }
  +  Company(token: $token) {
  +    id
  +    district: children(id: $districtID) {
  +      id
  +      name
  +      areaType
  +      site: children(id: $siteID) {
  +        id
  +        name
  +        unreadAlarmAmount
  +        pie {
  +          total
  +          current
  +          rate
  +          unit
  +        }
           infos {
             name
             value
  
positive.code:   }
  }
  
  query ModuleListData($token: String!, $areaType: AreaType!, $districtID: Int, $siteID: Int, $deviceID: Int, $sources: [String], $fromTime: String, $toTime: String, $scale: String) {
    Config {
      indicatorTypes(token: $token) {
        id
        key
        name
        unit
      }
    }
    LineChart(token: $token, areaType: $areaType, sources: $sources, districtID: $districtID, siteID: $siteID, deviceID: $deviceID, fromTime: $fromTime, toTime: $toTime, scale: $scale) {
      source
      lineChart {
        time
        value
      }
    }
    LineChartSources(token: $token, areaType: $areaType, districtID: $districtID, siteID: $siteID, deviceID: $deviceID)
  }
  {
    "token": "c482dc1c-1c18-4ca6-be26-dd69cb9ed79a",
    "areaType": "Device",
    "deviceID": 37,
    "siteID": 12
  }
  
  query aaa {
    Company(token: "c482dc1c-1c18-4ca6-be26-dd69cb9ed79a") {
      id
      districts: children {
        id
        sites: children {
          id
          cabinets {
            id
            switches {
              id
              lineChart {
                source
                lineChart {
                  time
                  value
                }
              }
            }
          }
        }
      }
    }
  }
  
negative.code:           current
            total
            unit
            deviceId
            cabinetID
            indicators {
              code
              value
            }
          }
          areaType
        }
      }
    }
  }
  
  query LineChartData($token: String!, $areaType: AreaType!, $districtID: Int, $siteID: Int, $deviceID: Int, $sources: [String], $fromTime: String, $toTime: String, $scale: String) {
    Config {
      indicatorTypes(token: $token) {
        id
        key
        name
        unit
      }
    }
    LineChart(token: $token, areaType: $areaType, sources: $sources, districtID: $districtID, siteID: $siteID, deviceID: $deviceID, fromTime: $fromTime, toTime: $toTime, scale: $scale) {
      source
      lineChart {
        time
        value
      }
    }
    LineChartSources(token: $token, areaType: $areaType, districtID: $districtID, siteID: $siteID, deviceID: $deviceID)
  }
  
  query DistrictListData($token: String!) {
    Company(token: $token) {
      id
      district: children {
        id
        name
        areaType
        site: children {
          id
          name
          areaType
        }
      }
    }
  }
  
  query DistrictDetailData($token: String!, $districtID: Int!) {
    Company(token: $token) {
      id
      district: children(id: $districtID) {
        id
        name
        pie {
          total
          current
          rate
          unit
        }
        site: children {
          id
          name
        }
      }
    }
  }
  
  query DeviceListData($token: String!, $districtID: Int!, $siteID: Int!) {
    Company(token: $token) {
      id
      district: children(id: $districtID) {
        id
        site: children(id: $siteID) {
          id
          name
          cabinets {
            id
            name
            type
            switches {
              id
              isOn
              name
            }
          }
        }
      }
    }
  }
  
  query DeviceDetailData($token: String!, $districtID: Int!, $siteID: Int!, $cabinetID: Int!, $deviceID: Int!) {
    Config {
      indicatorTypes(token: $token) {
        id
        key
        name
        unit
      }
    }
    Company(token: $token) {
      id
      district: children(id: $districtID) {
        id
        site: children(id: $siteID) {
          id
          cabinets(id: $cabinetID) {
            id
            switches(id: $deviceID) {
              id
              isOn
              name
              unreadAlarmAmount
              alarmInfos {
                id
                deviceName
                code
              }
              realtimeData {
                code
                value
              }
            }
          }
        }
      }
    }
    List: Company(token: $token) {
      id
      district: children(id: $districtID) {
        id
        site: children(id: $siteID) {
          id
          name
          cabinets(id: $cabinetID) {
            id
            switches {
              id
              name
            }
          }
        }
      }
    }
  }
  
  query AlarmData(
      $token: String!,
      $areaType: AreaType!,
      $districtID: Int,
      $siteID: Int,
      $gatewayID: Int,
      $cabinetID: Int,
      $deviceID: Int,
      $pagesize: Int,
      $pageIndex: Int,
      $orderBy: OrderByType,
      $fromTime: String,
      $toTime: String,
      $alarmCodes: [String]
    ) {
    User(token: $token) {
      id
      name
      companyId
    }
    Config {
      alarmTypes {
        code
        label
      }
    }
    Alarm(
      token: $token,
      areaType: $areaType,
      districtID: $districtID,
      siteID: $siteID,
      gatewayID: $gatewayID,
      cabinetID: $cabinetID,
      deviceID: $deviceID,
      pagesize: $pagesize,
      pageIndex: $pageIndex,
      orderBy: $orderBy,
      fromTime: $fromTime,
      toTime: $toTime,
      alarmCodes: $alarmCodes
    ) {
      id
      code
      timestamp
      readed
      confirmed
      message
  
      confirmedUserID
      confirmedUserName
      districtID
      districtName
      siteID
      siteName
      gatewayID
      gatewayName
      cabinetID
      cabinetName
      deviceID
      deviceName
    }
  }
  
  mutation getToken {
    getToken(username: "User123456", password: "123456") {
      token
      error
    }
  }
  
  