diff options
author | Michael Muré <batolettre@gmail.com> | 2018-07-19 14:15:50 +0200 |
---|---|---|
committer | Michael Muré <batolettre@gmail.com> | 2018-07-19 14:15:50 +0200 |
commit | a2a50f3de0c428c5a61e6a449191be3c4ded86ac (patch) | |
tree | 5ecf4f5f1f26933b42a606b741963fa5f66c85aa /vendor/github.com/graphql-go/graphql/types.go | |
parent | 25fb88d7497b00bbe3dda540efde22ffd3de6e49 (diff) | |
download | git-bug-a2a50f3de0c428c5a61e6a449191be3c4ded86ac.tar.gz |
webui: add a primitive graphql handler
Diffstat (limited to 'vendor/github.com/graphql-go/graphql/types.go')
-rw-r--r-- | vendor/github.com/graphql-go/graphql/types.go | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/vendor/github.com/graphql-go/graphql/types.go b/vendor/github.com/graphql-go/graphql/types.go new file mode 100644 index 00000000..8bd1fa68 --- /dev/null +++ b/vendor/github.com/graphql-go/graphql/types.go @@ -0,0 +1,16 @@ +package graphql + +import ( + "github.com/graphql-go/graphql/gqlerrors" +) + +// type Schema interface{} + +type Result struct { + Data interface{} `json:"data"` + Errors []gqlerrors.FormattedError `json:"errors,omitempty"` +} + +func (r *Result) HasErrors() bool { + return len(r.Errors) > 0 +} |