Versions in this module Expand all Collapse all v0 v0.1.0 Mar 15, 2021 Changes in this version + func AddVarNamesToQuery(query string, varNames ...interface{}) string + func ExecuteQuery(cli HTTPClient, serverURL string, graphqlReq *Request, out interface{}) error + func ExecuteQueryContext(ctx context.Context, qc *QueryConfig) error + func ExecuteQueryContextWithTenant(ctx context.Context, qc *QueryConfig) (string, error) + func ExecuteQueryEscapeHTML(cli HTTPClient, serverURL string, graphqlReq *Request, escapeHTML bool, ...) error + func ExecuteQueryWithTenant(cli HTTPClient, serverURL string, graphqlReq *Request, out interface{}) (string, error) + func NewMockSubServer(t *testing.T, expectedQuery string, expectedVars map[string]interface{}, ...) *httptest.Server + func SubscriptionSendKAMessages(s *Subscription) + type Error struct + Locations []map[string]int + Message string + Path []string + func (e Error) Error() string + type HTTPClient interface + Do func(*http.Request) (*http.Response, error) + Header func() http.Header + type KeepAliveMessage struct + type Message struct + Err error + Payload interface{} + type QueryConfig struct + EscapeHTML bool + HClient HTTPClient + Header http.Header + LimitRead int64 + Output interface{} + Request *Request + ServerURL string + type Request struct + Header http.Header + Query string + Variables map[string]interface{} + func NewRequest(query string, opts ...RequestOption) *Request + func (r *Request) Var(key string, value interface{}) + func (r *Request) Vars(vars map[string]interface{}) + type RequestOption func(r *Request) + func RequestWithHeader(header http.Header) RequestOption + func RequestWithLogger(logger log.Logger) RequestOption + func RequestWithTenant(tenantID string) RequestOption + func RequestWithToken(token string) RequestOption + type Response struct + Data interface{} + Error []Error + type ResponseFields string + type Subscription struct + func NewSubscription(ctx context.Context, u *url.URL, query string, ...) (*Subscription, error) + func (s *Subscription) Messages() <-chan *Message + func (s *Subscription) Shutdown(ctx context.Context) error + type SubscriptionOption func(s *Subscription) + func SubscriptionWithHeader(header http.Header) SubscriptionOption + func SubscriptionWithLog(l log.Logger) SubscriptionOption + func SubscriptionWithTenant(tenantID string) SubscriptionOption + func SubscriptionWithToken(token string) SubscriptionOption + func SubscriptionWithVars(vars map[string]interface{}) SubscriptionOption