{"id":16481989,"url":"https://github.com/bod/android-graphql-sample","last_synced_at":"2025-03-21T07:30:38.619Z","repository":{"id":138160861,"uuid":"267695957","full_name":"BoD/android-graphql-sample","owner":"BoD","description":"Apollo GraphQL Android Sample","archived":false,"fork":false,"pushed_at":"2024-07-16T09:40:48.000Z","size":1320,"stargazers_count":18,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-01T03:51:16.950Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BoD.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-05-28T21:02:02.000Z","updated_at":"2025-02-19T20:34:44.000Z","dependencies_parsed_at":"2024-01-22T15:46:07.610Z","dependency_job_id":"caee1292-f701-4674-a230-c817244948ec","html_url":"https://github.com/BoD/android-graphql-sample","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BoD%2Fandroid-graphql-sample","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BoD%2Fandroid-graphql-sample/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BoD%2Fandroid-graphql-sample/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BoD%2Fandroid-graphql-sample/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BoD","download_url":"https://codeload.github.com/BoD/android-graphql-sample/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244119382,"owners_count":20400984,"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","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":[],"created_at":"2024-10-11T13:09:17.605Z","updated_at":"2025-03-21T07:30:38.188Z","avatar_url":"https://github.com/BoD.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GraphQL Sample\n\nThis is a small example project that uses the [Apollo Kotlin](https://github.com/apollographql/apollo-kotlin) GraphQL library on Android, with Github's API.\n\nThe aim is to explore this library and GraphQL in general.\n\n## Get a Github API Oauth token\n\n👉 https://developer.github.com/v4/guides/forming-calls/#authenticating-with-graphql\n\nThen put it in `build.properties` (follow the sample in build.properties.SAMPLE).\n\n## Get the GraphQL schema file\n\nEither, manually:\n👉 https://github.com/octokit/graphql-schema\n\nOr using Apollo's gradle task:\n\n```shell\n./gradlew downloadGithubApolloSchemaFromIntrospection\n```\n\n(replace `\u003cyour token\u003e` by the token you got from Github)\n\n## Architecture of the project\n\nThere is a single activity which is a host for 4 Compose layouts:\n\n### `ViewerInfoLayout`\nShows information about the \"Viewer\" (the currently logged-in user is called \"Viewer\" in the Github API):\n\n- Login\n- Name\n- Email\n- Total number of repos\n- Info about the first 10 repos (name, description, number of stars)\n\nNoteworthy:\n- all this information is fetched with a single query (see `ViewerInfoQuery.graphql`)\n- use of the `@nonnull` annotation (specific to the Apollo Kotlin library), to \"improve\" the schema\n\n### `RepositoryListLayout`\n\nDisplays a paginated list of the viewer's repositories.\n\nNoteworthy:\n- use of a GraphQL \"fragment\" (see `UserRepositoryListQuery.graphql`)\n- how pagination works in GraphQL (\"cursor\")\n- integration with the Android Pagination component\n\n### `RepositorySearchLayout`\n\nUse the \"search\" operation and demonstrate a case with heterogeneous results - either `User` or `Organization` (see `SearchQuery.graphql`)\n\n### `MiscLayout`\n\nDemonstrates mutations and error handling (see `AddCommentToIssueMutation.graphql`)\n\n- Add comment to an issue that exists\n- Add comment to an issue that doesn't exist (error case)\n\n## Useful links\n\n- [GraphQL spec](https://spec.graphql.org/)\n- [Intro to GraphQL](https://graphql.org/learn/)\n- [Apollo Kotlin README](https://github.com/apollographql/apollo-kotlin)\n- [Github GraphQL API doc](https://developer.github.com/v4/)\n- [Github GraphQL Explorer](https://developer.github.com/v4/explorer/) ([More info](https://developer.github.com/v4/guides/using-the-explorer/))\n- [GraphQL pagination](https://graphql.org/learn/pagination/)\n\n\n## License\n\nThis is [PUBLIC DOMAIN](https://creativecommons.org/publicdomain/zero/1.0/legalcode).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbod%2Fandroid-graphql-sample","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbod%2Fandroid-graphql-sample","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbod%2Fandroid-graphql-sample/lists"}