Skip to content

Instantly share code, notes, and snippets.

@tsherburne
Last active June 4, 2020 17:23
Show Gist options
  • Save tsherburne/3d3fd799771016ff0535388e1145b56e to your computer and use it in GitHub Desktop.
Save tsherburne/3d3fd799771016ff0535388e1145b56e to your computer and use it in GitHub Desktop.
CPSSystemModel - GraphQL Examples

Query Projects

query Projects {
  cpsProjects {
    id
    name
  }
}

Query Attack Vectors

query Attacks {
  cpsSystemModel(projectId: "6381a6ea-f300-4fa9-a50e-5d9e6017d599") {
    project {
      name
    }
    attackVector {
      identity {
        id
        number
        name
      }
    }
  }
}

Update Project

mutation Project {
  cpsProject(
    project: {
      operation: Update
      id: "6381a6ea-f300-4fa9-a50e-5d9e6017d599"
      name: "ART-004: Pipeline - Metrics Project"
      version: "v2.0"
    }
  ) {
    id
    name
    version
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment