Skip to content

Conversation

dmitshur
Copy link
Contributor

@dmitshur dmitshur commented Jul 9, 2017

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.

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.
@stubailo
Copy link
Contributor

stubailo commented Jul 9, 2017

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.

@dmitshur
Copy link
Contributor Author

dmitshur commented Jul 9, 2017

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, githubql itself is specific to a particular GraphQL API, but the generator driving it, and its Go API are general. It's a little too early for me to try to factor out the common/general part, but I am thinking about it.

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 githubql serves as an "example" of a GraphQL client implementation written in Go, or something like that?

@wincent
Copy link
Contributor

wincent commented Jul 10, 2017

Do you think we can resolve this issue with better phrasing?

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.

@wincent wincent closed this Jul 10, 2017
@dmitshur
Copy link
Contributor Author

dmitshur commented Jul 10, 2017

No, I don't think phrasing alone can cover this. It would really need to be an entirely separate section
...
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.

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?

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.

@dmitshur dmitshur deleted the add-githubql branch July 10, 2017 17:44
@stubailo
Copy link
Contributor

@shurcooL I'd be happy to add it to awesome-graphql for sure!

Dipeshwagle pushed a commit to Dipeshwagle/graphql.github.io that referenced this pull request Aug 18, 2020
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants