GET_REPO_COMMITS: DocumentNode = ...

Query to fetch repository commit history

Returns commit data including:

  • Commit dates for the default branch
  • Limited to commits since 2024-01-01
  • Maximum of 100 commits

Query Parameters:

  • Repository owner and name
  • Date filter (since 2024-01-01)
  • Limit of 100 commits
const { data } = useQuery(GET_REPO_COMMITS, {
variables: {
owner: "facebook",
name: "react"
}
});