-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Add githubql project, the first Go GraphQL client. #348
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
To my knowledge, this is the first GraphQL client package available for Go. It's still in active development, but by now, it's feature complete and functional. It has support for performing queries and mutations, including arguments, variables, aliases, inline fragments, unions, etc. The focus of the package was to come up with a friendly, simple, powerful API for a Go GraphQL client. The history of its development and API design decisions can be seen at google/go-github#646. Everything specific to GitHub's GraphQL API v4 is generated from the schema, so it can be easily adapted for other GraphQL APIs. It's planned to generalize the GraphQL client generator. It has been tested via simple test programs, as well as more advanced use cases, and comes with thorough test coverage. Its API is becoming more stable, so I think it's a good time to add it to the list of GraphQL-related code.
Hmm, this would be the first time the list would include something specific to a particular GraphQL API - adding it to a list of generic GraphQL clients seems a bit misleading. |
One of the goals for the package is to create a generic Go GraphQL client generator. You'd give it a name and GraphQL schema, and it would generate everything. However, I find it easier to initially develop a Go GraphQL client when targeting a real GraphQL server that I can test against. So yes, Do you think we can resolve this issue with better phrasing? I see that some other clients are described as an "example GraphQL client". Can we say |
No, I don't think phrasing alone can cover this. It would really need to be an entirely separate section, at which point we'd just be doing a poor job of replicating what already exists in awesome-graphql — see the "Examples" section there, where they already have some Go examples. What do you think about submitting the PR there instead, @shurcooL? In the meantime I'm going to close this one. If you do go ahead and factor out a generic GraphQL client library in Go then we'd certainly welcome a PR adding a link to that. |
That makes sense. Thanks for consideration. When I do factor out a generic GraphQL client library in Go, I'll send a followup PR here.
They seem to only have examples for GraphQL servers in Go, nothing for clients. But I'm not sure if a GitHub-specific client package will fit there either. I'll look more into it and consider it. Thanks. |
@shurcooL I'd be happy to add it to |
To my knowledge, this is the first GraphQL client package available for Go. It's still in active development, but by now, it's feature complete and functional. It has support for performing queries and mutations, including arguments, variables, aliases, inline fragments, unions, etc. The focus of the package was to come up with a friendly, simple, powerful API for a Go GraphQL client. The history of its development and API design decisions can be seen at google/go-github#646. This is a general GraphQL client. It was factored out from the githubql project, which is a GraphQL client that targets the GitHub GraphQL API specifically. It has been tested via simple test programs, as well as more advanced use cases, and comes with thorough test coverage. Its API is becoming more stable, so I think it's a good time to add it to the list of GraphQL-related code. Followup to graphql#348.
To my knowledge, this is the first GraphQL client package available for Go.
It's still in active development, but by now, it's feature complete and functional. It has support for performing queries and mutations, including arguments, variables, aliases, inline fragments, unions, etc.
The focus of the package was to come up with a friendly, simple, powerful API for a Go GraphQL client. The history of its development and API design decisions can be seen at google/go-github#646.
Everything specific to GitHub's GraphQL API v4 is generated from the schema, so it can be easily adapted for other GraphQL APIs. It's planned to generalize the GraphQL client generator.
It has been tested via simple test programs, as well as more advanced use cases, and comes with thorough test coverage. Its API is becoming more stable, so I think it's a good time to add it to the list of GraphQL-related code.