aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/github.com/graphql-go/graphql/types.go
blob: 8bd1fa68a90960da0b77ae2046bf10a5279990ec (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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
}