#
# Copyright 2020 DxOS.org
#

type Result {
  timestamp: String!
  code: Int!
}

type Log {
  timestamp: String!
  log: [String]!
}

# TODO(burdon): Generic result.
type JSONResult {
  timestamp: String!
  json: String!
}

#
# Schema
#

type Query {
  system_status: JSONResult!
  ipfs_status: JSONResult!
  wns_status: JSONResult!
  # TODO(burdon): Import WNS schema!
  wns_records(type: String): JSONResult!
  wns_log: Log!
}

type Mutation {
  wns_action(command: String!): Result!
}

schema {
  mutation: Mutation
  query: Query
}
