{"id":14976123,"url":"https://github.com/graphql-binding/graphql-binding-github","last_synced_at":"2025-07-04T10:34:16.853Z","repository":{"id":27258645,"uuid":"113065387","full_name":"graphql-binding/graphql-binding-github","owner":"graphql-binding","description":"Embed GitHub's GraphQL API into your server application","archived":false,"fork":false,"pushed_at":"2022-12-09T13:34:27.000Z","size":656,"stargazers_count":70,"open_issues_count":13,"forks_count":8,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-06-20T04:17:19.833Z","etag":null,"topics":["github-api","graphql","graphql-schema","schema-stitching"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/graphql-binding.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-12-04T16:16:19.000Z","updated_at":"2025-01-20T23:40:35.000Z","dependencies_parsed_at":"2022-07-27T09:22:40.848Z","dependency_job_id":null,"html_url":"https://github.com/graphql-binding/graphql-binding-github","commit_stats":null,"previous_names":["graphcool/graphql-binding-github"],"tags_count":32,"template":false,"template_full_name":null,"purl":"pkg:github/graphql-binding/graphql-binding-github","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphql-binding%2Fgraphql-binding-github","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphql-binding%2Fgraphql-binding-github/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphql-binding%2Fgraphql-binding-github/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphql-binding%2Fgraphql-binding-github/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/graphql-binding","download_url":"https://codeload.github.com/graphql-binding/graphql-binding-github/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphql-binding%2Fgraphql-binding-github/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263493381,"owners_count":23475185,"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-api","graphql","graphql-schema","schema-stitching"],"created_at":"2024-09-24T13:53:21.194Z","updated_at":"2025-07-04T10:34:16.804Z","avatar_url":"https://github.com/graphql-binding.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"# GraphQL Binding for GitHub\n\nEmbed GitHub's GraphQL API into your server application\n\n# Deprecation Notice!\n\nIn the last few months, since [the transition of many libraries](https://www.prisma.io/blog/the-guild-takes-over-oss-libraries-vvluy2i4uevs) under [The Guild](http://the-guild.dev)'s leadership, We've reviewed and released many improvements and versions to [graphql-cli](https://github.com/Urigo/graphql-cli), [graphql-config](https://github.com/kamilkisiela/graphql-config) and [graphql-import](https://github.com/ardatan/graphql-import).\n\nWe've reviewed `graphql-binding`, had many meetings with current users and engaged the community also through the [roadmap issue](https://github.com/dotansimha/graphql-binding/issues/325).\n\nWhat we've found is that the new [GraphQL Mesh](https://the-guild.dev/blog/graphql-mesh) library is covering not only all the current capabilities of GraphQL Binding, but also the future ideas that were introduced in the [original GraphQL Binding blog post](https://github.com/prisma-archive/prisma-blog-archive/blob/master/2018-01-12-reusing-and-composing-graphql-apis-with-graphql-bindings.mdx) and haven't come to life yet.\n\nAnd the best thing - [GraphQL Mesh](https://the-guild.dev/blog/graphql-mesh) gives you all those capabilities, even if your source is not a GraphQL service at all!  \nit can be GraphQL, OpenAPI/Swagger, gRPC, SQL or any other source!\nAnd of course you can even merge all those sources into a single SDK.\n\nJust like GraphQL Binding, you get a fully typed SDK (thanks to the protocols SDKs and the [GraphQL Code Generator](https://github.com/dotansimha/graphql-code-generator)), but from any source, and that SDK can run anywhere, as a connector or as a full blown gateway.\nAnd you can share your own \"Mesh Modules\" (which you would probably call \"your own binding\") and our community already created many of those!\nAlso, we decided to simply expose regular GraphQL, so you can choose how to consume it using all the awesome [fluent client SDKs out there](https://hasura.io/blog/fluent-graphql-clients-how-to-write-queries-like-a-boss/).\n\nIf you think that we've missed anything from GraphQL Binding that is not supported in a better way in GraphQL Mesh, please let us know!\n\n## Install\n\n```sh\nyarn add graphql-binding-github\n```\n\n## Example ([Demo](https://graphqlbin.com/Agjcr))\n\nSee [example directory](example) for full example application.\n\n```js\nconst { GitHub } = require('graphql-binding-github')\nconst { GraphQLServer } = require('graphql-yoga')\nconst { importSchema } = require('graphql-import')\n\nconst favoriteRepos = [\n  { owner: 'graphcool', name: 'graphql-yoga' },\n  { owner: 'graphql', name: 'graphql-js' },\n]\n\nconst token = '__ENTER_YOUR_GITHUB_TOKEN__'\nconst github = new GitHub(token)\n\nconst typeDefs = importSchema('schemas/app.graphql')\nconst resolvers = {\n  Query: {\n    hello: (parent, { name }) =\u003e `Hello ${name || 'World'}!`,\n    favoriteRepos: (parent, args, context, info) =\u003e {\n      return Promise.all(\n        favoriteRepos.map(args =\u003e github.query.repository(args, context, info)),\n      )\n    },\n  },\n  // the following is needed to make interfaces, unions \u0026 custom scalars work\n  ...github.getAbstractResolvers(typeDefs),\n}\n\nconst server = new GraphQLServer({ resolvers, typeDefs })\nserver.start(() =\u003e console.log('Server running on http://localhost:4000'))\n```\n\n## How to create a GitHub Token\n\nSimply follow [this guide](https://developer.github.com/v4/guides/forming-calls/#authenticating-with-graphql) and head over to the [token settings on GitHub](https://github.com/settings/tokens).\n\n## Resources\n\n* Github GraphQL Explorer: https://developer.github.com/v4/explorer/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgraphql-binding%2Fgraphql-binding-github","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgraphql-binding%2Fgraphql-binding-github","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgraphql-binding%2Fgraphql-binding-github/lists"}