Permalink
Switch branches/tags
Nothing to show
Commits on Sep 25, 2018
  1. Update wanted error text in TestClient_Query_errorStatusCode.

    dmitshur committed Sep 25, 2018
    The error text has changed in commit shurcooL/graphql@e4a3a37
    to include response body. Change the test for new behavior.
    
    Follows shurcooL/graphql#30.
Commits on Aug 31, 2018
  1. Set Content-Type to application/json in tests.

    dmitshur committed Aug 31, 2018
    This is more consistent with responses real GraphQL servers generate.
Commits on May 9, 2018
  1. Rename package from githubql to githubv4.

    dmitshur committed May 8, 2018
    This should be a more appropriate and less confusing name.
    See issue #35 for full rationale.
    
    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"
    	 )
    
    Resolves #35.
Commits on May 8, 2018
  1. Add package example.

    dmitshur committed May 8, 2018
    It provides a very simple starting point and a general idea of how
    to use the package, when viewing documentation via godoc.
    
    It demonstrates use of predeclared Go types as documented in the
    previous commit.
  2. README: Document scalar types.

    dmitshur committed May 8, 2018
    I've started using predeclared Go types in many of my queries since
    a while ago, and it makes the user experience much better. Document
    this possibility so that other people can benefit from it too.
    
    Updates #9.
Commits on May 4, 2018
  1. Regenerate for schema changes by 2018-05-04.

    dmitshur committed May 4, 2018
Commits on Mar 22, 2018
  1. Regenerate for 2018-03-22 schema changes.

    dmitshur committed Mar 22, 2018
Commits on Feb 24, 2018
  1. Use http.Handler interface in localRoundTripper.

    dmitshur committed Feb 24, 2018
    For simplicity and consistency. We only need its ServeHTTP method, so
    no need to hardcode *http.ServeMux type explicitly.
Commits on Feb 8, 2018
Commits on Feb 1, 2018
Commits on Jan 9, 2018
Commits on Nov 27, 2017
  1. Update for graphql API change. (#27)

    dmitshur committed Nov 27, 2017
Commits on Nov 19, 2017
Commits on Nov 3, 2017
  1. README: Fix typo.

    dmitshur committed Nov 3, 2017
  2. README: Document inline fragment support.

    dmitshur committed Nov 3, 2017
    Updates #10.
    Follows shurcooL/graphql@37c3d62.
Commits on Nov 2, 2017
Commits on Oct 18, 2017
  1. Add NewEnterpriseClient for GitHub Enterprise. (#24)

    dmitshur committed Oct 18, 2017
    This change implements support for GitHub Enterprise.
    
    Resolves #23.
Commits on Oct 17, 2017
  1. README: Move roadmap into issue #22.

    dmitshur committed Oct 17, 2017
    Now that most of the basic functionality is done, it makes more sense
    to track the remaining work in an issue.
Commits on Oct 12, 2017
  1. Add disclaimer to generated files; regenerate.

    dmitshur committed Oct 12, 2017
Commits on Sep 26, 2017
  1. Remove schema.json from repository.

    dmitshur committed Sep 26, 2017
    It's only needed during go generate time. Fetch it over network
    directly in gen.go. Removing it reduces clutter in the repository.
Commits on Sep 22, 2017
  1. example/githubqldev: Move warning in package comment.

    dmitshur committed Sep 22, 2017
    Move the warning to a separate paragraph so it's easier to see,
    improving readability of package comment.
Commits on Aug 29, 2017
  1. Update expected output for Go 1.9.

    dmitshur committed Aug 29, 2017
  2. Update schema and regenerate.

    dmitshur committed Aug 29, 2017
    Performed with:
    
    	curl -H "Authorization: bearer $GITHUB_TOKEN" https://api.github.com/graphql | jsonfmt > schema.json
    	go generate ./...
Commits on Jul 25, 2017
  1. Regenerate, including "IDs" ident fix.

    dmitshur committed Jul 25, 2017
    Uses change from shurcooL/graphql@fada01f.
    
    Fixes #11.
  2. Sort types in {enum,input}.go; update schema.

    dmitshur committed Jul 25, 2017
    They don't seem to be sorted in schema, and sometimes move around,
    causing unnecessarily large diffs.
    
    Update schema to latest version and regenerate.
Commits on Jul 23, 2017
  1. Use github.com/shurcooL/graphql package.

    dmitshur committed Jul 23, 2017
    The general GraphQL client has been factored out into a separate
    package. Use it, instead of having an internal copy.
    
    As a result, githubql client implementation becomes very simple,
    it just defers to the graphql client, with minor convenience changes
    on top.
    
    The graphql package continues to provide useful Go types for the GitHub
    GraphQL schema, generated from the schema.
Commits on Jul 12, 2017
  1. Fix minor githubql.NewClient documentation typo.

    dmitshur committed Jul 12, 2017
  2. README: Fix implicit type conversion in example.

    dmitshur committed Jul 12, 2017
    This serves as further motivation for #9.
Commits on Jul 9, 2017
  1. Custom unmarshaling of GraphQL response JSON into query structure.

    dmitshur committed Jul 9, 2017
    This change implements a custom JSON unmarshaler for GraphQL needs.
    Instead of doing it from scratch, it builds on top of the JSON
    tokenizer available in "encoding/json".Decoder since Go 1.5.
    
    The custom JSON unmarshaler implements behavior specifically for
    unmarshaling valid JSON-encoded response from a GraphQL server
    into the GraphQL query data structure passed to graphql package.
    
    It has the following differences in behavior compared to the
    standard encoding/json decoder:
    
    -	It tries to populate all embedded structs, even if they have
    	collisions in field names. This is critical for helping #10.
    
    -	It's aware of graphql struct field tags when unmarshaling (#13).
    
    -	It doesn't get confused by json tags, ignoring them (#14).
    
    Resolves #10.
    Fixes #13.
    Fixes #14.
  2. Inline embedded structs without graphql tag in query.

    dmitshur committed Jul 9, 2017
    This appears to be more logical behavior for now. It enables one to
    factor out common fields into a struct, and embed that struct where
    needed.
    
    Without a graphql tag that creates an inlined fragment, it doesn't seem
    to be possible to do much else.
  3. Assume that ID has string underlying type.

    dmitshur committed Jul 9, 2017
    This workaround is possible since ID is the only type that can result
    in the underlying type being string. For normal strings,
    githubql.String type would be used.
    
    This change adds a workaround and a passing test case. If a better
    solution can be found, it can be applied as long as tests still pass.
    
    Helps #12.
  4. README: Change Goals to Focus, update Roadmap.

    dmitshur committed Jul 9, 2017
    The goals are mostly achieved by now, so it's a matter of maintaining
    them.
    
    Having a clearly defined focus will help create a higher quality
    package and limit scope. I'll be able to use it to reject changes that
    stray the project away from its stated focus.
  5. Update note about scalar types.

    dmitshur committed Jul 9, 2017
    Further progress is tracked in #9.
Commits on Jul 5, 2017
  1. Update schema and regenerate.

    dmitshur committed Jul 5, 2017
Commits on Jul 4, 2017
  1. internal/gen: Create generator for input.go.

    dmitshur committed Jul 4, 2017
    Use it to generate input.go. There were no unexpected issues discovered
    when generating the entire file.
    
    Resolves the following TODO comment:
    
    	TODO: Generate the rest from schema according to this formula.