Skip to content

GraphQL project fields for refs containing commit

What does this MR do and why?

Build GraphQL fields for ::Type::ProjectType to be able to fetch refs containing a given commit

Screenshots or screen recordings

Screenshot_2023-04-26_at_10.58.41

How to set up and validate locally

You can test it at http://127.0.0.1:3000/-/graphql-explorer with the following query:

query CommitParentName {
  project(fullPath: "gitlab-org/gitlab-test") {
    commitReferences(commitSha: "6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9") {
      containingBranches(excludeTipped: true) {
      	names
      }
      containingTags(excludeTipped: true) {
        names
      }
      tippingTags {
        names
      }
      tippingBranches {
        names
      }
    }
  }
}

Related to #325871 (closed)

Edited by Patrick Cyiza

Merge request reports

Loading