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

Upstream update #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ test_with_go_modules: &test_with_go_modules
- run: go vet ./...

test_without_go_modules: &test_without_go_modules
working_directory: /go/src/github.com/graphql-go/graphql
working_directory: /go/src/github.com/quan-to/graphql
steps:
- checkout
- run: go get -v -t -d ./...
Expand Down
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This document is based on the [Node.js contribution guidelines](https://github.c

## Chat room

[![Join the chat at https://gitter.im/graphql-go/graphql](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/graphql-go/graphql?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Join the chat at https://gitter.im/quan-to/graphql](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/quan-to/graphql?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

Feel free to participate in the chat room for informal discussions and queries.

Expand Down Expand Up @@ -55,8 +55,8 @@ The basics are as follows:
2. `go get` the upstream repo and set it up as the `upstream` remote and your own repo as the `origin` remote:

```bash
$ go get github.com/graphql-go/graphql
$ cd $GOPATH/src/github.com/graphql-go/graphql
$ go get github.com/quan-to/graphql
$ cd $GOPATH/src/github.com/quan-to/graphql
$ git remote rename origin upstream
$ git remote add origin [email protected]/YOUR_GITHUB_NAME/graphql
```
Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
# graphql [![CircleCI](https://circleci.com/gh/graphql-go/graphql/tree/master.svg?style=svg)](https://circleci.com/gh/graphql-go/graphql/tree/master) [![GoDoc](https://godoc.org/graphql.co/graphql?status.svg)](https://godoc.org/github.com/graphql-go/graphql) [![Coverage Status](https://coveralls.io/repos/github/graphql-go/graphql/badge.svg?branch=master)](https://coveralls.io/github/graphql-go/graphql?branch=master) [![Join the chat at https://gitter.im/graphql-go/graphql](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/graphql-go/graphql?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
# graphql [![CircleCI](https://circleci.com/gh/quan-to/graphql/tree/master.svg?style=svg)](https://circleci.com/gh/quan-to/graphql/tree/master) [![GoDoc](https://godoc.org/graphql.co/graphql?status.svg)](https://godoc.org/github.com/quan-to/graphql) [![Coverage Status](https://coveralls.io/repos/github/quan-to/graphql/badge.svg?branch=master)](https://coveralls.io/github/quan-to/graphql?branch=master) [![Join the chat at https://gitter.im/quan-to/graphql](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/quan-to/graphql?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

An implementation of GraphQL in Go. Follows the official reference implementation [`graphql-js`](https://github.com/graphql/graphql-js).

Supports: queries, mutations & subscriptions.

### Documentation

godoc: https://godoc.org/github.com/graphql-go/graphql
godoc: https://godoc.org/github.com/quan-to/graphql

### Getting Started

To install the library, run:
```bash
go get github.com/graphql-go/graphql
go get github.com/quan-to/graphql
```

The following is a simple example which defines a schema with a single `hello` string-type field and a `Resolve` method which returns the string `world`. A GraphQL query is performed against this schema with the resulting output printed in JSON format.
Expand All @@ -25,7 +25,7 @@ import (
"fmt"
"log"

"github.com/graphql-go/graphql"
"github.com/quan-to/graphql"
)

func main() {
Expand Down Expand Up @@ -60,13 +60,13 @@ func main() {
fmt.Printf("%s \n", rJSON) // {“data”:{“hello”:”world”}}
}
```
For more complex examples, refer to the [examples/](https://github.com/graphql-go/graphql/tree/master/examples/) directory and [graphql_test.go](https://github.com/graphql-go/graphql/blob/master/graphql_test.go).
For more complex examples, refer to the [examples/](https://github.com/quan-to/graphql/tree/master/examples/) directory and [graphql_test.go](https://github.com/quan-to/graphql/blob/master/graphql_test.go).

### Third Party Libraries
| Name | Author | Description |
|:-------------:|:-------------:|:------------:|
| [graphql-go-handler](https://github.com/graphql-go/graphql-go-handler) | [Hafiz Ismail](https://github.com/sogko) | Middleware to handle GraphQL queries through HTTP requests. |
| [graphql-relay-go](https://github.com/graphql-go/graphql-relay-go) | [Hafiz Ismail](https://github.com/sogko) | Lib to construct a graphql-go server supporting react-relay. |
| [graphql-go-handler](https://github.com/quan-to/graphql-go-handler) | [Hafiz Ismail](https://github.com/sogko) | Middleware to handle GraphQL queries through HTTP requests. |
| [graphql-relay-go](https://github.com/quan-to/graphql-relay-go) | [Hafiz Ismail](https://github.com/sogko) | Lib to construct a graphql-go server supporting react-relay. |
| [golang-relay-starter-kit](https://github.com/sogko/golang-relay-starter-kit) | [Hafiz Ismail](https://github.com/sogko) | Barebones starting point for a Relay application with Golang GraphQL server. |
| [dataloader](https://github.com/nicksrandall/dataloader) | [Nick Randall](https://github.com/nicksrandall) | [DataLoader](https://github.com/facebook/dataloader) implementation in Go. |

Expand Down
8 changes: 4 additions & 4 deletions abstract_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import (
"reflect"
"testing"

"github.com/graphql-go/graphql"
"github.com/graphql-go/graphql/gqlerrors"
"github.com/graphql-go/graphql/language/location"
"github.com/graphql-go/graphql/testutil"
"github.com/quan-to/graphql"
"github.com/quan-to/graphql/gqlerrors"
"github.com/quan-to/graphql/language/location"
"github.com/quan-to/graphql/testutil"
)

type testDog struct {
Expand Down
2 changes: 1 addition & 1 deletion benchutil/list_schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package benchutil
import (
"fmt"

"github.com/graphql-go/graphql"
"github.com/quan-to/graphql"
)

type color struct {
Expand Down
2 changes: 1 addition & 1 deletion benchutil/wide_schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package benchutil
import (
"fmt"

"github.com/graphql-go/graphql"
"github.com/quan-to/graphql"
)

func WideSchemaWithXFieldsAndYItems(x int, y int) graphql.Schema {
Expand Down
2 changes: 1 addition & 1 deletion definition.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"reflect"
"regexp"

"github.com/graphql-go/graphql/language/ast"
"github.com/quan-to/graphql/language/ast"
)

// Type interface for all of the possible kinds of GraphQL types
Expand Down
4 changes: 2 additions & 2 deletions definition_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"reflect"
"testing"

"github.com/graphql-go/graphql"
"github.com/graphql-go/graphql/testutil"
"github.com/quan-to/graphql"
"github.com/quan-to/graphql/testutil"
)

var blogImage = graphql.NewObject(graphql.ObjectConfig{
Expand Down
6 changes: 3 additions & 3 deletions directives_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"errors"
"testing"

"github.com/graphql-go/graphql"
"github.com/graphql-go/graphql/gqlerrors"
"github.com/graphql-go/graphql/testutil"
"github.com/quan-to/graphql"
"github.com/quan-to/graphql/gqlerrors"
"github.com/quan-to/graphql/testutil"
)

var directivesTestSchema, _ = graphql.NewSchema(graphql.SchemaConfig{
Expand Down
8 changes: 4 additions & 4 deletions enum_type_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import (
"reflect"
"testing"

"github.com/graphql-go/graphql"
"github.com/graphql-go/graphql/gqlerrors"
"github.com/graphql-go/graphql/language/location"
"github.com/graphql-go/graphql/testutil"
"github.com/quan-to/graphql"
"github.com/quan-to/graphql/gqlerrors"
"github.com/quan-to/graphql/language/location"
"github.com/quan-to/graphql/testutil"
)

var enumTypeTestColorType = graphql.NewEnum(graphql.EnumConfig{
Expand Down
2 changes: 1 addition & 1 deletion examples/concurrent-resolvers/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"
"log"

"github.com/graphql-go/graphql"
"github.com/quan-to/graphql"
)

type Foo struct {
Expand Down
2 changes: 1 addition & 1 deletion examples/context/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"log"
"net/http"

"github.com/graphql-go/graphql"
"github.com/quan-to/graphql"
)

var Schema graphql.Schema
Expand Down
2 changes: 1 addition & 1 deletion examples/crud/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"net/http"
"time"

"github.com/graphql-go/graphql"
"github.com/quan-to/graphql"
)

type Product struct {
Expand Down
4 changes: 2 additions & 2 deletions examples/custom-scalar-type/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"fmt"
"log"

"github.com/graphql-go/graphql"
"github.com/graphql-go/graphql/language/ast"
"github.com/quan-to/graphql"
"github.com/quan-to/graphql/language/ast"
)

type CustomID struct {
Expand Down
2 changes: 1 addition & 1 deletion examples/hello-world/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"
"log"

"github.com/graphql-go/graphql"
"github.com/quan-to/graphql"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion examples/http/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"io/ioutil"
"net/http"

"github.com/graphql-go/graphql"
"github.com/quan-to/graphql"
)

type user struct {
Expand Down
2 changes: 1 addition & 1 deletion examples/httpdynamic/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"strconv"
"syscall"

"github.com/graphql-go/graphql"
"github.com/quan-to/graphql"
)

/*****************************************************************************/
Expand Down
2 changes: 1 addition & 1 deletion examples/modify-context/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"fmt"
"log"

"github.com/graphql-go/graphql"
"github.com/quan-to/graphql"
)

type User struct {
Expand Down
4 changes: 2 additions & 2 deletions examples/star-wars/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"fmt"
"net/http"

"github.com/graphql-go/graphql"
"github.com/graphql-go/graphql/testutil"
"github.com/quan-to/graphql"
"github.com/quan-to/graphql/testutil"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion examples/todo/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"net/http"
"time"

"github.com/graphql-go/graphql"
"github.com/quan-to/graphql"
)

type Todo struct {
Expand Down
4 changes: 2 additions & 2 deletions executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"reflect"
"strings"

"github.com/graphql-go/graphql/gqlerrors"
"github.com/graphql-go/graphql/language/ast"
"github.com/quan-to/graphql/gqlerrors"
"github.com/quan-to/graphql/language/ast"
)

type ExecuteParams struct {
Expand Down
4 changes: 2 additions & 2 deletions executor_resolve_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package graphql_test

import (
"encoding/json"
"github.com/graphql-go/graphql"
"github.com/graphql-go/graphql/testutil"
"github.com/quan-to/graphql"
"github.com/quan-to/graphql/testutil"
"reflect"
"testing"
)
Expand Down
4 changes: 2 additions & 2 deletions executor_schema_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"reflect"
"testing"

"github.com/graphql-go/graphql"
"github.com/graphql-go/graphql/testutil"
"github.com/quan-to/graphql"
"github.com/quan-to/graphql/testutil"
)

// TODO: have a separate package for other tests for eg `parser`
Expand Down
8 changes: 4 additions & 4 deletions executor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ import (
"testing"
"time"

"github.com/graphql-go/graphql"
"github.com/graphql-go/graphql/gqlerrors"
"github.com/graphql-go/graphql/language/location"
"github.com/graphql-go/graphql/testutil"
"github.com/quan-to/graphql"
"github.com/quan-to/graphql/gqlerrors"
"github.com/quan-to/graphql/language/location"
"github.com/quan-to/graphql/testutil"
)

func TestExecutesArbitraryCode(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion extensions.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"fmt"

"github.com/graphql-go/graphql/gqlerrors"
"github.com/quan-to/graphql/gqlerrors"
)

type (
Expand Down
6 changes: 3 additions & 3 deletions extensions_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import (
"reflect"
"testing"

"github.com/graphql-go/graphql"
"github.com/graphql-go/graphql/gqlerrors"
"github.com/graphql-go/graphql/testutil"
"github.com/quan-to/graphql"
"github.com/quan-to/graphql/gqlerrors"
"github.com/quan-to/graphql/testutil"
)

func tinit(t *testing.T) graphql.Schema {
Expand Down
4 changes: 3 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
module github.com/graphql-go/graphql
module github.com/quan-to/graphql

go 1.12
6 changes: 3 additions & 3 deletions gqlerrors/error.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"fmt"
"reflect"

"github.com/graphql-go/graphql/language/ast"
"github.com/graphql-go/graphql/language/location"
"github.com/graphql-go/graphql/language/source"
"github.com/quan-to/graphql/language/ast"
"github.com/quan-to/graphql/language/location"
"github.com/quan-to/graphql/language/source"
)

type Error struct {
Expand Down
2 changes: 1 addition & 1 deletion gqlerrors/formatted.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package gqlerrors
import (
"errors"

"github.com/graphql-go/graphql/language/location"
"github.com/quan-to/graphql/language/location"
)

type ExtendedError interface {
Expand Down
2 changes: 1 addition & 1 deletion gqlerrors/located.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package gqlerrors

import (
"errors"
"github.com/graphql-go/graphql/language/ast"
"github.com/quan-to/graphql/language/ast"
)

// NewLocatedError creates a graphql.Error with location info
Expand Down
6 changes: 3 additions & 3 deletions gqlerrors/syntax.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (
"regexp"
"strings"

"github.com/graphql-go/graphql/language/ast"
"github.com/graphql-go/graphql/language/location"
"github.com/graphql-go/graphql/language/source"
"github.com/quan-to/graphql/language/ast"
"github.com/quan-to/graphql/language/location"
"github.com/quan-to/graphql/language/source"
)

func NewSyntaxError(s *source.Source, position int, description string) *Error {
Expand Down
6 changes: 3 additions & 3 deletions graphql.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package graphql
import (
"context"

"github.com/graphql-go/graphql/gqlerrors"
"github.com/graphql-go/graphql/language/parser"
"github.com/graphql-go/graphql/language/source"
"github.com/quan-to/graphql/gqlerrors"
"github.com/quan-to/graphql/language/parser"
"github.com/quan-to/graphql/language/source"
)

type Params struct {
Expand Down
4 changes: 2 additions & 2 deletions graphql_bench_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package graphql_test
import (
"testing"

"github.com/graphql-go/graphql"
"github.com/graphql-go/graphql/benchutil"
"github.com/quan-to/graphql"
"github.com/quan-to/graphql/benchutil"
)

type B struct {
Expand Down
Loading