diff --git a/go/ngql/query.go b/go/ngql/query.go index 583ea5211a..22baeb6fe6 100644 --- a/go/ngql/query.go +++ b/go/ngql/query.go @@ -11,8 +11,8 @@ import ( "github.com/attic-labs/noms/go/d" "github.com/attic-labs/noms/go/types" - "github.com/graphql-go/graphql" - "github.com/graphql-go/graphql/gqlerrors" + "github.com/attic-labs/graphql" + "github.com/attic-labs/graphql/gqlerrors" ) const ( diff --git a/go/ngql/types.go b/go/ngql/types.go index 40ae094eb1..d02bd4a7ab 100644 --- a/go/ngql/types.go +++ b/go/ngql/types.go @@ -13,7 +13,7 @@ import ( "github.com/attic-labs/noms/go/d" "github.com/attic-labs/noms/go/hash" "github.com/attic-labs/noms/go/types" - "github.com/graphql-go/graphql" + "github.com/attic-labs/graphql" ) type typeMap map[typeMapKey]graphql.Type diff --git a/vendor/github.com/graphql-go/graphql/.gitignore b/vendor/github.com/attic-labs/graphql/.gitignore similarity index 100% rename from vendor/github.com/graphql-go/graphql/.gitignore rename to vendor/github.com/attic-labs/graphql/.gitignore diff --git a/vendor/github.com/graphql-go/graphql/.travis.yml b/vendor/github.com/attic-labs/graphql/.travis.yml similarity index 96% rename from vendor/github.com/graphql-go/graphql/.travis.yml rename to vendor/github.com/attic-labs/graphql/.travis.yml index 88ef0874e2..c9a011a7c3 100644 --- a/vendor/github.com/graphql-go/graphql/.travis.yml +++ b/vendor/github.com/attic-labs/graphql/.travis.yml @@ -1,7 +1,6 @@ language: go go: - - 1.4 - 1.7 - tip diff --git a/vendor/github.com/attic-labs/graphql/.version b/vendor/github.com/attic-labs/graphql/.version new file mode 100644 index 0000000000..738ff9fcba --- /dev/null +++ b/vendor/github.com/attic-labs/graphql/.version @@ -0,0 +1,2 @@ +https://github.com/attic-labs/graphql +2b9ae68d9ac567f26a8726b61a016e898c822ec7 diff --git a/vendor/github.com/graphql-go/graphql/CONTRIBUTING.md b/vendor/github.com/attic-labs/graphql/CONTRIBUTING.md similarity index 100% rename from vendor/github.com/graphql-go/graphql/CONTRIBUTING.md rename to vendor/github.com/attic-labs/graphql/CONTRIBUTING.md diff --git a/vendor/github.com/graphql-go/graphql/LICENSE b/vendor/github.com/attic-labs/graphql/LICENSE similarity index 100% rename from vendor/github.com/graphql-go/graphql/LICENSE rename to vendor/github.com/attic-labs/graphql/LICENSE diff --git a/vendor/github.com/graphql-go/graphql/README.md b/vendor/github.com/attic-labs/graphql/README.md similarity index 86% rename from vendor/github.com/graphql-go/graphql/README.md rename to vendor/github.com/attic-labs/graphql/README.md index 2aade5daf9..b7116b11af 100644 --- a/vendor/github.com/graphql-go/graphql/README.md +++ b/vendor/github.com/attic-labs/graphql/README.md @@ -1,16 +1,16 @@ -# graphql [![Build Status](https://travis-ci.org/graphql-go/graphql.svg)](https://travis-ci.org/graphql-go/graphql) [![GoDoc](https://godoc.org/graphql.co/graphql?status.svg)](https://godoc.org/github.com/graphql-go/graphql) [![Coverage Status](https://coveralls.io/repos/graphql-go/graphql/badge.svg?branch=master&service=github)](https://coveralls.io/github/graphql-go/graphql?branch=master) [![Join the chat at https://gitter.im/chris-ramon/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 [![Build Status](https://travis-ci.org/graphql-go/graphql.svg)](https://travis-ci.org/graphql-go/graphql) [![GoDoc](https://godoc.org/graphql.co/graphql?status.svg)](https://godoc.org/github.com/attic-labs/graphql) [![Coverage Status](https://coveralls.io/repos/graphql-go/graphql/badge.svg?branch=master&service=github)](https://coveralls.io/github/graphql-go/graphql?branch=master) [![Join the chat at https://gitter.im/chris-ramon/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) A *work-in-progress* implementation of GraphQL for Go. ### Documentation -godoc: https://godoc.org/github.com/graphql-go/graphql +godoc: https://godoc.org/github.com/attic-labs/graphql ### Getting Started To install the library, run: ```bash -go get github.com/graphql-go/graphql +go get github.com/attic-labs/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. @@ -23,7 +23,7 @@ import ( "fmt" "log" - "github.com/graphql-go/graphql" + "github.com/attic-labs/graphql" ) func main() { @@ -58,7 +58,7 @@ 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/attic-labs/graphql/tree/master/examples/) directory and [graphql_test.go](https://github.com/attic-labs/graphql/blob/master/graphql_test.go). ### Origin and Current Direction @@ -67,8 +67,8 @@ This project was originally a port of [v0.4.3](https://github.com/graphql/graphq ### 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/attic-labs/graphql-go-handler) | [Hafiz Ismail](https://github.com/sogko) | Middleware to handle GraphQL queries through HTTP requests. | +| [graphql-relay-go](https://github.com/attic-labs/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. | ### Blog Posts @@ -84,7 +84,7 @@ This project was originally a port of [v0.4.3](https://github.com/graphql/graphq - [x] Executor - [x] Validator - [ ] Examples - - [ ] Basic Usage (see: [PR-#21](https://github.com/graphql-go/graphql/pull/21)) + - [ ] Basic Usage (see: [PR-#21](https://github.com/attic-labs/graphql/pull/21)) - [ ] React/Relay - [ ] Alpha Release (v0.1) diff --git a/vendor/github.com/graphql-go/graphql/abstract_test.go b/vendor/github.com/attic-labs/graphql/abstract_test.go similarity index 98% rename from vendor/github.com/graphql-go/graphql/abstract_test.go rename to vendor/github.com/attic-labs/graphql/abstract_test.go index 2a356ea67e..0a937d7d5c 100644 --- a/vendor/github.com/graphql-go/graphql/abstract_test.go +++ b/vendor/github.com/attic-labs/graphql/abstract_test.go @@ -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/attic-labs/graphql" + "github.com/attic-labs/graphql/gqlerrors" + "github.com/attic-labs/graphql/language/location" + "github.com/attic-labs/graphql/testutil" ) type testDog struct { diff --git a/vendor/github.com/graphql-go/graphql/definition.go b/vendor/github.com/attic-labs/graphql/definition.go similarity index 99% rename from vendor/github.com/graphql-go/graphql/definition.go rename to vendor/github.com/attic-labs/graphql/definition.go index f26f3002f0..e841e7dab3 100644 --- a/vendor/github.com/graphql-go/graphql/definition.go +++ b/vendor/github.com/attic-labs/graphql/definition.go @@ -5,7 +5,7 @@ import ( "reflect" "regexp" - "github.com/graphql-go/graphql/language/ast" + "github.com/attic-labs/graphql/language/ast" "golang.org/x/net/context" ) diff --git a/vendor/github.com/graphql-go/graphql/definition_test.go b/vendor/github.com/attic-labs/graphql/definition_test.go similarity index 99% rename from vendor/github.com/graphql-go/graphql/definition_test.go rename to vendor/github.com/attic-labs/graphql/definition_test.go index 8b574e2e1d..369920168f 100644 --- a/vendor/github.com/graphql-go/graphql/definition_test.go +++ b/vendor/github.com/attic-labs/graphql/definition_test.go @@ -5,8 +5,8 @@ import ( "reflect" "testing" - "github.com/graphql-go/graphql" - "github.com/graphql-go/graphql/testutil" + "github.com/attic-labs/graphql" + "github.com/attic-labs/graphql/testutil" ) var blogImage = graphql.NewObject(graphql.ObjectConfig{ diff --git a/vendor/github.com/graphql-go/graphql/directives.go b/vendor/github.com/attic-labs/graphql/directives.go similarity index 100% rename from vendor/github.com/graphql-go/graphql/directives.go rename to vendor/github.com/attic-labs/graphql/directives.go diff --git a/vendor/github.com/graphql-go/graphql/directives_test.go b/vendor/github.com/attic-labs/graphql/directives_test.go similarity index 98% rename from vendor/github.com/graphql-go/graphql/directives_test.go rename to vendor/github.com/attic-labs/graphql/directives_test.go index 164ecd7b63..bbdcc62a7b 100644 --- a/vendor/github.com/graphql-go/graphql/directives_test.go +++ b/vendor/github.com/attic-labs/graphql/directives_test.go @@ -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/attic-labs/graphql" + "github.com/attic-labs/graphql/gqlerrors" + "github.com/attic-labs/graphql/language/location" + "github.com/attic-labs/graphql/testutil" ) var directivesTestSchema, _ = graphql.NewSchema(graphql.SchemaConfig{ diff --git a/vendor/github.com/graphql-go/graphql/enum_type_test.go b/vendor/github.com/attic-labs/graphql/enum_type_test.go similarity index 98% rename from vendor/github.com/graphql-go/graphql/enum_type_test.go rename to vendor/github.com/attic-labs/graphql/enum_type_test.go index d7f13cec39..18a18e5cbb 100644 --- a/vendor/github.com/graphql-go/graphql/enum_type_test.go +++ b/vendor/github.com/attic-labs/graphql/enum_type_test.go @@ -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/attic-labs/graphql" + "github.com/attic-labs/graphql/gqlerrors" + "github.com/attic-labs/graphql/language/location" + "github.com/attic-labs/graphql/testutil" ) var enumTypeTestColorType = graphql.NewEnum(graphql.EnumConfig{ diff --git a/vendor/github.com/graphql-go/graphql/examples/context/main.go b/vendor/github.com/attic-labs/graphql/examples/context/main.go similarity index 97% rename from vendor/github.com/graphql-go/graphql/examples/context/main.go rename to vendor/github.com/attic-labs/graphql/examples/context/main.go index 142b4a3d80..ffed463867 100644 --- a/vendor/github.com/graphql-go/graphql/examples/context/main.go +++ b/vendor/github.com/attic-labs/graphql/examples/context/main.go @@ -6,7 +6,7 @@ import ( "log" "net/http" - "github.com/graphql-go/graphql" + "github.com/attic-labs/graphql" "golang.org/x/net/context" ) diff --git a/vendor/github.com/graphql-go/graphql/examples/hello-world/main.go b/vendor/github.com/attic-labs/graphql/examples/hello-world/main.go similarity index 96% rename from vendor/github.com/graphql-go/graphql/examples/hello-world/main.go rename to vendor/github.com/attic-labs/graphql/examples/hello-world/main.go index d014e9426f..6d9498cb32 100644 --- a/vendor/github.com/graphql-go/graphql/examples/hello-world/main.go +++ b/vendor/github.com/attic-labs/graphql/examples/hello-world/main.go @@ -5,7 +5,7 @@ import ( "fmt" "log" - "github.com/graphql-go/graphql" + "github.com/attic-labs/graphql" ) func main() { diff --git a/vendor/github.com/graphql-go/graphql/examples/http/data.json b/vendor/github.com/attic-labs/graphql/examples/http/data.json similarity index 100% rename from vendor/github.com/graphql-go/graphql/examples/http/data.json rename to vendor/github.com/attic-labs/graphql/examples/http/data.json diff --git a/vendor/github.com/graphql-go/graphql/examples/http/main.go b/vendor/github.com/attic-labs/graphql/examples/http/main.go similarity index 98% rename from vendor/github.com/graphql-go/graphql/examples/http/main.go rename to vendor/github.com/attic-labs/graphql/examples/http/main.go index 26d107683c..9175e41409 100644 --- a/vendor/github.com/graphql-go/graphql/examples/http/main.go +++ b/vendor/github.com/attic-labs/graphql/examples/http/main.go @@ -6,7 +6,7 @@ import ( "io/ioutil" "net/http" - "github.com/graphql-go/graphql" + "github.com/attic-labs/graphql" ) type user struct { diff --git a/vendor/github.com/attic-labs/graphql/examples/httpdynamic/README.md b/vendor/github.com/attic-labs/graphql/examples/httpdynamic/README.md new file mode 100644 index 0000000000..4c45ac3553 --- /dev/null +++ b/vendor/github.com/attic-labs/graphql/examples/httpdynamic/README.md @@ -0,0 +1,40 @@ +Basically, if we have `data.json` like this: + + [ + { "id": "1", "name": "Dan" }, + { "id": "2", "name": "Lee" }, + { "id": "3", "name": "Nick" } + ] + +... and `go run main.go`, we can query records: + + $ curl -g 'http://localhost:8080/graphql?query={user(name:"Dan"){id}}' + {"data":{"user":{"id":"1"}}} + +... now let's give Dan a surname: + + [ + { "id": "1", "name": "Dan", "surname": "Jones" }, + { "id": "2", "name": "Lee" }, + { "id": "3", "name": "Nick" } + ] + +... and kick the server: + + kill -SIGUSR1 52114 + +And ask for Dan's surname: + + $ curl -g 'http://localhost:8080/graphql?query={user(name:"Dan"){id,surname}}' + {"data":{"user":{"id":"1","surname":"Jones"}}} + +... or ask Jones's name and ID: + + $ curl -g 'http://localhost:8080/graphql?query={user(surname:"Jones"){id,name}}' + {"data":{"user":{"id":"1","name":"Dan"}}} + +If you look at `main.go`, the file is not field-aware. That is, all it knows is +how to work with `[]map[string]string` type. + +With this, we are not that far from exposing dynamic fields and filters which +fully depend on what we have stored, all without changing our tooling. diff --git a/vendor/github.com/attic-labs/graphql/examples/httpdynamic/data.json b/vendor/github.com/attic-labs/graphql/examples/httpdynamic/data.json new file mode 100644 index 0000000000..87bd1b2801 --- /dev/null +++ b/vendor/github.com/attic-labs/graphql/examples/httpdynamic/data.json @@ -0,0 +1,15 @@ +[ + { + "id": "1", + "name": "Dan", + "surname": "Jones" + }, + { + "id": "2", + "name": "Lee" + }, + { + "id": "3", + "name": "Nick" + } +] diff --git a/vendor/github.com/attic-labs/graphql/examples/httpdynamic/main.go b/vendor/github.com/attic-labs/graphql/examples/httpdynamic/main.go new file mode 100644 index 0000000000..f0f92855f5 --- /dev/null +++ b/vendor/github.com/attic-labs/graphql/examples/httpdynamic/main.go @@ -0,0 +1,138 @@ +package main + +import ( + "encoding/json" + "fmt" + "io/ioutil" + "net/http" + "os" + "os/signal" + "strconv" + "syscall" + + "github.com/attic-labs/graphql" +) + +/*****************************************************************************/ +/* Shared data variables to allow dynamic reloads +/*****************************************************************************/ + +var schema graphql.Schema + +const jsonDataFile = "data.json" + +func handleSIGUSR1(c chan os.Signal) { + for { + <-c + fmt.Printf("Caught SIGUSR1. Reloading %s\n", jsonDataFile) + err := importJSONDataFromFile(jsonDataFile) + if err != nil { + fmt.Printf("Error: %s\n", err.Error()) + return + } + } +} + +func filterUser(data []map[string]interface{}, args map[string]interface{}) map[string]interface{} { + for _, user := range data { + for k, v := range args { + if user[k] != v { + goto nextuser + } + return user + } + + nextuser: + } + return nil +} + +func executeQuery(query string, schema graphql.Schema) *graphql.Result { + result := graphql.Do(graphql.Params{ + Schema: schema, + RequestString: query, + }) + if len(result.Errors) > 0 { + fmt.Printf("wrong result, unexpected errors: %v\n", result.Errors) + } + return result +} + +func importJSONDataFromFile(fileName string) error { + content, err := ioutil.ReadFile(fileName) + if err != nil { + return err + } + + var data []map[string]interface{} + + err = json.Unmarshal(content, &data) + if err != nil { + return err + } + + fields := make(graphql.Fields) + args := make(graphql.FieldConfigArgument) + for _, item := range data { + for k := range item { + fields[k] = &graphql.Field{ + Type: graphql.String, + } + args[k] = &graphql.ArgumentConfig{ + Type: graphql.String, + } + } + } + + var userType = graphql.NewObject( + graphql.ObjectConfig{ + Name: "User", + Fields: fields, + }, + ) + + var queryType = graphql.NewObject( + graphql.ObjectConfig{ + Name: "Query", + Fields: graphql.Fields{ + "user": &graphql.Field{ + Type: userType, + Args: args, + Resolve: func(p graphql.ResolveParams) (interface{}, error) { + return filterUser(data, p.Args), nil + }, + }, + }, + }) + + schema, _ = graphql.NewSchema( + graphql.SchemaConfig{ + Query: queryType, + }, + ) + + return nil +} + +func main() { + // Catch SIGUSR1 and reload the data file + c := make(chan os.Signal, 1) + signal.Notify(c, syscall.SIGUSR1) + go handleSIGUSR1(c) + + err := importJSONDataFromFile(jsonDataFile) + if err != nil { + fmt.Printf("Error: %s\n", err.Error()) + return + } + + http.HandleFunc("/graphql", func(w http.ResponseWriter, r *http.Request) { + result := executeQuery(r.URL.Query()["query"][0], schema) + json.NewEncoder(w).Encode(result) + }) + + fmt.Println("Now server is running on port 8080") + fmt.Println("Test with Get : curl -g 'http://localhost:8080/graphql?query={user(name:\"Dan\"){id,surname}}'") + fmt.Printf("Reload json file : kill -SIGUSR1 %s\n", strconv.Itoa(os.Getpid())) + http.ListenAndServe(":8080", nil) +} diff --git a/vendor/github.com/graphql-go/graphql/examples/star-wars/main.go b/vendor/github.com/attic-labs/graphql/examples/star-wars/main.go similarity index 87% rename from vendor/github.com/graphql-go/graphql/examples/star-wars/main.go rename to vendor/github.com/attic-labs/graphql/examples/star-wars/main.go index f46612a3f2..67ad85d916 100644 --- a/vendor/github.com/graphql-go/graphql/examples/star-wars/main.go +++ b/vendor/github.com/attic-labs/graphql/examples/star-wars/main.go @@ -5,8 +5,8 @@ import ( "fmt" "net/http" - "github.com/graphql-go/graphql" - "github.com/graphql-go/graphql/testutil" + "github.com/attic-labs/graphql" + "github.com/attic-labs/graphql/testutil" ) func main() { diff --git a/vendor/github.com/graphql-go/graphql/examples/todo/README.md b/vendor/github.com/attic-labs/graphql/examples/todo/README.md similarity index 81% rename from vendor/github.com/graphql-go/graphql/examples/todo/README.md rename to vendor/github.com/attic-labs/graphql/examples/todo/README.md index 4e30eeb030..675e37c022 100644 --- a/vendor/github.com/graphql-go/graphql/examples/todo/README.md +++ b/vendor/github.com/attic-labs/graphql/examples/todo/README.md @@ -25,4 +25,7 @@ curl -g 'http://localhost:8080/graphql?query=mutation+_{createTodo(text:"My+new+ // To get a list of ToDo items curl -g 'http://localhost:8080/graphql?query={todoList{id,text,done}}' + +// To update a ToDo +curl -g 'http://localhost:8080/graphql?query=mutation+_{updateTodo(id:"b",text:"My+new+todo+updated",done:true){id,text,done}}' ``` diff --git a/vendor/github.com/graphql-go/graphql/examples/todo/main.go b/vendor/github.com/attic-labs/graphql/examples/todo/main.go similarity index 81% rename from vendor/github.com/graphql-go/graphql/examples/todo/main.go rename to vendor/github.com/attic-labs/graphql/examples/todo/main.go index f5b69629a5..5ae46e94fc 100644 --- a/vendor/github.com/graphql-go/graphql/examples/todo/main.go +++ b/vendor/github.com/attic-labs/graphql/examples/todo/main.go @@ -2,12 +2,13 @@ package main import ( "encoding/json" + "errors" "fmt" "math/rand" "net/http" "time" - "github.com/graphql-go/graphql" + "github.com/attic-labs/graphql" ) type Todo struct { @@ -95,6 +96,38 @@ var rootMutation = graphql.NewObject(graphql.ObjectConfig{ return newTodo, nil }, }, + /* + curl -g 'http://localhost:8080/graphql?query=mutation+_{updateTodo(text:"My+new+todo+updated"){id,text,done}}' + */ + "updateTodo": &graphql.Field{ + Type: todoType, + Args: graphql.FieldConfigArgument{ + "id": &graphql.ArgumentConfig{ + Type: graphql.NewNonNull(graphql.String), + }, + "text": &graphql.ArgumentConfig{ + Type: graphql.String, + }, + "done": &graphql.ArgumentConfig{ + Type: graphql.Boolean, + }, + }, + Resolve: func(p graphql.ResolveParams) (interface{}, error) { + if idQuery, ok := p.Args["id"].(string); ok { + for _, todo := range TodoList { + if todo.ID == idQuery { + text, _ := p.Args["text"].(string) + done, _ := p.Args["done"].(bool) + todo.Text = text + todo.Done = done + return todo, nil + } + } + return nil, errors.New("could not find todo with that ID") + } + return nil, errors.New("could not get id from params") + }, + }, }, }) @@ -171,15 +204,14 @@ func executeQuery(query string, schema graphql.Schema) *graphql.Result { } func main() { - http.HandleFunc("/graphql", func(w http.ResponseWriter, r *http.Request) { result := executeQuery(r.URL.Query()["query"][0], schema) json.NewEncoder(w).Encode(result) }) - fmt.Println("Now server is running on port 8080") fmt.Println("Get single todo: curl -g 'http://localhost:8080/graphql?query={todo(id:\"b\"){id,text,done}}'") fmt.Println("Create new todo: curl -g 'http://localhost:8080/graphql?query=mutation+_{createTodo(text:\"My+new+todo\"){id,text,done}}'") + fmt.Println("Update a todo: curl -g 'http://localhost:8080/graphql?query=mutation+_{updateTodo(id:\"b\",text:\"My+new+todo+updated\",done:true){id,text,done}}'") fmt.Println("Load todo list: curl -g 'http://localhost:8080/graphql?query={todoList{id,text,done}}'") http.ListenAndServe(":8080", nil) } diff --git a/vendor/github.com/graphql-go/graphql/executor.go b/vendor/github.com/attic-labs/graphql/executor.go similarity index 94% rename from vendor/github.com/graphql-go/graphql/executor.go rename to vendor/github.com/attic-labs/graphql/executor.go index bf093f9464..f24439f9b6 100644 --- a/vendor/github.com/graphql-go/graphql/executor.go +++ b/vendor/github.com/attic-labs/graphql/executor.go @@ -6,8 +6,8 @@ import ( "reflect" "strings" - "github.com/graphql-go/graphql/gqlerrors" - "github.com/graphql-go/graphql/language/ast" + "github.com/attic-labs/graphql/gqlerrors" + "github.com/attic-labs/graphql/language/ast" "golang.org/x/net/context" ) @@ -24,40 +24,72 @@ type ExecuteParams struct { } func Execute(p ExecuteParams) (result *Result) { - result = &Result{} - - exeContext, err := buildExecutionContext(BuildExecutionCtxParams{ - Schema: p.Schema, - Root: p.Root, - AST: p.AST, - OperationName: p.OperationName, - Args: p.Args, - Errors: nil, - Result: result, - Context: p.Context, - }) - - if err != nil { - result.Errors = append(result.Errors, gqlerrors.FormatError(err)) - return + // Use background context if no context was provided + ctx := p.Context + if ctx == nil { + ctx = context.Background() } - defer func() { - if r := recover(); r != nil { - var err error - if r, ok := r.(error); ok { - err = gqlerrors.FormatError(r) - } - exeContext.Errors = append(exeContext.Errors, gqlerrors.FormatError(err)) - result.Errors = exeContext.Errors - } - }() + resultChannel := make(chan *Result) - return executeOperation(ExecuteOperationParams{ - ExecutionContext: exeContext, - Root: p.Root, - Operation: exeContext.Operation, - }) + go func(out chan<- *Result, done <-chan struct{}) { + result := &Result{} + + exeContext, err := buildExecutionContext(BuildExecutionCtxParams{ + Schema: p.Schema, + Root: p.Root, + AST: p.AST, + OperationName: p.OperationName, + Args: p.Args, + Errors: nil, + Result: result, + Context: p.Context, + }) + + if err != nil { + result.Errors = append(result.Errors, gqlerrors.FormatError(err)) + select { + case out <- result: + case <-done: + } + return + } + + defer func() { + if r := recover(); r != nil { + var err error + if r, ok := r.(error); ok { + err = gqlerrors.FormatError(r) + } + exeContext.Errors = append(exeContext.Errors, gqlerrors.FormatError(err)) + result.Errors = exeContext.Errors + select { + case out <- result: + case <-done: + } + } + }() + + result = executeOperation(ExecuteOperationParams{ + ExecutionContext: exeContext, + Root: p.Root, + Operation: exeContext.Operation, + }) + select { + case out <- result: + case <-done: + } + + }(resultChannel, ctx.Done()) + + select { + case <-ctx.Done(): + result = &Result{} + result.Errors = append(result.Errors, gqlerrors.FormatError(ctx.Err())) + case r := <-resultChannel: + result = r + } + return } type BuildExecutionCtxParams struct { diff --git a/vendor/github.com/graphql-go/graphql/executor_resolve_test.go b/vendor/github.com/attic-labs/graphql/executor_resolve_test.go similarity index 98% rename from vendor/github.com/graphql-go/graphql/executor_resolve_test.go rename to vendor/github.com/attic-labs/graphql/executor_resolve_test.go index 1617e0d032..49ec2bad25 100644 --- a/vendor/github.com/graphql-go/graphql/executor_resolve_test.go +++ b/vendor/github.com/attic-labs/graphql/executor_resolve_test.go @@ -2,8 +2,8 @@ package graphql_test import ( "encoding/json" - "github.com/graphql-go/graphql" - "github.com/graphql-go/graphql/testutil" + "github.com/attic-labs/graphql" + "github.com/attic-labs/graphql/testutil" "reflect" "testing" ) diff --git a/vendor/github.com/graphql-go/graphql/executor_schema_test.go b/vendor/github.com/attic-labs/graphql/executor_schema_test.go similarity index 98% rename from vendor/github.com/graphql-go/graphql/executor_schema_test.go rename to vendor/github.com/attic-labs/graphql/executor_schema_test.go index b39c4c3a1e..ccdf2f6c68 100644 --- a/vendor/github.com/graphql-go/graphql/executor_schema_test.go +++ b/vendor/github.com/attic-labs/graphql/executor_schema_test.go @@ -5,8 +5,8 @@ import ( "reflect" "testing" - "github.com/graphql-go/graphql" - "github.com/graphql-go/graphql/testutil" + "github.com/attic-labs/graphql" + "github.com/attic-labs/graphql/testutil" ) // TODO: have a separate package for other tests for eg `parser` diff --git a/vendor/github.com/graphql-go/graphql/executor_test.go b/vendor/github.com/attic-labs/graphql/executor_test.go similarity index 95% rename from vendor/github.com/graphql-go/graphql/executor_test.go rename to vendor/github.com/attic-labs/graphql/executor_test.go index 09cd80de5e..2fa5934950 100644 --- a/vendor/github.com/graphql-go/graphql/executor_test.go +++ b/vendor/github.com/attic-labs/graphql/executor_test.go @@ -6,11 +6,12 @@ import ( "fmt" "reflect" "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/attic-labs/graphql" + "github.com/attic-labs/graphql/gqlerrors" + "github.com/attic-labs/graphql/language/location" + "github.com/attic-labs/graphql/testutil" "golang.org/x/net/context" ) @@ -1639,3 +1640,56 @@ func TestGraphqlTag(t *testing.T) { t.Fatalf("unexpected result, got: %+v, expected: %+v", expectedData, result.Data) } } + +func TestContextDeadline(t *testing.T) { + timeout := time.Millisecond * time.Duration(100) + acceptableDelay := time.Millisecond * time.Duration(10) + expectedErrors := []gqlerrors.FormattedError{ + { + Message: context.DeadlineExceeded.Error(), + Locations: []location.SourceLocation{}, + }, + } + + // Query type includes a field that won't resolve within the deadline + var queryType = graphql.NewObject( + graphql.ObjectConfig{ + Name: "Query", + Fields: graphql.Fields{ + "hello": &graphql.Field{ + Type: graphql.String, + Resolve: func(p graphql.ResolveParams) (interface{}, error) { + time.Sleep(2 * time.Second) + return "world", nil + }, + }, + }, + }) + schema, err := graphql.NewSchema(graphql.SchemaConfig{ + Query: queryType, + }) + if err != nil { + t.Fatalf("unexpected error, got: %v", err) + } + + ctx, cancel := context.WithTimeout(context.Background(), timeout) + defer cancel() + + startTime := time.Now() + result := graphql.Do(graphql.Params{ + Schema: schema, + RequestString: "{hello}", + Context: ctx, + }) + duration := time.Since(startTime) + + if duration > timeout+acceptableDelay { + t.Fatalf("graphql.Do completed in %s, should have completed in %s", duration, timeout) + } + if !result.HasErrors() || len(result.Errors) == 0 { + t.Fatalf("Result should include errors when deadline is exceeded") + } + if !reflect.DeepEqual(expectedErrors, result.Errors) { + t.Fatalf("Unexpected result, Diff: %v", testutil.Diff(expectedErrors, result.Errors)) + } +} diff --git a/vendor/github.com/graphql-go/graphql/gqlerrors/error.go b/vendor/github.com/attic-labs/graphql/gqlerrors/error.go similarity index 89% rename from vendor/github.com/graphql-go/graphql/gqlerrors/error.go rename to vendor/github.com/attic-labs/graphql/gqlerrors/error.go index 1809870aba..73952ce1ed 100644 --- a/vendor/github.com/graphql-go/graphql/gqlerrors/error.go +++ b/vendor/github.com/attic-labs/graphql/gqlerrors/error.go @@ -3,9 +3,9 @@ package gqlerrors import ( "fmt" - "github.com/graphql-go/graphql/language/ast" - "github.com/graphql-go/graphql/language/location" - "github.com/graphql-go/graphql/language/source" + "github.com/attic-labs/graphql/language/ast" + "github.com/attic-labs/graphql/language/location" + "github.com/attic-labs/graphql/language/source" ) type Error struct { diff --git a/vendor/github.com/graphql-go/graphql/gqlerrors/formatted.go b/vendor/github.com/attic-labs/graphql/gqlerrors/formatted.go similarity index 95% rename from vendor/github.com/graphql-go/graphql/gqlerrors/formatted.go rename to vendor/github.com/attic-labs/graphql/gqlerrors/formatted.go index 3a1f8853cd..d9347398a3 100644 --- a/vendor/github.com/graphql-go/graphql/gqlerrors/formatted.go +++ b/vendor/github.com/attic-labs/graphql/gqlerrors/formatted.go @@ -3,7 +3,7 @@ package gqlerrors import ( "errors" - "github.com/graphql-go/graphql/language/location" + "github.com/attic-labs/graphql/language/location" ) type FormattedError struct { diff --git a/vendor/github.com/graphql-go/graphql/gqlerrors/located.go b/vendor/github.com/attic-labs/graphql/gqlerrors/located.go similarity index 94% rename from vendor/github.com/graphql-go/graphql/gqlerrors/located.go rename to vendor/github.com/attic-labs/graphql/gqlerrors/located.go index b02fcd8a9d..2abc5d2866 100644 --- a/vendor/github.com/graphql-go/graphql/gqlerrors/located.go +++ b/vendor/github.com/attic-labs/graphql/gqlerrors/located.go @@ -2,7 +2,7 @@ package gqlerrors import ( "errors" - "github.com/graphql-go/graphql/language/ast" + "github.com/attic-labs/graphql/language/ast" ) // NewLocatedError creates a graphql.Error with location info diff --git a/vendor/github.com/graphql-go/graphql/gqlerrors/sortutil.go b/vendor/github.com/attic-labs/graphql/gqlerrors/sortutil.go similarity index 100% rename from vendor/github.com/graphql-go/graphql/gqlerrors/sortutil.go rename to vendor/github.com/attic-labs/graphql/gqlerrors/sortutil.go diff --git a/vendor/github.com/graphql-go/graphql/gqlerrors/syntax.go b/vendor/github.com/attic-labs/graphql/gqlerrors/syntax.go similarity index 92% rename from vendor/github.com/graphql-go/graphql/gqlerrors/syntax.go rename to vendor/github.com/attic-labs/graphql/gqlerrors/syntax.go index abad6ade0c..f1193cc105 100644 --- a/vendor/github.com/graphql-go/graphql/gqlerrors/syntax.go +++ b/vendor/github.com/attic-labs/graphql/gqlerrors/syntax.go @@ -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/attic-labs/graphql/language/ast" + "github.com/attic-labs/graphql/language/location" + "github.com/attic-labs/graphql/language/source" ) func NewSyntaxError(s *source.Source, position int, description string) *Error { diff --git a/vendor/github.com/graphql-go/graphql/graphql.go b/vendor/github.com/attic-labs/graphql/graphql.go similarity index 91% rename from vendor/github.com/graphql-go/graphql/graphql.go rename to vendor/github.com/attic-labs/graphql/graphql.go index af9dd65a96..8d9d9cc5d3 100644 --- a/vendor/github.com/graphql-go/graphql/graphql.go +++ b/vendor/github.com/attic-labs/graphql/graphql.go @@ -1,9 +1,9 @@ package graphql import ( - "github.com/graphql-go/graphql/gqlerrors" - "github.com/graphql-go/graphql/language/parser" - "github.com/graphql-go/graphql/language/source" + "github.com/attic-labs/graphql/gqlerrors" + "github.com/attic-labs/graphql/language/parser" + "github.com/attic-labs/graphql/language/source" "golang.org/x/net/context" ) diff --git a/vendor/github.com/graphql-go/graphql/graphql_test.go b/vendor/github.com/attic-labs/graphql/graphql_test.go similarity index 98% rename from vendor/github.com/graphql-go/graphql/graphql_test.go rename to vendor/github.com/attic-labs/graphql/graphql_test.go index 365d11bd06..9e1356e928 100644 --- a/vendor/github.com/graphql-go/graphql/graphql_test.go +++ b/vendor/github.com/attic-labs/graphql/graphql_test.go @@ -4,8 +4,8 @@ import ( "reflect" "testing" - "github.com/graphql-go/graphql" - "github.com/graphql-go/graphql/testutil" + "github.com/attic-labs/graphql" + "github.com/attic-labs/graphql/testutil" "golang.org/x/net/context" ) diff --git a/vendor/github.com/graphql-go/graphql/introspection.go b/vendor/github.com/attic-labs/graphql/introspection.go similarity index 99% rename from vendor/github.com/graphql-go/graphql/introspection.go rename to vendor/github.com/attic-labs/graphql/introspection.go index e837be2e8d..062f7d3e02 100644 --- a/vendor/github.com/graphql-go/graphql/introspection.go +++ b/vendor/github.com/attic-labs/graphql/introspection.go @@ -4,8 +4,8 @@ import ( "fmt" "reflect" - "github.com/graphql-go/graphql/language/ast" - "github.com/graphql-go/graphql/language/printer" + "github.com/attic-labs/graphql/language/ast" + "github.com/attic-labs/graphql/language/printer" ) const ( diff --git a/vendor/github.com/graphql-go/graphql/introspection_test.go b/vendor/github.com/attic-labs/graphql/introspection_test.go similarity index 99% rename from vendor/github.com/graphql-go/graphql/introspection_test.go rename to vendor/github.com/attic-labs/graphql/introspection_test.go index 3b4f2a4699..521ea7c6f4 100644 --- a/vendor/github.com/graphql-go/graphql/introspection_test.go +++ b/vendor/github.com/attic-labs/graphql/introspection_test.go @@ -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/attic-labs/graphql" + "github.com/attic-labs/graphql/gqlerrors" + "github.com/attic-labs/graphql/language/location" + "github.com/attic-labs/graphql/testutil" ) func g(t *testing.T, p graphql.Params) *graphql.Result { diff --git a/vendor/github.com/graphql-go/graphql/kitchen-sink.graphql b/vendor/github.com/attic-labs/graphql/kitchen-sink.graphql similarity index 100% rename from vendor/github.com/graphql-go/graphql/kitchen-sink.graphql rename to vendor/github.com/attic-labs/graphql/kitchen-sink.graphql diff --git a/vendor/github.com/graphql-go/graphql/language/ast/arguments.go b/vendor/github.com/attic-labs/graphql/language/ast/arguments.go similarity index 90% rename from vendor/github.com/graphql-go/graphql/language/ast/arguments.go rename to vendor/github.com/attic-labs/graphql/language/ast/arguments.go index 5f7ef0d2c5..40b9d55a51 100644 --- a/vendor/github.com/graphql-go/graphql/language/ast/arguments.go +++ b/vendor/github.com/attic-labs/graphql/language/ast/arguments.go @@ -1,7 +1,7 @@ package ast import ( - "github.com/graphql-go/graphql/language/kinds" + "github.com/attic-labs/graphql/language/kinds" ) // Argument implements Node diff --git a/vendor/github.com/graphql-go/graphql/language/ast/definitions.go b/vendor/github.com/attic-labs/graphql/language/ast/definitions.go similarity index 99% rename from vendor/github.com/graphql-go/graphql/language/ast/definitions.go rename to vendor/github.com/attic-labs/graphql/language/ast/definitions.go index c224a9fd8c..e3d38388d1 100644 --- a/vendor/github.com/graphql-go/graphql/language/ast/definitions.go +++ b/vendor/github.com/attic-labs/graphql/language/ast/definitions.go @@ -1,7 +1,7 @@ package ast import ( - "github.com/graphql-go/graphql/language/kinds" + "github.com/attic-labs/graphql/language/kinds" ) type Definition interface { diff --git a/vendor/github.com/graphql-go/graphql/language/ast/directives.go b/vendor/github.com/attic-labs/graphql/language/ast/directives.go similarity index 91% rename from vendor/github.com/graphql-go/graphql/language/ast/directives.go rename to vendor/github.com/attic-labs/graphql/language/ast/directives.go index 0c8a8c0ef8..99e7f69fd7 100644 --- a/vendor/github.com/graphql-go/graphql/language/ast/directives.go +++ b/vendor/github.com/attic-labs/graphql/language/ast/directives.go @@ -1,7 +1,7 @@ package ast import ( - "github.com/graphql-go/graphql/language/kinds" + "github.com/attic-labs/graphql/language/kinds" ) // Directive implements Node diff --git a/vendor/github.com/graphql-go/graphql/language/ast/document.go b/vendor/github.com/attic-labs/graphql/language/ast/document.go similarity index 90% rename from vendor/github.com/graphql-go/graphql/language/ast/document.go rename to vendor/github.com/attic-labs/graphql/language/ast/document.go index dcb67034c4..d1bb2087f3 100644 --- a/vendor/github.com/graphql-go/graphql/language/ast/document.go +++ b/vendor/github.com/attic-labs/graphql/language/ast/document.go @@ -1,7 +1,7 @@ package ast import ( - "github.com/graphql-go/graphql/language/kinds" + "github.com/attic-labs/graphql/language/kinds" ) // Document implements Node diff --git a/vendor/github.com/graphql-go/graphql/language/ast/location.go b/vendor/github.com/attic-labs/graphql/language/ast/location.go similarity index 84% rename from vendor/github.com/graphql-go/graphql/language/ast/location.go rename to vendor/github.com/attic-labs/graphql/language/ast/location.go index 266dc8477a..b575ddee3e 100644 --- a/vendor/github.com/graphql-go/graphql/language/ast/location.go +++ b/vendor/github.com/attic-labs/graphql/language/ast/location.go @@ -1,7 +1,7 @@ package ast import ( - "github.com/graphql-go/graphql/language/source" + "github.com/attic-labs/graphql/language/source" ) type Location struct { diff --git a/vendor/github.com/graphql-go/graphql/language/ast/name.go b/vendor/github.com/attic-labs/graphql/language/ast/name.go similarity index 88% rename from vendor/github.com/graphql-go/graphql/language/ast/name.go rename to vendor/github.com/attic-labs/graphql/language/ast/name.go index 00fddbcdd6..453cc2a65a 100644 --- a/vendor/github.com/graphql-go/graphql/language/ast/name.go +++ b/vendor/github.com/attic-labs/graphql/language/ast/name.go @@ -1,7 +1,7 @@ package ast import ( - "github.com/graphql-go/graphql/language/kinds" + "github.com/attic-labs/graphql/language/kinds" ) // Name implements Node diff --git a/vendor/github.com/graphql-go/graphql/language/ast/node.go b/vendor/github.com/attic-labs/graphql/language/ast/node.go similarity index 100% rename from vendor/github.com/graphql-go/graphql/language/ast/node.go rename to vendor/github.com/attic-labs/graphql/language/ast/node.go diff --git a/vendor/github.com/graphql-go/graphql/language/ast/selections.go b/vendor/github.com/attic-labs/graphql/language/ast/selections.go similarity index 98% rename from vendor/github.com/graphql-go/graphql/language/ast/selections.go rename to vendor/github.com/attic-labs/graphql/language/ast/selections.go index 0dc0ea1214..4fdb36111f 100644 --- a/vendor/github.com/graphql-go/graphql/language/ast/selections.go +++ b/vendor/github.com/attic-labs/graphql/language/ast/selections.go @@ -1,7 +1,7 @@ package ast import ( - "github.com/graphql-go/graphql/language/kinds" + "github.com/attic-labs/graphql/language/kinds" ) type Selection interface { diff --git a/vendor/github.com/graphql-go/graphql/language/ast/type_definitions.go b/vendor/github.com/attic-labs/graphql/language/ast/type_definitions.go similarity index 99% rename from vendor/github.com/graphql-go/graphql/language/ast/type_definitions.go rename to vendor/github.com/attic-labs/graphql/language/ast/type_definitions.go index dd7940c9c3..21bb5e1679 100644 --- a/vendor/github.com/graphql-go/graphql/language/ast/type_definitions.go +++ b/vendor/github.com/attic-labs/graphql/language/ast/type_definitions.go @@ -1,7 +1,7 @@ package ast import ( - "github.com/graphql-go/graphql/language/kinds" + "github.com/attic-labs/graphql/language/kinds" ) type TypeDefinition interface { diff --git a/vendor/github.com/graphql-go/graphql/language/ast/types.go b/vendor/github.com/attic-labs/graphql/language/ast/types.go similarity index 96% rename from vendor/github.com/graphql-go/graphql/language/ast/types.go rename to vendor/github.com/attic-labs/graphql/language/ast/types.go index 27f009979d..0cc62a67a2 100644 --- a/vendor/github.com/graphql-go/graphql/language/ast/types.go +++ b/vendor/github.com/attic-labs/graphql/language/ast/types.go @@ -1,7 +1,7 @@ package ast import ( - "github.com/graphql-go/graphql/language/kinds" + "github.com/attic-labs/graphql/language/kinds" ) type Type interface { diff --git a/vendor/github.com/graphql-go/graphql/language/ast/values.go b/vendor/github.com/attic-labs/graphql/language/ast/values.go similarity index 99% rename from vendor/github.com/graphql-go/graphql/language/ast/values.go rename to vendor/github.com/attic-labs/graphql/language/ast/values.go index 67912bdc38..45663697ce 100644 --- a/vendor/github.com/graphql-go/graphql/language/ast/values.go +++ b/vendor/github.com/attic-labs/graphql/language/ast/values.go @@ -1,7 +1,7 @@ package ast import ( - "github.com/graphql-go/graphql/language/kinds" + "github.com/attic-labs/graphql/language/kinds" ) type Value interface { diff --git a/vendor/github.com/graphql-go/graphql/language/kinds/kinds.go b/vendor/github.com/attic-labs/graphql/language/kinds/kinds.go similarity index 100% rename from vendor/github.com/graphql-go/graphql/language/kinds/kinds.go rename to vendor/github.com/attic-labs/graphql/language/kinds/kinds.go diff --git a/vendor/github.com/graphql-go/graphql/language/lexer/lexer.go b/vendor/github.com/attic-labs/graphql/language/lexer/lexer.go similarity index 99% rename from vendor/github.com/graphql-go/graphql/language/lexer/lexer.go rename to vendor/github.com/attic-labs/graphql/language/lexer/lexer.go index 865c9d6ecf..0954ffa6b2 100644 --- a/vendor/github.com/graphql-go/graphql/language/lexer/lexer.go +++ b/vendor/github.com/attic-labs/graphql/language/lexer/lexer.go @@ -5,8 +5,8 @@ import ( "fmt" "unicode/utf8" - "github.com/graphql-go/graphql/gqlerrors" - "github.com/graphql-go/graphql/language/source" + "github.com/attic-labs/graphql/gqlerrors" + "github.com/attic-labs/graphql/language/source" ) const ( diff --git a/vendor/github.com/graphql-go/graphql/language/lexer/lexer_test.go b/vendor/github.com/attic-labs/graphql/language/lexer/lexer_test.go similarity index 99% rename from vendor/github.com/graphql-go/graphql/language/lexer/lexer_test.go rename to vendor/github.com/attic-labs/graphql/language/lexer/lexer_test.go index ac59c84686..a1406a621d 100644 --- a/vendor/github.com/graphql-go/graphql/language/lexer/lexer_test.go +++ b/vendor/github.com/attic-labs/graphql/language/lexer/lexer_test.go @@ -4,7 +4,7 @@ import ( "reflect" "testing" - "github.com/graphql-go/graphql/language/source" + "github.com/attic-labs/graphql/language/source" ) type Test struct { diff --git a/vendor/github.com/graphql-go/graphql/language/location/location.go b/vendor/github.com/attic-labs/graphql/language/location/location.go similarity index 92% rename from vendor/github.com/graphql-go/graphql/language/location/location.go rename to vendor/github.com/attic-labs/graphql/language/location/location.go index 04bbde6e36..2c61501b4d 100644 --- a/vendor/github.com/graphql-go/graphql/language/location/location.go +++ b/vendor/github.com/attic-labs/graphql/language/location/location.go @@ -3,7 +3,7 @@ package location import ( "regexp" - "github.com/graphql-go/graphql/language/source" + "github.com/attic-labs/graphql/language/source" ) type SourceLocation struct { diff --git a/vendor/github.com/graphql-go/graphql/language/parser/parser.go b/vendor/github.com/attic-labs/graphql/language/parser/parser.go similarity index 99% rename from vendor/github.com/graphql-go/graphql/language/parser/parser.go rename to vendor/github.com/attic-labs/graphql/language/parser/parser.go index 46ddf7513e..6ed12a6593 100644 --- a/vendor/github.com/graphql-go/graphql/language/parser/parser.go +++ b/vendor/github.com/attic-labs/graphql/language/parser/parser.go @@ -3,10 +3,10 @@ package parser import ( "fmt" - "github.com/graphql-go/graphql/gqlerrors" - "github.com/graphql-go/graphql/language/ast" - "github.com/graphql-go/graphql/language/lexer" - "github.com/graphql-go/graphql/language/source" + "github.com/attic-labs/graphql/gqlerrors" + "github.com/attic-labs/graphql/language/ast" + "github.com/attic-labs/graphql/language/lexer" + "github.com/attic-labs/graphql/language/source" ) type parseFn func(parser *Parser) (interface{}, error) diff --git a/vendor/github.com/graphql-go/graphql/language/parser/parser_test.go b/vendor/github.com/attic-labs/graphql/language/parser/parser_test.go similarity index 98% rename from vendor/github.com/graphql-go/graphql/language/parser/parser_test.go rename to vendor/github.com/attic-labs/graphql/language/parser/parser_test.go index 86116db1b4..99568a8110 100644 --- a/vendor/github.com/graphql-go/graphql/language/parser/parser_test.go +++ b/vendor/github.com/attic-labs/graphql/language/parser/parser_test.go @@ -7,11 +7,11 @@ import ( "strings" "testing" - "github.com/graphql-go/graphql/gqlerrors" - "github.com/graphql-go/graphql/language/ast" - "github.com/graphql-go/graphql/language/location" - "github.com/graphql-go/graphql/language/printer" - "github.com/graphql-go/graphql/language/source" + "github.com/attic-labs/graphql/gqlerrors" + "github.com/attic-labs/graphql/language/ast" + "github.com/attic-labs/graphql/language/location" + "github.com/attic-labs/graphql/language/printer" + "github.com/attic-labs/graphql/language/source" ) func TestBadToken(t *testing.T) { diff --git a/vendor/github.com/graphql-go/graphql/language/parser/schema_parser_test.go b/vendor/github.com/attic-labs/graphql/language/parser/schema_parser_test.go similarity index 98% rename from vendor/github.com/graphql-go/graphql/language/parser/schema_parser_test.go rename to vendor/github.com/attic-labs/graphql/language/parser/schema_parser_test.go index 510c7d26fa..35e8552ade 100644 --- a/vendor/github.com/graphql-go/graphql/language/parser/schema_parser_test.go +++ b/vendor/github.com/attic-labs/graphql/language/parser/schema_parser_test.go @@ -4,10 +4,10 @@ import ( "reflect" "testing" - "github.com/graphql-go/graphql/gqlerrors" - "github.com/graphql-go/graphql/language/ast" - "github.com/graphql-go/graphql/language/location" - "github.com/graphql-go/graphql/language/source" + "github.com/attic-labs/graphql/gqlerrors" + "github.com/attic-labs/graphql/language/ast" + "github.com/attic-labs/graphql/language/location" + "github.com/attic-labs/graphql/language/source" ) func parse(t *testing.T, query string) *ast.Document { diff --git a/vendor/github.com/graphql-go/graphql/language/printer/printer.go b/vendor/github.com/attic-labs/graphql/language/printer/printer.go similarity index 99% rename from vendor/github.com/graphql-go/graphql/language/printer/printer.go rename to vendor/github.com/attic-labs/graphql/language/printer/printer.go index 47f9b2a429..35afc846d1 100644 --- a/vendor/github.com/graphql-go/graphql/language/printer/printer.go +++ b/vendor/github.com/attic-labs/graphql/language/printer/printer.go @@ -4,8 +4,8 @@ import ( "fmt" "strings" - "github.com/graphql-go/graphql/language/ast" - "github.com/graphql-go/graphql/language/visitor" + "github.com/attic-labs/graphql/language/ast" + "github.com/attic-labs/graphql/language/visitor" "reflect" ) diff --git a/vendor/github.com/graphql-go/graphql/language/printer/printer_test.go b/vendor/github.com/attic-labs/graphql/language/printer/printer_test.go similarity index 95% rename from vendor/github.com/graphql-go/graphql/language/printer/printer_test.go rename to vendor/github.com/attic-labs/graphql/language/printer/printer_test.go index 760ec65a1b..d91ed60c5e 100644 --- a/vendor/github.com/graphql-go/graphql/language/printer/printer_test.go +++ b/vendor/github.com/attic-labs/graphql/language/printer/printer_test.go @@ -5,10 +5,10 @@ import ( "reflect" "testing" - "github.com/graphql-go/graphql/language/ast" - "github.com/graphql-go/graphql/language/parser" - "github.com/graphql-go/graphql/language/printer" - "github.com/graphql-go/graphql/testutil" + "github.com/attic-labs/graphql/language/ast" + "github.com/attic-labs/graphql/language/parser" + "github.com/attic-labs/graphql/language/printer" + "github.com/attic-labs/graphql/testutil" ) func parse(t *testing.T, query string) *ast.Document { diff --git a/vendor/github.com/graphql-go/graphql/language/printer/schema_printer_test.go b/vendor/github.com/attic-labs/graphql/language/printer/schema_printer_test.go similarity index 93% rename from vendor/github.com/graphql-go/graphql/language/printer/schema_printer_test.go rename to vendor/github.com/attic-labs/graphql/language/printer/schema_printer_test.go index 3e0f6f694c..13087fce2b 100644 --- a/vendor/github.com/graphql-go/graphql/language/printer/schema_printer_test.go +++ b/vendor/github.com/attic-labs/graphql/language/printer/schema_printer_test.go @@ -5,9 +5,9 @@ import ( "reflect" "testing" - "github.com/graphql-go/graphql/language/ast" - "github.com/graphql-go/graphql/language/printer" - "github.com/graphql-go/graphql/testutil" + "github.com/attic-labs/graphql/language/ast" + "github.com/attic-labs/graphql/language/printer" + "github.com/attic-labs/graphql/testutil" ) func TestSchemaPrinter_PrintsMinimalAST(t *testing.T) { diff --git a/vendor/github.com/graphql-go/graphql/language/source/source.go b/vendor/github.com/attic-labs/graphql/language/source/source.go similarity index 100% rename from vendor/github.com/graphql-go/graphql/language/source/source.go rename to vendor/github.com/attic-labs/graphql/language/source/source.go diff --git a/vendor/github.com/graphql-go/graphql/language/typeInfo/type_info.go b/vendor/github.com/attic-labs/graphql/language/typeInfo/type_info.go similarity index 78% rename from vendor/github.com/graphql-go/graphql/language/typeInfo/type_info.go rename to vendor/github.com/attic-labs/graphql/language/typeInfo/type_info.go index e012ee0279..c32c1f995f 100644 --- a/vendor/github.com/graphql-go/graphql/language/typeInfo/type_info.go +++ b/vendor/github.com/attic-labs/graphql/language/typeInfo/type_info.go @@ -1,7 +1,7 @@ package typeInfo import ( - "github.com/graphql-go/graphql/language/ast" + "github.com/attic-labs/graphql/language/ast" ) // TypeInfoI defines the interface for TypeInfo Implementation diff --git a/vendor/github.com/graphql-go/graphql/language/visitor/visitor.go b/vendor/github.com/attic-labs/graphql/language/visitor/visitor.go similarity index 99% rename from vendor/github.com/graphql-go/graphql/language/visitor/visitor.go rename to vendor/github.com/attic-labs/graphql/language/visitor/visitor.go index b59df23519..0dc4dffa6d 100644 --- a/vendor/github.com/graphql-go/graphql/language/visitor/visitor.go +++ b/vendor/github.com/attic-labs/graphql/language/visitor/visitor.go @@ -3,8 +3,8 @@ package visitor import ( "encoding/json" "fmt" - "github.com/graphql-go/graphql/language/ast" - "github.com/graphql-go/graphql/language/typeInfo" + "github.com/attic-labs/graphql/language/ast" + "github.com/attic-labs/graphql/language/typeInfo" "reflect" ) diff --git a/vendor/github.com/graphql-go/graphql/language/visitor/visitor_test.go b/vendor/github.com/attic-labs/graphql/language/visitor/visitor_test.go similarity index 99% rename from vendor/github.com/graphql-go/graphql/language/visitor/visitor_test.go rename to vendor/github.com/attic-labs/graphql/language/visitor/visitor_test.go index 898c89aeff..73f7790da7 100644 --- a/vendor/github.com/graphql-go/graphql/language/visitor/visitor_test.go +++ b/vendor/github.com/attic-labs/graphql/language/visitor/visitor_test.go @@ -6,13 +6,13 @@ import ( "testing" "fmt" - "github.com/graphql-go/graphql" - "github.com/graphql-go/graphql/language/ast" - "github.com/graphql-go/graphql/language/kinds" - "github.com/graphql-go/graphql/language/parser" - "github.com/graphql-go/graphql/language/printer" - "github.com/graphql-go/graphql/language/visitor" - "github.com/graphql-go/graphql/testutil" + "github.com/attic-labs/graphql" + "github.com/attic-labs/graphql/language/ast" + "github.com/attic-labs/graphql/language/kinds" + "github.com/attic-labs/graphql/language/parser" + "github.com/attic-labs/graphql/language/printer" + "github.com/attic-labs/graphql/language/visitor" + "github.com/attic-labs/graphql/testutil" ) func parse(t *testing.T, query string) *ast.Document { diff --git a/vendor/github.com/graphql-go/graphql/lists_test.go b/vendor/github.com/attic-labs/graphql/lists_test.go similarity index 99% rename from vendor/github.com/graphql-go/graphql/lists_test.go rename to vendor/github.com/attic-labs/graphql/lists_test.go index 7fd360c8ce..28f330db42 100644 --- a/vendor/github.com/graphql-go/graphql/lists_test.go +++ b/vendor/github.com/attic-labs/graphql/lists_test.go @@ -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/attic-labs/graphql" + "github.com/attic-labs/graphql/gqlerrors" + "github.com/attic-labs/graphql/language/location" + "github.com/attic-labs/graphql/testutil" ) func checkList(t *testing.T, testType graphql.Type, testData interface{}, expected *graphql.Result) { diff --git a/vendor/github.com/graphql-go/graphql/located.go b/vendor/github.com/attic-labs/graphql/located.go similarity index 87% rename from vendor/github.com/graphql-go/graphql/located.go rename to vendor/github.com/attic-labs/graphql/located.go index 6ed8ec83de..5c2e06613b 100644 --- a/vendor/github.com/graphql-go/graphql/located.go +++ b/vendor/github.com/attic-labs/graphql/located.go @@ -2,8 +2,8 @@ package graphql import ( "errors" - "github.com/graphql-go/graphql/gqlerrors" - "github.com/graphql-go/graphql/language/ast" + "github.com/attic-labs/graphql/gqlerrors" + "github.com/attic-labs/graphql/language/ast" ) func NewLocatedError(err interface{}, nodes []ast.Node) *gqlerrors.Error { diff --git a/vendor/github.com/graphql-go/graphql/mutations_test.go b/vendor/github.com/attic-labs/graphql/mutations_test.go similarity index 97% rename from vendor/github.com/graphql-go/graphql/mutations_test.go rename to vendor/github.com/attic-labs/graphql/mutations_test.go index a97dda523b..a92f0169c9 100644 --- a/vendor/github.com/graphql-go/graphql/mutations_test.go +++ b/vendor/github.com/attic-labs/graphql/mutations_test.go @@ -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/attic-labs/graphql" + "github.com/attic-labs/graphql/gqlerrors" + "github.com/attic-labs/graphql/language/location" + "github.com/attic-labs/graphql/testutil" ) // testNumberHolder maps to numberHolderType diff --git a/vendor/github.com/graphql-go/graphql/nonnull_test.go b/vendor/github.com/attic-labs/graphql/nonnull_test.go similarity index 99% rename from vendor/github.com/graphql-go/graphql/nonnull_test.go rename to vendor/github.com/attic-labs/graphql/nonnull_test.go index 75b3f6cb48..07f4e8de36 100644 --- a/vendor/github.com/graphql-go/graphql/nonnull_test.go +++ b/vendor/github.com/attic-labs/graphql/nonnull_test.go @@ -5,10 +5,10 @@ import ( "sort" "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/attic-labs/graphql" + "github.com/attic-labs/graphql/gqlerrors" + "github.com/attic-labs/graphql/language/location" + "github.com/attic-labs/graphql/testutil" ) var syncError = "sync" diff --git a/vendor/github.com/graphql-go/graphql/rules.go b/vendor/github.com/attic-labs/graphql/rules.go similarity index 99% rename from vendor/github.com/graphql-go/graphql/rules.go rename to vendor/github.com/attic-labs/graphql/rules.go index 3b3c445676..2bbbe38148 100644 --- a/vendor/github.com/graphql-go/graphql/rules.go +++ b/vendor/github.com/attic-labs/graphql/rules.go @@ -2,11 +2,11 @@ package graphql import ( "fmt" - "github.com/graphql-go/graphql/gqlerrors" - "github.com/graphql-go/graphql/language/ast" - "github.com/graphql-go/graphql/language/kinds" - "github.com/graphql-go/graphql/language/printer" - "github.com/graphql-go/graphql/language/visitor" + "github.com/attic-labs/graphql/gqlerrors" + "github.com/attic-labs/graphql/language/ast" + "github.com/attic-labs/graphql/language/kinds" + "github.com/attic-labs/graphql/language/printer" + "github.com/attic-labs/graphql/language/visitor" "sort" "strings" ) @@ -15,12 +15,12 @@ import ( var SpecifiedRules = []ValidationRuleFn{ ArgumentsOfCorrectTypeRule, DefaultValuesOfCorrectTypeRule, - FieldsOnCorrectTypeRule, + // FieldsOnCorrectTypeRule, <-- commented out for Attic FragmentsOnCompositeTypesRule, KnownArgumentNamesRule, KnownDirectivesRule, KnownFragmentNamesRule, - KnownTypeNamesRule, + // KnownTypeNamesRule, <-- commented out for Attic LoneAnonymousOperationRule, NoFragmentCyclesRule, NoUndefinedVariablesRule, diff --git a/vendor/github.com/graphql-go/graphql/rules_arguments_of_correct_type_test.go b/vendor/github.com/attic-labs/graphql/rules_arguments_of_correct_type_test.go similarity index 99% rename from vendor/github.com/graphql-go/graphql/rules_arguments_of_correct_type_test.go rename to vendor/github.com/attic-labs/graphql/rules_arguments_of_correct_type_test.go index ecd4bea4fa..74bdad2b09 100644 --- a/vendor/github.com/graphql-go/graphql/rules_arguments_of_correct_type_test.go +++ b/vendor/github.com/attic-labs/graphql/rules_arguments_of_correct_type_test.go @@ -3,9 +3,9 @@ package graphql_test import ( "testing" - "github.com/graphql-go/graphql" - "github.com/graphql-go/graphql/gqlerrors" - "github.com/graphql-go/graphql/testutil" + "github.com/attic-labs/graphql" + "github.com/attic-labs/graphql/gqlerrors" + "github.com/attic-labs/graphql/testutil" ) func TestValidate_ArgValuesOfCorrectType_ValidValue_GoodIntValue(t *testing.T) { diff --git a/vendor/github.com/graphql-go/graphql/rules_default_values_of_correct_type_test.go b/vendor/github.com/attic-labs/graphql/rules_default_values_of_correct_type_test.go similarity index 96% rename from vendor/github.com/graphql-go/graphql/rules_default_values_of_correct_type_test.go rename to vendor/github.com/attic-labs/graphql/rules_default_values_of_correct_type_test.go index bc9545be4e..f45e45bc2f 100644 --- a/vendor/github.com/graphql-go/graphql/rules_default_values_of_correct_type_test.go +++ b/vendor/github.com/attic-labs/graphql/rules_default_values_of_correct_type_test.go @@ -3,9 +3,9 @@ package graphql_test import ( "testing" - "github.com/graphql-go/graphql" - "github.com/graphql-go/graphql/gqlerrors" - "github.com/graphql-go/graphql/testutil" + "github.com/attic-labs/graphql" + "github.com/attic-labs/graphql/gqlerrors" + "github.com/attic-labs/graphql/testutil" ) func TestValidate_VariableDefaultValuesOfCorrectType_VariablesWithNoDefaultValues(t *testing.T) { diff --git a/vendor/github.com/graphql-go/graphql/rules_fields_on_correct_type_test.go b/vendor/github.com/attic-labs/graphql/rules_fields_on_correct_type_test.go similarity index 98% rename from vendor/github.com/graphql-go/graphql/rules_fields_on_correct_type_test.go rename to vendor/github.com/attic-labs/graphql/rules_fields_on_correct_type_test.go index 294a0682a7..a829ca6639 100644 --- a/vendor/github.com/graphql-go/graphql/rules_fields_on_correct_type_test.go +++ b/vendor/github.com/attic-labs/graphql/rules_fields_on_correct_type_test.go @@ -3,9 +3,9 @@ package graphql_test import ( "testing" - "github.com/graphql-go/graphql" - "github.com/graphql-go/graphql/gqlerrors" - "github.com/graphql-go/graphql/testutil" + "github.com/attic-labs/graphql" + "github.com/attic-labs/graphql/gqlerrors" + "github.com/attic-labs/graphql/testutil" ) func TestValidate_FieldsOnCorrectType_ObjectFieldSelection(t *testing.T) { diff --git a/vendor/github.com/graphql-go/graphql/rules_fragments_on_composite_types_test.go b/vendor/github.com/attic-labs/graphql/rules_fragments_on_composite_types_test.go similarity index 95% rename from vendor/github.com/graphql-go/graphql/rules_fragments_on_composite_types_test.go rename to vendor/github.com/attic-labs/graphql/rules_fragments_on_composite_types_test.go index efe072abde..87397b90a9 100644 --- a/vendor/github.com/graphql-go/graphql/rules_fragments_on_composite_types_test.go +++ b/vendor/github.com/attic-labs/graphql/rules_fragments_on_composite_types_test.go @@ -3,9 +3,9 @@ package graphql_test import ( "testing" - "github.com/graphql-go/graphql" - "github.com/graphql-go/graphql/gqlerrors" - "github.com/graphql-go/graphql/testutil" + "github.com/attic-labs/graphql" + "github.com/attic-labs/graphql/gqlerrors" + "github.com/attic-labs/graphql/testutil" ) func TestValidate_FragmentsOnCompositeTypes_ObjectIsValidFragmentType(t *testing.T) { diff --git a/vendor/github.com/graphql-go/graphql/rules_known_argument_names_test.go b/vendor/github.com/attic-labs/graphql/rules_known_argument_names_test.go similarity index 96% rename from vendor/github.com/graphql-go/graphql/rules_known_argument_names_test.go rename to vendor/github.com/attic-labs/graphql/rules_known_argument_names_test.go index 7536161db0..bf2654dfdf 100644 --- a/vendor/github.com/graphql-go/graphql/rules_known_argument_names_test.go +++ b/vendor/github.com/attic-labs/graphql/rules_known_argument_names_test.go @@ -3,9 +3,9 @@ package graphql_test import ( "testing" - "github.com/graphql-go/graphql" - "github.com/graphql-go/graphql/gqlerrors" - "github.com/graphql-go/graphql/testutil" + "github.com/attic-labs/graphql" + "github.com/attic-labs/graphql/gqlerrors" + "github.com/attic-labs/graphql/testutil" ) func TestValidate_KnownArgumentNames_SingleArgIsKnown(t *testing.T) { diff --git a/vendor/github.com/graphql-go/graphql/rules_known_directives_rule_test.go b/vendor/github.com/attic-labs/graphql/rules_known_directives_rule_test.go similarity index 95% rename from vendor/github.com/graphql-go/graphql/rules_known_directives_rule_test.go rename to vendor/github.com/attic-labs/graphql/rules_known_directives_rule_test.go index ea6c07e9c5..7524c4c941 100644 --- a/vendor/github.com/graphql-go/graphql/rules_known_directives_rule_test.go +++ b/vendor/github.com/attic-labs/graphql/rules_known_directives_rule_test.go @@ -3,9 +3,9 @@ package graphql_test import ( "testing" - "github.com/graphql-go/graphql" - "github.com/graphql-go/graphql/gqlerrors" - "github.com/graphql-go/graphql/testutil" + "github.com/attic-labs/graphql" + "github.com/attic-labs/graphql/gqlerrors" + "github.com/attic-labs/graphql/testutil" ) func TestValidate_KnownDirectives_WithNoDirectives(t *testing.T) { diff --git a/vendor/github.com/graphql-go/graphql/rules_known_fragment_names_test.go b/vendor/github.com/attic-labs/graphql/rules_known_fragment_names_test.go similarity index 91% rename from vendor/github.com/graphql-go/graphql/rules_known_fragment_names_test.go rename to vendor/github.com/attic-labs/graphql/rules_known_fragment_names_test.go index eb522b260e..6e39278e06 100644 --- a/vendor/github.com/graphql-go/graphql/rules_known_fragment_names_test.go +++ b/vendor/github.com/attic-labs/graphql/rules_known_fragment_names_test.go @@ -3,9 +3,9 @@ package graphql_test import ( "testing" - "github.com/graphql-go/graphql" - "github.com/graphql-go/graphql/gqlerrors" - "github.com/graphql-go/graphql/testutil" + "github.com/attic-labs/graphql" + "github.com/attic-labs/graphql/gqlerrors" + "github.com/attic-labs/graphql/testutil" ) func TestValidate_KnownFragmentNames_KnownFragmentNamesAreValid(t *testing.T) { diff --git a/vendor/github.com/graphql-go/graphql/rules_known_type_names_test.go b/vendor/github.com/attic-labs/graphql/rules_known_type_names_test.go similarity index 92% rename from vendor/github.com/graphql-go/graphql/rules_known_type_names_test.go rename to vendor/github.com/attic-labs/graphql/rules_known_type_names_test.go index eec9a0aeeb..111f5cf4ff 100644 --- a/vendor/github.com/graphql-go/graphql/rules_known_type_names_test.go +++ b/vendor/github.com/attic-labs/graphql/rules_known_type_names_test.go @@ -3,9 +3,9 @@ package graphql_test import ( "testing" - "github.com/graphql-go/graphql" - "github.com/graphql-go/graphql/gqlerrors" - "github.com/graphql-go/graphql/testutil" + "github.com/attic-labs/graphql" + "github.com/attic-labs/graphql/gqlerrors" + "github.com/attic-labs/graphql/testutil" ) func TestValidate_KnownTypeNames_KnownTypeNamesAreValid(t *testing.T) { diff --git a/vendor/github.com/graphql-go/graphql/rules_lone_anonymous_operation_rule_test.go b/vendor/github.com/attic-labs/graphql/rules_lone_anonymous_operation_rule_test.go similarity index 94% rename from vendor/github.com/graphql-go/graphql/rules_lone_anonymous_operation_rule_test.go rename to vendor/github.com/attic-labs/graphql/rules_lone_anonymous_operation_rule_test.go index 8fb6894f66..7dfadc5bda 100644 --- a/vendor/github.com/graphql-go/graphql/rules_lone_anonymous_operation_rule_test.go +++ b/vendor/github.com/attic-labs/graphql/rules_lone_anonymous_operation_rule_test.go @@ -3,9 +3,9 @@ package graphql_test import ( "testing" - "github.com/graphql-go/graphql" - "github.com/graphql-go/graphql/gqlerrors" - "github.com/graphql-go/graphql/testutil" + "github.com/attic-labs/graphql" + "github.com/attic-labs/graphql/gqlerrors" + "github.com/attic-labs/graphql/testutil" ) func TestValidate_AnonymousOperationMustBeAlone_NoOperations(t *testing.T) { diff --git a/vendor/github.com/graphql-go/graphql/rules_no_fragment_cycles_test.go b/vendor/github.com/attic-labs/graphql/rules_no_fragment_cycles_test.go similarity index 98% rename from vendor/github.com/graphql-go/graphql/rules_no_fragment_cycles_test.go rename to vendor/github.com/attic-labs/graphql/rules_no_fragment_cycles_test.go index f194e30555..f7d3ba7904 100644 --- a/vendor/github.com/graphql-go/graphql/rules_no_fragment_cycles_test.go +++ b/vendor/github.com/attic-labs/graphql/rules_no_fragment_cycles_test.go @@ -3,9 +3,9 @@ package graphql_test import ( "testing" - "github.com/graphql-go/graphql" - "github.com/graphql-go/graphql/gqlerrors" - "github.com/graphql-go/graphql/testutil" + "github.com/attic-labs/graphql" + "github.com/attic-labs/graphql/gqlerrors" + "github.com/attic-labs/graphql/testutil" ) func TestValidate_NoCircularFragmentSpreads_SingleReferenceIsValid(t *testing.T) { diff --git a/vendor/github.com/graphql-go/graphql/rules_no_undefined_variables_test.go b/vendor/github.com/attic-labs/graphql/rules_no_undefined_variables_test.go similarity index 98% rename from vendor/github.com/graphql-go/graphql/rules_no_undefined_variables_test.go rename to vendor/github.com/attic-labs/graphql/rules_no_undefined_variables_test.go index 0b2537159c..3697fe53f0 100644 --- a/vendor/github.com/graphql-go/graphql/rules_no_undefined_variables_test.go +++ b/vendor/github.com/attic-labs/graphql/rules_no_undefined_variables_test.go @@ -3,9 +3,9 @@ package graphql_test import ( "testing" - "github.com/graphql-go/graphql" - "github.com/graphql-go/graphql/gqlerrors" - "github.com/graphql-go/graphql/testutil" + "github.com/attic-labs/graphql" + "github.com/attic-labs/graphql/gqlerrors" + "github.com/attic-labs/graphql/testutil" ) func TestValidate_NoUndefinedVariables_AllVariablesDefined(t *testing.T) { diff --git a/vendor/github.com/graphql-go/graphql/rules_no_unused_fragments_test.go b/vendor/github.com/attic-labs/graphql/rules_no_unused_fragments_test.go similarity index 96% rename from vendor/github.com/graphql-go/graphql/rules_no_unused_fragments_test.go rename to vendor/github.com/attic-labs/graphql/rules_no_unused_fragments_test.go index 47f70ad314..8a2fbe7460 100644 --- a/vendor/github.com/graphql-go/graphql/rules_no_unused_fragments_test.go +++ b/vendor/github.com/attic-labs/graphql/rules_no_unused_fragments_test.go @@ -3,9 +3,9 @@ package graphql_test import ( "testing" - "github.com/graphql-go/graphql" - "github.com/graphql-go/graphql/gqlerrors" - "github.com/graphql-go/graphql/testutil" + "github.com/attic-labs/graphql" + "github.com/attic-labs/graphql/gqlerrors" + "github.com/attic-labs/graphql/testutil" ) func TestValidate_NoUnusedFragments_AllFragmentNamesAreUsed(t *testing.T) { diff --git a/vendor/github.com/graphql-go/graphql/rules_no_unused_variables_test.go b/vendor/github.com/attic-labs/graphql/rules_no_unused_variables_test.go similarity index 97% rename from vendor/github.com/graphql-go/graphql/rules_no_unused_variables_test.go rename to vendor/github.com/attic-labs/graphql/rules_no_unused_variables_test.go index 7c331f4a4f..6794939000 100644 --- a/vendor/github.com/graphql-go/graphql/rules_no_unused_variables_test.go +++ b/vendor/github.com/attic-labs/graphql/rules_no_unused_variables_test.go @@ -3,9 +3,9 @@ package graphql_test import ( "testing" - "github.com/graphql-go/graphql" - "github.com/graphql-go/graphql/gqlerrors" - "github.com/graphql-go/graphql/testutil" + "github.com/attic-labs/graphql" + "github.com/attic-labs/graphql/gqlerrors" + "github.com/attic-labs/graphql/testutil" ) func TestValidate_NoUnusedVariables_UsesAllVariables(t *testing.T) { diff --git a/vendor/github.com/graphql-go/graphql/rules_overlapping_fields_can_be_merged_test.go b/vendor/github.com/attic-labs/graphql/rules_overlapping_fields_can_be_merged_test.go similarity index 99% rename from vendor/github.com/graphql-go/graphql/rules_overlapping_fields_can_be_merged_test.go rename to vendor/github.com/attic-labs/graphql/rules_overlapping_fields_can_be_merged_test.go index b38b13a165..37d6a18513 100644 --- a/vendor/github.com/graphql-go/graphql/rules_overlapping_fields_can_be_merged_test.go +++ b/vendor/github.com/attic-labs/graphql/rules_overlapping_fields_can_be_merged_test.go @@ -3,9 +3,9 @@ package graphql_test import ( "testing" - "github.com/graphql-go/graphql" - "github.com/graphql-go/graphql/gqlerrors" - "github.com/graphql-go/graphql/testutil" + "github.com/attic-labs/graphql" + "github.com/attic-labs/graphql/gqlerrors" + "github.com/attic-labs/graphql/testutil" ) func TestValidate_OverlappingFieldsCanBeMerged_UniqueFields(t *testing.T) { diff --git a/vendor/github.com/graphql-go/graphql/rules_possible_fragment_spreads_test.go b/vendor/github.com/attic-labs/graphql/rules_possible_fragment_spreads_test.go similarity index 98% rename from vendor/github.com/graphql-go/graphql/rules_possible_fragment_spreads_test.go rename to vendor/github.com/attic-labs/graphql/rules_possible_fragment_spreads_test.go index 9c0dff5452..ab1884580f 100644 --- a/vendor/github.com/graphql-go/graphql/rules_possible_fragment_spreads_test.go +++ b/vendor/github.com/attic-labs/graphql/rules_possible_fragment_spreads_test.go @@ -3,9 +3,9 @@ package graphql_test import ( "testing" - "github.com/graphql-go/graphql" - "github.com/graphql-go/graphql/gqlerrors" - "github.com/graphql-go/graphql/testutil" + "github.com/attic-labs/graphql" + "github.com/attic-labs/graphql/gqlerrors" + "github.com/attic-labs/graphql/testutil" ) func TestValidate_PossibleFragmentSpreads_OfTheSameObject(t *testing.T) { diff --git a/vendor/github.com/graphql-go/graphql/rules_provided_non_null_arguments_test.go b/vendor/github.com/attic-labs/graphql/rules_provided_non_null_arguments_test.go similarity index 97% rename from vendor/github.com/graphql-go/graphql/rules_provided_non_null_arguments_test.go rename to vendor/github.com/attic-labs/graphql/rules_provided_non_null_arguments_test.go index fed6c0088d..fa20bb6864 100644 --- a/vendor/github.com/graphql-go/graphql/rules_provided_non_null_arguments_test.go +++ b/vendor/github.com/attic-labs/graphql/rules_provided_non_null_arguments_test.go @@ -3,9 +3,9 @@ package graphql_test import ( "testing" - "github.com/graphql-go/graphql" - "github.com/graphql-go/graphql/gqlerrors" - "github.com/graphql-go/graphql/testutil" + "github.com/attic-labs/graphql" + "github.com/attic-labs/graphql/gqlerrors" + "github.com/attic-labs/graphql/testutil" ) func TestValidate_ProvidedNonNullArguments_IgnoresUnknownArguments(t *testing.T) { diff --git a/vendor/github.com/graphql-go/graphql/rules_scalar_leafs_test.go b/vendor/github.com/attic-labs/graphql/rules_scalar_leafs_test.go similarity index 96% rename from vendor/github.com/graphql-go/graphql/rules_scalar_leafs_test.go rename to vendor/github.com/attic-labs/graphql/rules_scalar_leafs_test.go index 0972995244..34d65dfad0 100644 --- a/vendor/github.com/graphql-go/graphql/rules_scalar_leafs_test.go +++ b/vendor/github.com/attic-labs/graphql/rules_scalar_leafs_test.go @@ -3,9 +3,9 @@ package graphql_test import ( "testing" - "github.com/graphql-go/graphql" - "github.com/graphql-go/graphql/gqlerrors" - "github.com/graphql-go/graphql/testutil" + "github.com/attic-labs/graphql" + "github.com/attic-labs/graphql/gqlerrors" + "github.com/attic-labs/graphql/testutil" ) func TestValidate_ScalarLeafs_ValidScalarSelection(t *testing.T) { diff --git a/vendor/github.com/graphql-go/graphql/rules_unique_argument_names_test.go b/vendor/github.com/attic-labs/graphql/rules_unique_argument_names_test.go similarity index 96% rename from vendor/github.com/graphql-go/graphql/rules_unique_argument_names_test.go rename to vendor/github.com/attic-labs/graphql/rules_unique_argument_names_test.go index b0e3ec5173..df757bf3ba 100644 --- a/vendor/github.com/graphql-go/graphql/rules_unique_argument_names_test.go +++ b/vendor/github.com/attic-labs/graphql/rules_unique_argument_names_test.go @@ -3,9 +3,9 @@ package graphql_test import ( "testing" - "github.com/graphql-go/graphql" - "github.com/graphql-go/graphql/gqlerrors" - "github.com/graphql-go/graphql/testutil" + "github.com/attic-labs/graphql" + "github.com/attic-labs/graphql/gqlerrors" + "github.com/attic-labs/graphql/testutil" ) func TestValidate_UniqueArgumentNames_NoArgumentsOnField(t *testing.T) { diff --git a/vendor/github.com/graphql-go/graphql/rules_unique_fragment_names_test.go b/vendor/github.com/attic-labs/graphql/rules_unique_fragment_names_test.go similarity index 94% rename from vendor/github.com/graphql-go/graphql/rules_unique_fragment_names_test.go rename to vendor/github.com/attic-labs/graphql/rules_unique_fragment_names_test.go index 5cacd5e9e8..4c4c975c27 100644 --- a/vendor/github.com/graphql-go/graphql/rules_unique_fragment_names_test.go +++ b/vendor/github.com/attic-labs/graphql/rules_unique_fragment_names_test.go @@ -3,9 +3,9 @@ package graphql_test import ( "testing" - "github.com/graphql-go/graphql" - "github.com/graphql-go/graphql/gqlerrors" - "github.com/graphql-go/graphql/testutil" + "github.com/attic-labs/graphql" + "github.com/attic-labs/graphql/gqlerrors" + "github.com/attic-labs/graphql/testutil" ) func TestValidate_UniqueFragmentNames_NoFragments(t *testing.T) { diff --git a/vendor/github.com/graphql-go/graphql/rules_unique_input_field_names_test.go b/vendor/github.com/attic-labs/graphql/rules_unique_input_field_names_test.go similarity index 93% rename from vendor/github.com/graphql-go/graphql/rules_unique_input_field_names_test.go rename to vendor/github.com/attic-labs/graphql/rules_unique_input_field_names_test.go index a2e2e251ff..4452dde8fc 100644 --- a/vendor/github.com/graphql-go/graphql/rules_unique_input_field_names_test.go +++ b/vendor/github.com/attic-labs/graphql/rules_unique_input_field_names_test.go @@ -3,9 +3,9 @@ package graphql_test import ( "testing" - "github.com/graphql-go/graphql" - "github.com/graphql-go/graphql/gqlerrors" - "github.com/graphql-go/graphql/testutil" + "github.com/attic-labs/graphql" + "github.com/attic-labs/graphql/gqlerrors" + "github.com/attic-labs/graphql/testutil" ) func TestValidate_UniqueInputFieldNames_InputObjectWithFields(t *testing.T) { diff --git a/vendor/github.com/graphql-go/graphql/rules_unique_operation_names_test.go b/vendor/github.com/attic-labs/graphql/rules_unique_operation_names_test.go similarity index 95% rename from vendor/github.com/graphql-go/graphql/rules_unique_operation_names_test.go rename to vendor/github.com/attic-labs/graphql/rules_unique_operation_names_test.go index 8903cdcb96..0ffee24556 100644 --- a/vendor/github.com/graphql-go/graphql/rules_unique_operation_names_test.go +++ b/vendor/github.com/attic-labs/graphql/rules_unique_operation_names_test.go @@ -3,9 +3,9 @@ package graphql_test import ( "testing" - "github.com/graphql-go/graphql" - "github.com/graphql-go/graphql/gqlerrors" - "github.com/graphql-go/graphql/testutil" + "github.com/attic-labs/graphql" + "github.com/attic-labs/graphql/gqlerrors" + "github.com/attic-labs/graphql/testutil" ) func TestValidate_UniqueOperationNames_NoOperations(t *testing.T) { diff --git a/vendor/github.com/graphql-go/graphql/rules_unique_variable_names_test.go b/vendor/github.com/attic-labs/graphql/rules_unique_variable_names_test.go similarity index 89% rename from vendor/github.com/graphql-go/graphql/rules_unique_variable_names_test.go rename to vendor/github.com/attic-labs/graphql/rules_unique_variable_names_test.go index 63bf777853..a7b6109dc9 100644 --- a/vendor/github.com/graphql-go/graphql/rules_unique_variable_names_test.go +++ b/vendor/github.com/attic-labs/graphql/rules_unique_variable_names_test.go @@ -3,9 +3,9 @@ package graphql_test import ( "testing" - "github.com/graphql-go/graphql" - "github.com/graphql-go/graphql/gqlerrors" - "github.com/graphql-go/graphql/testutil" + "github.com/attic-labs/graphql" + "github.com/attic-labs/graphql/gqlerrors" + "github.com/attic-labs/graphql/testutil" ) func TestValidate_UniqueVariableNames_UniqueVariableNames(t *testing.T) { diff --git a/vendor/github.com/graphql-go/graphql/rules_variables_are_input_types_test.go b/vendor/github.com/attic-labs/graphql/rules_variables_are_input_types_test.go similarity index 87% rename from vendor/github.com/graphql-go/graphql/rules_variables_are_input_types_test.go rename to vendor/github.com/attic-labs/graphql/rules_variables_are_input_types_test.go index fb1d16757b..5fecc99947 100644 --- a/vendor/github.com/graphql-go/graphql/rules_variables_are_input_types_test.go +++ b/vendor/github.com/attic-labs/graphql/rules_variables_are_input_types_test.go @@ -3,9 +3,9 @@ package graphql_test import ( "testing" - "github.com/graphql-go/graphql" - "github.com/graphql-go/graphql/gqlerrors" - "github.com/graphql-go/graphql/testutil" + "github.com/attic-labs/graphql" + "github.com/attic-labs/graphql/gqlerrors" + "github.com/attic-labs/graphql/testutil" ) func TestValidate_VariablesAreInputTypes_(t *testing.T) { diff --git a/vendor/github.com/graphql-go/graphql/rules_variables_in_allowed_position_test.go b/vendor/github.com/attic-labs/graphql/rules_variables_in_allowed_position_test.go similarity index 98% rename from vendor/github.com/graphql-go/graphql/rules_variables_in_allowed_position_test.go rename to vendor/github.com/attic-labs/graphql/rules_variables_in_allowed_position_test.go index 78dd77ea06..4ece215769 100644 --- a/vendor/github.com/graphql-go/graphql/rules_variables_in_allowed_position_test.go +++ b/vendor/github.com/attic-labs/graphql/rules_variables_in_allowed_position_test.go @@ -3,9 +3,9 @@ package graphql_test import ( "testing" - "github.com/graphql-go/graphql" - "github.com/graphql-go/graphql/gqlerrors" - "github.com/graphql-go/graphql/testutil" + "github.com/attic-labs/graphql" + "github.com/attic-labs/graphql/gqlerrors" + "github.com/attic-labs/graphql/testutil" ) func TestValidate_VariablesInAllowedPosition_BooleanToBoolean(t *testing.T) { diff --git a/vendor/github.com/graphql-go/graphql/scalars.go b/vendor/github.com/attic-labs/graphql/scalars.go similarity index 99% rename from vendor/github.com/graphql-go/graphql/scalars.go rename to vendor/github.com/attic-labs/graphql/scalars.go index c72da612df..fbb360dfda 100644 --- a/vendor/github.com/graphql-go/graphql/scalars.go +++ b/vendor/github.com/attic-labs/graphql/scalars.go @@ -5,7 +5,7 @@ import ( "math" "strconv" - "github.com/graphql-go/graphql/language/ast" + "github.com/attic-labs/graphql/language/ast" ) // As per the GraphQL Spec, Integers are only treated as valid when a valid diff --git a/vendor/github.com/graphql-go/graphql/scalars_serialization_test.go b/vendor/github.com/attic-labs/graphql/scalars_serialization_test.go similarity index 99% rename from vendor/github.com/graphql-go/graphql/scalars_serialization_test.go rename to vendor/github.com/attic-labs/graphql/scalars_serialization_test.go index 24d4d1da09..cb90bcc5b3 100644 --- a/vendor/github.com/graphql-go/graphql/scalars_serialization_test.go +++ b/vendor/github.com/attic-labs/graphql/scalars_serialization_test.go @@ -5,7 +5,7 @@ import ( "reflect" "testing" - "github.com/graphql-go/graphql" + "github.com/attic-labs/graphql" ) type intSerializationTest struct { diff --git a/vendor/github.com/graphql-go/graphql/schema-kitchen-sink.graphql b/vendor/github.com/attic-labs/graphql/schema-kitchen-sink.graphql similarity index 100% rename from vendor/github.com/graphql-go/graphql/schema-kitchen-sink.graphql rename to vendor/github.com/attic-labs/graphql/schema-kitchen-sink.graphql diff --git a/vendor/github.com/graphql-go/graphql/schema.go b/vendor/github.com/attic-labs/graphql/schema.go similarity index 100% rename from vendor/github.com/graphql-go/graphql/schema.go rename to vendor/github.com/attic-labs/graphql/schema.go diff --git a/vendor/github.com/graphql-go/graphql/testutil/introspection_query.go b/vendor/github.com/attic-labs/graphql/testutil/introspection_query.go similarity index 100% rename from vendor/github.com/graphql-go/graphql/testutil/introspection_query.go rename to vendor/github.com/attic-labs/graphql/testutil/introspection_query.go diff --git a/vendor/github.com/graphql-go/graphql/testutil/rules_test_harness.go b/vendor/github.com/attic-labs/graphql/testutil/rules_test_harness.go similarity index 98% rename from vendor/github.com/graphql-go/graphql/testutil/rules_test_harness.go rename to vendor/github.com/attic-labs/graphql/testutil/rules_test_harness.go index 809a1effd2..f1935c2c3b 100644 --- a/vendor/github.com/graphql-go/graphql/testutil/rules_test_harness.go +++ b/vendor/github.com/attic-labs/graphql/testutil/rules_test_harness.go @@ -3,11 +3,11 @@ package testutil import ( "testing" - "github.com/graphql-go/graphql" - "github.com/graphql-go/graphql/gqlerrors" - "github.com/graphql-go/graphql/language/location" - "github.com/graphql-go/graphql/language/parser" - "github.com/graphql-go/graphql/language/source" + "github.com/attic-labs/graphql" + "github.com/attic-labs/graphql/gqlerrors" + "github.com/attic-labs/graphql/language/location" + "github.com/attic-labs/graphql/language/parser" + "github.com/attic-labs/graphql/language/source" "reflect" ) diff --git a/vendor/github.com/graphql-go/graphql/testutil/testutil.go b/vendor/github.com/attic-labs/graphql/testutil/testutil.go similarity index 98% rename from vendor/github.com/graphql-go/graphql/testutil/testutil.go rename to vendor/github.com/attic-labs/graphql/testutil/testutil.go index 0a5ccc8792..071fd6e331 100644 --- a/vendor/github.com/graphql-go/graphql/testutil/testutil.go +++ b/vendor/github.com/attic-labs/graphql/testutil/testutil.go @@ -6,9 +6,9 @@ import ( "strconv" "testing" - "github.com/graphql-go/graphql" - "github.com/graphql-go/graphql/language/ast" - "github.com/graphql-go/graphql/language/parser" + "github.com/attic-labs/graphql" + "github.com/attic-labs/graphql/language/ast" + "github.com/attic-labs/graphql/language/parser" "github.com/kr/pretty" ) diff --git a/vendor/github.com/graphql-go/graphql/testutil/testutil_test.go b/vendor/github.com/attic-labs/graphql/testutil/testutil_test.go similarity index 99% rename from vendor/github.com/graphql-go/graphql/testutil/testutil_test.go rename to vendor/github.com/attic-labs/graphql/testutil/testutil_test.go index ca61eec73e..5573cfed0e 100644 --- a/vendor/github.com/graphql-go/graphql/testutil/testutil_test.go +++ b/vendor/github.com/attic-labs/graphql/testutil/testutil_test.go @@ -3,7 +3,7 @@ package testutil_test import ( "testing" - "github.com/graphql-go/graphql/testutil" + "github.com/attic-labs/graphql/testutil" ) func TestSubsetSlice_Simple(t *testing.T) { diff --git a/vendor/github.com/graphql-go/graphql/type_comparators_test.go b/vendor/github.com/attic-labs/graphql/type_comparators_test.go similarity index 100% rename from vendor/github.com/graphql-go/graphql/type_comparators_test.go rename to vendor/github.com/attic-labs/graphql/type_comparators_test.go diff --git a/vendor/github.com/graphql-go/graphql/type_info.go b/vendor/github.com/attic-labs/graphql/type_info.go similarity index 98% rename from vendor/github.com/graphql-go/graphql/type_info.go rename to vendor/github.com/attic-labs/graphql/type_info.go index 39838295ac..b7967e77a9 100644 --- a/vendor/github.com/graphql-go/graphql/type_info.go +++ b/vendor/github.com/attic-labs/graphql/type_info.go @@ -1,8 +1,8 @@ package graphql import ( - "github.com/graphql-go/graphql/language/ast" - "github.com/graphql-go/graphql/language/kinds" + "github.com/attic-labs/graphql/language/ast" + "github.com/attic-labs/graphql/language/kinds" ) // TODO: can move TypeInfo to a utils package if there ever is one diff --git a/vendor/github.com/graphql-go/graphql/types.go b/vendor/github.com/attic-labs/graphql/types.go similarity index 85% rename from vendor/github.com/graphql-go/graphql/types.go rename to vendor/github.com/attic-labs/graphql/types.go index 9bbe52e432..4eeb623dde 100644 --- a/vendor/github.com/graphql-go/graphql/types.go +++ b/vendor/github.com/attic-labs/graphql/types.go @@ -1,7 +1,7 @@ package graphql import ( - "github.com/graphql-go/graphql/gqlerrors" + "github.com/attic-labs/graphql/gqlerrors" ) // type Schema interface{} diff --git a/vendor/github.com/graphql-go/graphql/union_interface_test.go b/vendor/github.com/attic-labs/graphql/union_interface_test.go similarity index 99% rename from vendor/github.com/graphql-go/graphql/union_interface_test.go rename to vendor/github.com/attic-labs/graphql/union_interface_test.go index d4cc151b18..74f7087f89 100644 --- a/vendor/github.com/graphql-go/graphql/union_interface_test.go +++ b/vendor/github.com/attic-labs/graphql/union_interface_test.go @@ -4,8 +4,8 @@ import ( "reflect" "testing" - "github.com/graphql-go/graphql" - "github.com/graphql-go/graphql/testutil" + "github.com/attic-labs/graphql" + "github.com/attic-labs/graphql/testutil" "golang.org/x/net/context" ) diff --git a/vendor/github.com/graphql-go/graphql/validation_test.go b/vendor/github.com/attic-labs/graphql/validation_test.go similarity index 99% rename from vendor/github.com/graphql-go/graphql/validation_test.go rename to vendor/github.com/attic-labs/graphql/validation_test.go index 6c8fc5214f..9da07fb0d8 100644 --- a/vendor/github.com/graphql-go/graphql/validation_test.go +++ b/vendor/github.com/attic-labs/graphql/validation_test.go @@ -3,8 +3,8 @@ package graphql_test import ( "testing" - "github.com/graphql-go/graphql" - "github.com/graphql-go/graphql/language/ast" + "github.com/attic-labs/graphql" + "github.com/attic-labs/graphql/language/ast" ) var someScalarType = graphql.NewScalar(graphql.ScalarConfig{ diff --git a/vendor/github.com/graphql-go/graphql/validator.go b/vendor/github.com/attic-labs/graphql/validator.go similarity index 97% rename from vendor/github.com/graphql-go/graphql/validator.go rename to vendor/github.com/attic-labs/graphql/validator.go index 7baf109f7b..3a7fa6e7be 100644 --- a/vendor/github.com/graphql-go/graphql/validator.go +++ b/vendor/github.com/attic-labs/graphql/validator.go @@ -1,10 +1,10 @@ package graphql import ( - "github.com/graphql-go/graphql/gqlerrors" - "github.com/graphql-go/graphql/language/ast" - "github.com/graphql-go/graphql/language/kinds" - "github.com/graphql-go/graphql/language/visitor" + "github.com/attic-labs/graphql/gqlerrors" + "github.com/attic-labs/graphql/language/ast" + "github.com/attic-labs/graphql/language/kinds" + "github.com/attic-labs/graphql/language/visitor" ) type ValidationResult struct { diff --git a/vendor/github.com/graphql-go/graphql/validator_test.go b/vendor/github.com/attic-labs/graphql/validator_test.go similarity index 87% rename from vendor/github.com/graphql-go/graphql/validator_test.go rename to vendor/github.com/attic-labs/graphql/validator_test.go index 67b7a3ddc9..7bdbc01b6e 100644 --- a/vendor/github.com/graphql-go/graphql/validator_test.go +++ b/vendor/github.com/attic-labs/graphql/validator_test.go @@ -3,13 +3,13 @@ package graphql_test import ( "testing" - "github.com/graphql-go/graphql" - "github.com/graphql-go/graphql/gqlerrors" - "github.com/graphql-go/graphql/language/ast" - "github.com/graphql-go/graphql/language/location" - "github.com/graphql-go/graphql/language/parser" - "github.com/graphql-go/graphql/language/source" - "github.com/graphql-go/graphql/testutil" + "github.com/attic-labs/graphql" + "github.com/attic-labs/graphql/gqlerrors" + "github.com/attic-labs/graphql/language/ast" + "github.com/attic-labs/graphql/language/location" + "github.com/attic-labs/graphql/language/parser" + "github.com/attic-labs/graphql/language/source" + "github.com/attic-labs/graphql/testutil" "reflect" ) diff --git a/vendor/github.com/graphql-go/graphql/values.go b/vendor/github.com/attic-labs/graphql/values.go similarity index 97% rename from vendor/github.com/graphql-go/graphql/values.go rename to vendor/github.com/attic-labs/graphql/values.go index ac4209cd1d..2966037d4e 100644 --- a/vendor/github.com/graphql-go/graphql/values.go +++ b/vendor/github.com/attic-labs/graphql/values.go @@ -7,12 +7,11 @@ import ( "reflect" "strings" + "github.com/attic-labs/graphql/gqlerrors" + "github.com/attic-labs/graphql/language/ast" + "github.com/attic-labs/graphql/language/kinds" + "github.com/attic-labs/graphql/language/printer" "sort" - - "github.com/graphql-go/graphql/gqlerrors" - "github.com/graphql-go/graphql/language/ast" - "github.com/graphql-go/graphql/language/kinds" - "github.com/graphql-go/graphql/language/printer" ) // Prepares an object map of variableValues of the correct type based on the @@ -211,6 +210,9 @@ func typeFromAST(schema Schema, inputTypeAST ast.Type) (Type, error) { nameValue = inputTypeAST.Name.Value } ttype := schema.Type(nameValue) + if ttype == nil { + return nil, fmt.Errorf("Type %s not found", nameValue) + } return ttype, nil default: return nil, invariant(inputTypeAST.GetKind() == kinds.Named, "Must be a named type.") diff --git a/vendor/github.com/graphql-go/graphql/variables_test.go b/vendor/github.com/attic-labs/graphql/variables_test.go similarity index 99% rename from vendor/github.com/graphql-go/graphql/variables_test.go rename to vendor/github.com/attic-labs/graphql/variables_test.go index ff815f0c2d..86a559d66f 100644 --- a/vendor/github.com/graphql-go/graphql/variables_test.go +++ b/vendor/github.com/attic-labs/graphql/variables_test.go @@ -5,11 +5,11 @@ import ( "reflect" "testing" - "github.com/graphql-go/graphql" - "github.com/graphql-go/graphql/gqlerrors" - "github.com/graphql-go/graphql/language/ast" - "github.com/graphql-go/graphql/language/location" - "github.com/graphql-go/graphql/testutil" + "github.com/attic-labs/graphql" + "github.com/attic-labs/graphql/gqlerrors" + "github.com/attic-labs/graphql/language/ast" + "github.com/attic-labs/graphql/language/location" + "github.com/attic-labs/graphql/testutil" ) var testComplexScalar *graphql.Scalar = graphql.NewScalar(graphql.ScalarConfig{