{"id":15479873,"url":"https://github.com/gr2m/github-graphql-demo","last_synced_at":"2025-11-05T02:03:02.370Z","repository":{"id":66069607,"uuid":"114444075","full_name":"gr2m/github-graphql-demo","owner":"gr2m","description":"An example GitHub dashboard implemented using REST \u0026 GraphQL for comparison","archived":false,"fork":false,"pushed_at":"2020-10-15T00:01:29.000Z","size":481,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-10T01:26:03.128Z","etag":null,"topics":["demo","github","graphql"],"latest_commit_sha":null,"homepage":"https://gr2m.github.io/github-graphql-demo","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gr2m.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null},"funding":{"github":"gr2m"}},"created_at":"2017-12-16T07:57:38.000Z","updated_at":"2024-03-21T18:30:56.000Z","dependencies_parsed_at":null,"dependency_job_id":"8bcb0d72-50a2-4120-9333-3bcbd89802f6","html_url":"https://github.com/gr2m/github-graphql-demo","commit_stats":{"total_commits":5,"total_committers":1,"mean_commits":5.0,"dds":0.0,"last_synced_commit":"765d4987045c3b515429db0a7a102a84dba66e6e"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/gr2m/github-graphql-demo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gr2m%2Fgithub-graphql-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gr2m%2Fgithub-graphql-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gr2m%2Fgithub-graphql-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gr2m%2Fgithub-graphql-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gr2m","download_url":"https://codeload.github.com/gr2m/github-graphql-demo/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gr2m%2Fgithub-graphql-demo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272612271,"owners_count":24964388,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-29T02:00:10.610Z","response_time":87,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["demo","github","graphql"],"created_at":"2024-10-02T04:28:35.350Z","updated_at":"2025-10-26T13:40:44.031Z","avatar_url":"https://github.com/gr2m.png","language":"JavaScript","readme":"# GitHub GraphQL Demo\n\n\u003e An example GitHub dashboard implemented using REST \u0026 GraphQL for comparison\n\n[![Screenshot](assets/screenshot.png)](https://gr2m.github.io/github-graphql-demo)\n\nThis static HTML dashboard is to showcase the benefits of GitHub’s [GraphQL API](https://developer.github.com/v4/)\nover its [REST API](https://developer.github.com/v3/).\n\nThe dashboard shows\n\n* the authenticated user (based on [private access token](https://github.com/settings/tokens/new))\n* A list of repositories (4 by default)\n* For each repository\n  * A list of recent issues (3 by default)\n  * For each issue: Name and company for user tooltip\n  * 5 most recent stargazers.\n  * For each stargazer: Name and company for user tooltip\n\nUsing the Rest API, up to 42 request are required to render the dashboard.\nGraphQL requires a single request which looks like that:\n\n```graphql\nquery myGithubDashboard($numRepositories: Int = 4, $numIssues: Int = 3) {\n  me: viewer {\n    ...userInfo\n    repositories(\n      first: $numRepositories\n      orderBy: { field: UPDATED_AT, direction: DESC }\n      affiliations: OWNER\n    ) {\n      totalCount\n      mostStarred: nodes {\n        name\n        url\n        stargazers(last: 5) {\n          totalCount\n          mostRecent: nodes {\n            ...userInfo\n          }\n        }\n        issues(\n          first: $numIssues\n          states: [OPEN, CLOSED]\n          orderBy: { field: UPDATED_AT, direction: DESC }\n        ) {\n          mostRecent: nodes {\n            title\n            url\n            author {\n              ...userInfo\n            }\n          }\n        }\n      }\n    }\n  }\n}\n\nfragment userInfo on User {\n  login\n  url\n  avatarUrl(size: 30)\n  name\n  company\n  location\n}\n```\n\nYou can run the query in the [GitHub GraphQL API](https://developer.github.com/v4/explorer/).\n\n## License\n\n[MIT](LICENSE)\n","funding_links":["https://github.com/sponsors/gr2m"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgr2m%2Fgithub-graphql-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgr2m%2Fgithub-graphql-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgr2m%2Fgithub-graphql-demo/lists"}