Add project.repository.commits query to GraphQL
What does this MR do and why?
Add project.repository.commits query to GraphQL
This attaches the Repositories::CommitsResolver to the RepositoryType object for GraphQL. This allows us to query for commits from a repository.
Currently experimental while we monior performance and develop the feature.
Changelog: added
References
CommitList GraphQL query (#541920 - closed)
How to set up and validate locally
In the GDK go to the /~/graphql-explorer and use the query
{
project(fullPath: "gitlab-org/gitlab-test") {
id
repository {
commits(
ref: "master"
query: "Merged"
author: "Stan"
committedBefore: "2020-01-01"
committedAfter: "2015-01-01"
first: 4
) {
pageInfo {
hasNextPage
startCursor
endCursor
}
nodes {
sha
}
}
}
}
}
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.