From a2a50f3de0c428c5a61e6a449191be3c4ded86ac Mon Sep 17 00:00:00 2001 From: Michael Muré Date: Thu, 19 Jul 2018 14:15:50 +0200 Subject: webui: add a primitive graphql handler --- vendor/github.com/graphql-go/graphql/types.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 vendor/github.com/graphql-go/graphql/types.go (limited to 'vendor/github.com/graphql-go/graphql/types.go') 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 +} -- cgit