Skip to content
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

Return string #493

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions .circleci/golang.Dockerfile
Expand Up @@ -4,9 +4,9 @@ RUN curl -L -o /bin/dep https://github.com/golang/dep/releases/download/v0.4.1/d
RUN go get -u github.com/alecthomas/gometalinter github.com/vektah/gorunpkg
RUN gometalinter --install

WORKDIR /go/src/github.com/99designs/gqlgen
WORKDIR /go/src/github.com/monzo/gqlgen

COPY Gopkg.* /go/src/github.com/99designs/gqlgen/
COPY Gopkg.* /go/src/github.com/monzo/gqlgen/
RUN dep ensure -v --vendor-only

COPY . /go/src/github.com/99designs/gqlgen/
COPY . /go/src/github.com/monzo/gqlgen/
4 changes: 2 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
@@ -1,5 +1,5 @@
Describe your PR and link to any relevant issues.

I have:
- [ ] Added tests covering the bug / feature (see [testing](https://github.com/99designs/gqlgen/blob/master/TESTING.md))
- [ ] Updated any relevant documentation (see [docs](https://github.com/99designs/gqlgen/tree/master/docs/content))
- [ ] Added tests covering the bug / feature (see [testing](https://github.com/monzo/gqlgen/blob/master/TESTING.md))
- [ ] Updated any relevant documentation (see [docs](https://github.com/monzo/gqlgen/tree/master/docs/content))
8 changes: 4 additions & 4 deletions README.md
@@ -1,16 +1,16 @@
# gqlgen [![CircleCI](https://badgen.net/circleci/github/99designs/gqlgen/master)](https://circleci.com/gh/99designs/gqlgen) [![Read the Docs](https://badgen.net/badge/docs/available/green)](http://gqlgen.com/)
# gqlgen [![CircleCI](https://badgen.net/circleci/github/monzo/gqlgen/master)](https://circleci.com/gh/monzo/gqlgen) [![Read the Docs](https://badgen.net/badge/docs/available/green)](http://gqlgen.com/)

This is a library for quickly creating strictly typed graphql servers in golang.

See the [docs](https://gqlgen.com/) for a getting started guide.

### Feature comparison

| | [gqlgen](https://github.com/99designs/gqlgen) | [gophers](https://github.com/graph-gophers/graphql-go) | [graphql-go](https://github.com/graphql-go/graphql) | [thunder](https://github.com/samsarahq/thunder) |
| | [gqlgen](https://github.com/monzo/gqlgen) | [gophers](https://github.com/graph-gophers/graphql-go) | [graphql-go](https://github.com/graphql-go/graphql) | [thunder](https://github.com/samsarahq/thunder) |
| --------: | :-------- | :-------- | :-------- | :-------- |
| Kind | schema first | schema first | run time types | struct first |
| Boilerplate | less | more | more | some |
| Docs | [docs](https://gqlgen.com) & [examples](https://github.com/99designs/gqlgen/tree/master/example) | [examples](https://github.com/graph-gophers/graphql-go/tree/master/example/starwars) | [examples](https://github.com/graphql-go/graphql/tree/master/examples) | [examples](https://github.com/samsarahq/thunder/tree/master/example)|
| Docs | [docs](https://gqlgen.com) & [examples](https://github.com/monzo/gqlgen/tree/master/example) | [examples](https://github.com/graph-gophers/graphql-go/tree/master/example/starwars) | [examples](https://github.com/graphql-go/graphql/tree/master/examples) | [examples](https://github.com/samsarahq/thunder/tree/master/example)|
| Query | :+1: | :+1: | :+1: | :+1: |
| Mutation | :+1: | :construction: [pr](https://github.com/graph-gophers/graphql-go/pull/182) | :+1: | :+1: |
| Subscription | :+1: | :construction: [pr](https://github.com/graph-gophers/graphql-go/pull/182) | :+1: | :+1: |
Expand All @@ -20,7 +20,7 @@ See the [docs](https://gqlgen.com/) for a getting started guide.
| Interfaces | :+1: | :+1: | :+1: | :no_entry: [is](https://github.com/samsarahq/thunder/issues/78) |
| Generated Enums | :+1: | :no_entry: | :no_entry: | :no_entry: |
| Generated Inputs | :+1: | :no_entry: | :no_entry: | :no_entry: |
| Stitching gql | :clock1: [is](https://github.com/99designs/gqlgen/issues/5) | :no_entry: | :no_entry: | :no_entry: |
| Stitching gql | :clock1: [is](https://github.com/monzo/gqlgen/issues/5) | :no_entry: | :no_entry: | :no_entry: |
| Opentracing | :+1: | :+1: | :no_entry: | :scissors:[pr](https://github.com/samsarahq/thunder/pull/77) |
| Hooks for error logging | :+1: | :no_entry: | :no_entry: | :no_entry: |
| Dataloading | :+1: | :+1: | :+1: | :warning: |
Expand Down
2 changes: 1 addition & 1 deletion bin/release
Expand Up @@ -34,4 +34,4 @@ git tag $VERSION
git push origin $VERSION


echo "Now go write some release notes! https://github.com/99designs/gqlgen/releases"
echo "Now go write some release notes! https://github.com/monzo/gqlgen/releases"
2 changes: 1 addition & 1 deletion client/client_test.go
Expand Up @@ -7,7 +7,7 @@ import (
"net/http/httptest"
"testing"

"github.com/99designs/gqlgen/client"
"github.com/monzo/gqlgen/client"
"github.com/stretchr/testify/require"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/gen.go
Expand Up @@ -5,7 +5,7 @@ import (
"io/ioutil"
"os"

"github.com/99designs/gqlgen/codegen"
"github.com/monzo/gqlgen/codegen"
"github.com/pkg/errors"
"github.com/urfave/cli"
)
Expand Down
2 changes: 1 addition & 1 deletion cmd/init.go
Expand Up @@ -7,7 +7,7 @@ import (
"os"
"strings"

"github.com/99designs/gqlgen/codegen"
"github.com/monzo/gqlgen/codegen"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most vendoring tools will let you rewrite the repo without having to change the imports, for dep it you would add this to your Gopkg.toml of your app using gqlgen:

[[constraint]]
  branch = "master"
  name = "github.com/99designs/gqlgen"
  source = "https://github.com/monzo/gqlgen"

"github.com/pkg/errors"
"github.com/urfave/cli"
"gopkg.in/yaml.v2"
Expand Down
6 changes: 3 additions & 3 deletions cmd/root.go
Expand Up @@ -6,12 +6,12 @@ import (
"log"
"os"

"github.com/99designs/gqlgen/graphql"
"github.com/99designs/gqlgen/internal/gopath"
"github.com/monzo/gqlgen/graphql"
"github.com/monzo/gqlgen/internal/gopath"
"github.com/urfave/cli"

// Required since otherwise dep will prune away these unused packages before codegen has a chance to run
_ "github.com/99designs/gqlgen/handler"
_ "github.com/monzo/gqlgen/handler"
)

func Execute() {
Expand Down
2 changes: 1 addition & 1 deletion cmd/version.go
Expand Up @@ -3,7 +3,7 @@ package cmd
import (
"fmt"

"github.com/99designs/gqlgen/graphql"
"github.com/monzo/gqlgen/graphql"
"github.com/urfave/cli"
)

Expand Down
4 changes: 2 additions & 2 deletions codegen/ambient.go
Expand Up @@ -3,8 +3,8 @@ package codegen
import (
// Import and ignore the ambient imports listed below so dependency managers
// don't prune unused code for us. Both lists should be kept in sync.
_ "github.com/99designs/gqlgen/graphql"
_ "github.com/99designs/gqlgen/graphql/introspection"
_ "github.com/monzo/gqlgen/graphql"
_ "github.com/monzo/gqlgen/graphql/introspection"
_ "github.com/vektah/gqlparser"
_ "github.com/vektah/gqlparser/ast"
)
28 changes: 14 additions & 14 deletions codegen/codegen.go
Expand Up @@ -7,7 +7,7 @@ import (
"regexp"
"syscall"

"github.com/99designs/gqlgen/codegen/templates"
"github.com/monzo/gqlgen/codegen/templates"
"github.com/pkg/errors"
"github.com/vektah/gqlparser"
"github.com/vektah/gqlparser/ast"
Expand Down Expand Up @@ -127,19 +127,19 @@ func (cfg *Config) normalize() error {
}

builtins := TypeMap{
"__Directive": {Model: "github.com/99designs/gqlgen/graphql/introspection.Directive"},
"__Type": {Model: "github.com/99designs/gqlgen/graphql/introspection.Type"},
"__Field": {Model: "github.com/99designs/gqlgen/graphql/introspection.Field"},
"__EnumValue": {Model: "github.com/99designs/gqlgen/graphql/introspection.EnumValue"},
"__InputValue": {Model: "github.com/99designs/gqlgen/graphql/introspection.InputValue"},
"__Schema": {Model: "github.com/99designs/gqlgen/graphql/introspection.Schema"},
"Int": {Model: "github.com/99designs/gqlgen/graphql.Int"},
"Float": {Model: "github.com/99designs/gqlgen/graphql.Float"},
"String": {Model: "github.com/99designs/gqlgen/graphql.String"},
"Boolean": {Model: "github.com/99designs/gqlgen/graphql.Boolean"},
"ID": {Model: "github.com/99designs/gqlgen/graphql.ID"},
"Time": {Model: "github.com/99designs/gqlgen/graphql.Time"},
"Map": {Model: "github.com/99designs/gqlgen/graphql.Map"},
"__Directive": {Model: "github.com/monzo/gqlgen/graphql/introspection.Directive"},
"__Type": {Model: "github.com/monzo/gqlgen/graphql/introspection.Type"},
"__Field": {Model: "github.com/monzo/gqlgen/graphql/introspection.Field"},
"__EnumValue": {Model: "github.com/monzo/gqlgen/graphql/introspection.EnumValue"},
"__InputValue": {Model: "github.com/monzo/gqlgen/graphql/introspection.InputValue"},
"__Schema": {Model: "github.com/monzo/gqlgen/graphql/introspection.Schema"},
"Int": {Model: "github.com/monzo/gqlgen/graphql.Int"},
"Float": {Model: "github.com/monzo/gqlgen/graphql.Float"},
"String": {Model: "github.com/monzo/gqlgen/graphql.String"},
"Boolean": {Model: "github.com/monzo/gqlgen/graphql.Boolean"},
"ID": {Model: "github.com/monzo/gqlgen/graphql.ID"},
"Time": {Model: "github.com/monzo/gqlgen/graphql.Time"},
"Map": {Model: "github.com/monzo/gqlgen/graphql.Map"},
}

if cfg.Models == nil {
Expand Down
2 changes: 1 addition & 1 deletion codegen/config.go
Expand Up @@ -9,7 +9,7 @@ import (
"sort"
"strings"

"github.com/99designs/gqlgen/internal/gopath"
"github.com/monzo/gqlgen/internal/gopath"
"github.com/pkg/errors"
"github.com/vektah/gqlparser/ast"
"gopkg.in/yaml.v2"
Expand Down
2 changes: 1 addition & 1 deletion codegen/enum_build.go
Expand Up @@ -4,7 +4,7 @@ import (
"sort"
"strings"

"github.com/99designs/gqlgen/codegen/templates"
"github.com/monzo/gqlgen/codegen/templates"
"github.com/vektah/gqlparser/ast"
)

Expand Down
2 changes: 1 addition & 1 deletion codegen/input_test.go
Expand Up @@ -47,7 +47,7 @@ func generate(name string, schema string, typemap ...TypeMap) error {
err := Generate(cfg)
if err == nil {
conf := loader.Config{}
conf.Import("github.com/99designs/gqlgen/codegen/testdata/gen/" + name)
conf.Import("github.com/monzo/gqlgen/codegen/testdata/gen/" + name)

_, err = conf.Load()
if err != nil {
Expand Down