Closed dmitshur closed 6 years ago
👍 I also get a little confused when seeing graphql
and githubql
side-by-side.
I totally agree.
Thanks for feedback, I’m glad to hear the new name is well received.
I’ll make this change on May 8th (Tuesday).
I wrote the instructions for updating code in the commit message, but I'll copy it here:
This is a breaking API change. Updating code is easy. It can be done with an automated tool or by hand.
The gomvpkg tool (https://golang.org/x/tools/cmd/gomvpkg) can be used to rename your existing githubql package to githubv4, and update all code references in your GOPATH:
gomvpkg -from github.com/shurcooL/githubql -to github.com/shurcooL/githubv4
(You'll need to run it before you update to this commit.)
Otherwise, if you want to update your code manually, only the import declaration needs to be changed at first:
import ( // ... - "github.com/shurcooL/githubql" + githubql "github.com/shurcooL/githubv4" )
Afterwards, it's possible to update code to use the new githubv4 package name and remove the import rename.
Or, if you've already renamed the package to githubv4:
import ( // ... githubv3 "github.com/google/go-github/github" - githubv4 "github.com/shurcooL/githubql" + "github.com/shurcooL/githubv4" )
This is something I've been thinking about for the last few months, and I am increasingly convinced this would be an improvement. If accepted, it's better to get this done sooner, before the library has many more users.
The proposal is:
First, I think there are some issues with the current
githubql
name (at least in my mind). It sounds cool, like "GitHub Query Language", but that's not very accurate. If anything, it should've beengithubgql
for "GitHub GraphQL [API]".It might be just me, but having
githubql
andgraphql
, I constantly keep mixing up their names, even though I'm well aware of their differences. I guess it's just that both start with "G" and end with "QL", which makes the names harder to differentiate.Next, I think that
githubv4
is a more practical name for the following reason. Currently, GitHub GraphQL API v4 is far from complete (and seemingly, it will not have feature parity with GitHub REST API v3 for many years). So during this transitional time, it's going to be very common to import both:github
andgithubql
don't make for great package names in code that uses both. They're hard to tell apart, have different length names, etc.So doing this seems favorable:
Also, in theory, if GitHub were to release GitHub API v5, and it happened to also use GraphQL, that would be another data point showing that
githubv4
is a better name thangithubql
.Updating the code and moving/re-fetching the package is a bit annoying for users, but not too difficult or risky.
According to https://godoc.org/github.com/shurcooL/githubql?importers, there are not very many (public) importers at this time, so this seems viable.
I'm happy to hear thoughts or convincing arguments on this, if anyone has any. Thanks.
/cc @willnorris @gmlewis For your awareness and thoughts.