Boolean represents true or false values.
type Boolean bool
func NewBoolean(v Boolean) *Boolean
NewBoolean is a helper to make a new *Boolean.
Client is a GraphQL client.
type Client struct {
// contains filtered or unexported fields
}
func NewClient(url string, httpClient *http.Client) *Client
NewClient creates a GraphQL client targeting the specified GraphQL server URL. If httpClient is nil, then http.DefaultClient is used.
func (c *Client) Mutate(ctx context.Context, m interface{}, variables map[string]interface{}) error
Mutate executes a single GraphQL mutation request, with a mutation derived from m, populating the response into it. m should be a pointer to struct that corresponds to the GraphQL schema.
func (c *Client) Query(ctx context.Context, q interface{}, variables map[string]interface{}) error
Query executes a single GraphQL query request, with a query derived from q, populating the response into it. q should be a pointer to struct that corresponds to the GraphQL schema.
Float represents signed double-precision fractional values as specified by IEEE 754.
type Float float64
func NewFloat(v Float) *Float
NewFloat is a helper to make a new *Float.
ID represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as "VXNlci0xMA==") or integer (such as 4) input value will be accepted as an ID.
type ID interface{}
func NewID(v ID) *ID
NewID is a helper to make a new *ID.
Int represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.
type Int int32
func NewInt(v Int) *Int
NewInt is a helper to make a new *Int.
String represents textual data as UTF-8 character sequences. This type is most often used by GraphQL to represent free-form human-readable text.
type String string
func NewString(v String) *String
NewString is a helper to make a new *String.
Name | Synopsis |
---|---|
.. | |
example | |
graphqldev | graphqldev is a test program currently being used for developing graphql package. |
ident | Package ident provides functions for parsing and converting identifier names between various naming convention. |