Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildGraphQLArray ¶
BuildGraphQLArray builds a GraphQL array for including in queries or mutations.
func BuildGraphQLEnumArray ¶
func BuildGraphQLEnumArray(v interface{}) string
BuildGraphQLEnumArray creates an array for values which can be represented as enums in GraphQL, i.e. do not need to be surrounded by strings.
func MarshalGQL ¶
func MarshalGQL(v interface{}) string
MarshalGQL returns the GraphQL representation of v.
Types ¶
type DefaultClient ¶
type DefaultClient struct {
// contains filtered or unexported fields
}
func (*DefaultClient) URL ¶
func (client *DefaultClient) URL() string
type Error ¶
type Error struct { Message string `json:"message"` Locations []struct { Line int `json:"line"` Column int `json:"column"` } `json:"locations"` }
Error is an error returned from the database for a GraphQL query.
type Marshaller ¶
type Marshaller interface {
GQL() string
}
Marshaller defines an ability for a type to represent itself in GraphQL.
type Request ¶
type Request struct { Query string `json:"query"` OperationName string `json:"operationName,omitempty"` Variables map[string]interface{} `json:"variables,omitempty"` // Response should be a pointer to a struct to deserialize // the JSON response into. Response interface{} `json:"-"` // URL, if different than client URL (e.g. /graphql) URL string `json:"-"` }
Request holds the parameters for a GraphQL query. Query must be included.
Click to show internal directories.
Click to hide internal directories.