GET_USER_REPOS: DocumentNode = ...

Query to fetch user's repository information

Returns detailed repository data including:

  • Repository Overview:
    • Total repository count
    • Repository details for first 100 repos
  • Repository Details:
    • Name and description
    • URL
    • Star and fork counts
    • Last update time
  • Language Information:
    • Primary language with color
    • Top 10 languages used

Query Parameters:

  • Fetches first 100 repositories
  • Sorted by stars (descending)
  • Only includes repositories where user is owner
  • Excludes archived repositories

Fetches first 100 repositories, sorted by stars

const { data } = useQuery(GET_USER_REPOS, {
variables: { username: "octocat" }
});