Skip to content

Allow to query value streams with stages on GraphQL

Felipe Cardozo requested to merge issue_409995 into master

What does this MR do and why?

Add GraphQL endpoint to query value streams and its stages for groups and projects.

related to #409995 (closed)

How to set up and validate locally

Value streams can be queried on Premium or Foss tiers. We need to validate both. We have some key points between both tiers:

  1. At the foss level we can only query a project pre-built value stream called default
  2. With Premium we can query custom value streams for both project and groups

Foss level

  1. Start the instance in foss mode
  2. Create any project and take a note of its full path
  3. Run the query below
query projectValueStreams {
  project(fullPath: "PROJECT_PATH") {
    valueStreams {
      nodes {
        id
        name
        stages {
          name
          startEventIdentifier
          endEventIdentifier
        }
      }
    }
  }
}

The results should show the default pre-built value stream with pre-built stages . The global id also should point to default.

EE level

  1. Restart the instance on EE mode
  2. Create a group with some custom value streams or run the seed FILTER=customizable_cycle_analytics SEED_CUSTOMIZABLE_CYCLE_ANALYTICS=1 bundle exec rake db:seed_fu
  3. Run the following query
query groupValueStreams {
  group(fullPath: "GROUP_PATH") {
    valueStreams {
      nodes {
        id
        name
        stages {
          name
          startEventIdentifier
          endEventIdentifier
          startEventLabel {
            title
          }
          endEventLabel {
            title
          }
        }
      }
    }
  }
}

It should return custom value streams with custom stages. To test project endpoints on EE you can repeat the same steps from the previous section.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Felipe Cardozo

Merge request reports