aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/github.com/graphql-go/graphql/gqlerrors/located.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/graphql-go/graphql/gqlerrors/located.go')
-rw-r--r--vendor/github.com/graphql-go/graphql/gqlerrors/located.go39
1 files changed, 0 insertions, 39 deletions
diff --git a/vendor/github.com/graphql-go/graphql/gqlerrors/located.go b/vendor/github.com/graphql-go/graphql/gqlerrors/located.go
deleted file mode 100644
index b02fcd8a..00000000
--- a/vendor/github.com/graphql-go/graphql/gqlerrors/located.go
+++ /dev/null
@@ -1,39 +0,0 @@
-package gqlerrors
-
-import (
- "errors"
- "github.com/graphql-go/graphql/language/ast"
-)
-
-// NewLocatedError creates a graphql.Error with location info
-// @deprecated 0.4.18
-// Already exists in `graphql.NewLocatedError()`
-func NewLocatedError(err interface{}, nodes []ast.Node) *Error {
- var origError error
- message := "An unknown error occurred."
- if err, ok := err.(error); ok {
- message = err.Error()
- origError = err
- }
- if err, ok := err.(string); ok {
- message = err
- origError = errors.New(err)
- }
- stack := message
- return NewError(
- message,
- nodes,
- stack,
- nil,
- []int{},
- origError,
- )
-}
-
-func FieldASTsToNodeASTs(fieldASTs []*ast.Field) []ast.Node {
- nodes := []ast.Node{}
- for _, fieldAST := range fieldASTs {
- nodes = append(nodes, fieldAST)
- }
- return nodes
-}