Documentation ¶
Overview ¶
Package graphql contains a graphql client which talks to a MongoDB Realm GraphQL Server
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a Realm GraphQL Client with authentication to a Realm Application. The Realm GraphQL Server URI is stored in uri
func NewClient ¶
func NewClient(opts *options.ClientOptions) (*Client, error)
NewClient creates a new Client
func (*Client) Health ¶
Health needs to be implemented on the GraphQL Server as it looks for a very specific schema/document.
type Error ¶
type Error struct { Message string `json:"message,omitempty"` Path PathSegment `json:"path,omitempty"` Locations []Location `json:"locations,omitempty"` Extensions map[string]interface{} `json:"extensions,omitempty"` }
Error is a GraphQL Error as per http://spec.graphql.org/June2018/#sec-Errors
type HealthCheck ¶
HealthCheck Query for Realm Config Verification
type Location ¶
Location returned when the response had an error. Each location is a map with the keys line and column, both positive numbers starting from 1 which describe the beginning of an associated syntax element
type PathSegment ¶
type PathSegment struct {
// contains filtered or unexported fields
}
PathSegment returned when the response had an error. Path segments that represent fields should be strings, and path segments that represent list indices should be 0‐indexed integers. If the error happens in an aliased field, the path to the error should use the aliased name, since it represents a path in the response, not in the query.
type Request ¶
type Request struct { Query string `json:"query" graphql:"query"` Variables Variable `json:"variables" graphql:"variables"` OperationName *string `json:"operationName" graphql:"operationName"` }
Request is the payload for GraphQL