query All {
  perspectives {
    uuid
    name
    sharedUrl
    neighbourhood {
      data {
        linkLanguage
        meta {
          links {
            author
            timestamp
            data {
              source
              predicate
              target
            }
            proof {
              valid
              invalid
              signature
              key
            }
            status
          }
        }
      }
      author
    }
  }
}

mutation Add($name: String!) {
  perspectiveAdd(name: $name) {
    uuid
    name
  }
}

mutation Remove($uuid: String!) {
  perspectiveRemove(uuid: $uuid)
}

mutation AddLink($uuid: String!, $link: LinkInput!, $status: String) {
  perspectiveAddLink(link: $link, uuid: $uuid, status: $status) {
    author
    timestamp
    status
    data {
      source
      predicate
      target
    }
    proof {
      valid
      invalid
      signature
      key
    }
  }
}

mutation RemoveLink($uuid: String!, $link: LinkExpressionInput!) {
    perspectiveRemoveLink(link: $link, uuid: $uuid)
}

query QueryLinks($uuid: String!, $query: LinkQuery!) {
  perspectiveQueryLinks(query: $query, uuid: $uuid) {
    author
    timestamp
    data {
      source
      predicate
      target
    }
    proof {
      valid
      invalid
      signature
      key
    }
    status
  }
}

query Infer($uuid: String!, $query: String!) {
  perspectiveQueryProlog(uuid: $uuid, query: $query)
}

subscription SubscriptionLinkAdded($uuid: String!) {
  perspectiveLinkAdded(uuid: $uuid) {
    author
    timestamp
    data {
      source
      predicate
      target
    }
    proof {
      valid
      invalid
      signature
      key
    }
    status
  }
}

query Snapshot($uuid: String!) {
  perspectiveSnapshot(uuid: $uuid) {
    links {
      author
      timestamp
      data {
        source
        predicate
        target
      }
      proof {
        signature
        key
      }
      status
    }
  }
}
