Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewHTTPClient ¶
func NewHTTPClient(opts ...ClientOption) *http.Client
NewHTTPClient creates a new authenticated http.Client.
func ResetClient ¶
func ResetClient()
ResetClient resets the shared client instance. This is primarily for testing. Warning: This function is not thread-safe and should only be used in test cleanup.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a GraphQL client.
func NewClient ¶
func NewClient(opts ...ClientOption) *Client
NewClient creates a new GraphQL client.
type ClientOption ¶
type ClientOption interface {
// contains filtered or unexported methods
}
func WithApiKey ¶
func WithApiKey(apiKey string) ClientOption
func WithEndpoint ¶
func WithEndpoint(endpoint string) ClientOption
func WithUsername ¶
func WithUsername(username string) ClientOption
type GraphQLError ¶
type GraphQLError struct {
Message string `json:"message"`
Extensions json.RawMessage `json:"extensions"`
}
type GraphQLErrors ¶
type GraphQLErrors []GraphQLError
func (GraphQLErrors) Error ¶
func (e GraphQLErrors) Error() string
Click to show internal directories.
Click to hide internal directories.