{"id":20548110,"url":"https://github.com/lusingander/kraphql-github","last_synced_at":"2025-03-06T05:22:32.907Z","repository":{"id":105969030,"uuid":"312935014","full_name":"lusingander/kraphql-github","owner":"lusingander","description":"Kotlin DSL for GitHub GraphQL API (GitHub API v4)","archived":false,"fork":false,"pushed_at":"2023-10-10T09:37:39.000Z","size":1758,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-16T16:23:54.987Z","etag":null,"topics":["github","github-api-v4","graphql","kotlin","kotlin-dsl"],"latest_commit_sha":null,"homepage":"https://jitpack.io/#lusingander/kraphql-github","language":"Kotlin","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/lusingander.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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-11-15T01:26:24.000Z","updated_at":"2022-11-05T07:49:44.000Z","dependencies_parsed_at":null,"dependency_job_id":"07783b70-b1c5-4e9d-9283-a88ec607bac7","html_url":"https://github.com/lusingander/kraphql-github","commit_stats":null,"previous_names":[],"tags_count":33,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lusingander%2Fkraphql-github","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lusingander%2Fkraphql-github/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lusingander%2Fkraphql-github/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lusingander%2Fkraphql-github/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lusingander","download_url":"https://codeload.github.com/lusingander/kraphql-github/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242151829,"owners_count":20080179,"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":["github","github-api-v4","graphql","kotlin","kotlin-dsl"],"created_at":"2024-11-16T02:12:12.931Z","updated_at":"2025-03-06T05:22:32.876Z","avatar_url":"https://github.com/lusingander.png","language":"Kotlin","readme":"kraphql-github\n====\n\n[![Release](https://jitpack.io/v/lusingander/kraphql-github.svg)](https://jitpack.io/#lusingander/kraphql-github)\n\nKotlin DSL for [GitHub GraphQL API (GitHub API v4)](https://docs.github.com/en/free-pro-team@latest/graphql)\n\nCurrent version: based on the [schema 2023-10-07](https://docs.github.com/en/free-pro-team@latest/graphql/overview/changelog#schema-changes-for-2023-10-07).\n\n## About\n\nWith the power of Kotlin DSL, you can effortlessly build queries for the GitHub GraphQL API while ensuring type correctness.\n\n![image](./image.gif)\n\n## Installation\n\n```groovy\nrepositories {\n    maven { url 'https://jitpack.io' }\n}\n\ndependencies {\n    implementation 'com.github.lusingander:kraphql-github:v0.0.33'\n}\n```\n\n## Usage\n\n```kotlin\nfun main() {\n    val q = query {\n        search(query = \"kotlin in:name sort:stars\", first = 10, type = SearchType.REPOSITORY) {\n            nodes {\n                `on Repository` {\n                    name\n                    owner {\n                        login\n                    }\n                    description\n                    stargazerCount\n                    pullRequests(first = 5, orderBy = IssueOrder(field = IssueOrderField.UPDATED_AT, direction = OrderDirection.DESC)) {\n                        nodes {\n                            number\n                            title\n                            updatedAt\n                        }\n                    }\n                }\n            }\n            repositoryCount\n        }\n    }\n    println(q.toString())\n    // println(q.toEscapedString())\n\n    // Output: (it doesn't actually include line breaks)\n    //\n    // query {\n    //   search(first: 10, query: \"kotlin in:name sort:stars\", type: REPOSITORY) {\n    //     nodes {\n    //       ... on Repository {\n    //         name\n    //         owner {\n    //           login\n    //         }\n    //         description\n    //         stargazerCount\n    //         pullRequests(first: 5, orderBy: {direction: DESC, field: UPDATED_AT}) {\n    //           nodes {\n    //             number\n    //             title\n    //             updatedAt\n    //           }\n    //         }\n    //       }\n    //     }\n    //     repositoryCount\n    //   }\n    // }\n}\n```\n\nFor more details, see [examples.md](./examples.md).\n\n## Related projects\n\nSource codes are generated by [lusingander/kraphql](https://github.com/lusingander/kraphql).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flusingander%2Fkraphql-github","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flusingander%2Fkraphql-github","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flusingander%2Fkraphql-github/lists"}