Skip to content

Improve query structure #72

@merlinc

Description

@merlinc

Thinking about this as a more general aggreation API, there are a number of different scenarios that would be useful to be supported:

Basic dashboard load

query BasicLoad($org: String, $project: String) {
  status(org: $org, project: $project) {
    org
    project
    commits {
       message
       sha
     }
  }
}

Get error messages for all failed builds

{
  builds(status:"failed") {
    error{
      message
    }
  }
}

Get number of commits, with aggregation

{
  aggregation {
    commits(groupBy:'week') {
      field(name:'username')
      count(type:'mean')

    }
  }
}

Get a list of basic deployments

{
  deployments(org:"merlinc", repo:"release-status-testbed") {
    environment
    deployment {
      sha
    }
    build {
      sha
    }
  }
  commit
}

Use Nodes and Edges

{
  commits(org:"merlinc", repo:"release-status-testbed", limit:10) {
    id
    name
    deploymentConnection(first: 3) {
      edges {
        cursor
        node {
          id
          name
        }
      }
    }
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions