graphql

package
v1.3.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 21, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const ConnectTimeout = 10 * time.Second

Variables

This section is empty.

Functions

func HasuraApiRequest

func HasuraApiRequest(host string, token string, body string) error

func HasuraCreateView

func HasuraCreateView(host string, token string, viewName string, viewAs string, materialized bool) error

func HasuraTrackTable

func HasuraTrackTable(host string, token string, table string) error

func RefreshMaterializedView added in v1.2.1

func RefreshMaterializedView(host string, token string, viewName string) error

Types

type GraphqlClient

type GraphqlClient struct {
	Host   string
	Client *graphql.Client
}

func NewGraphqlQueryClient

func NewGraphqlQueryClient(host string, token string) *GraphqlClient

func (*GraphqlClient) Connect

func (c *GraphqlClient) Connect() error

type GraphqlSubscriptionClient

type GraphqlSubscriptionClient struct {
	Client *graphql.SubscriptionClient
	Id     string
	// contains filtered or unexported fields
}

func NewGraphqlSubscriptionClient

func NewGraphqlSubscriptionClient(host string, token string) (error, *GraphqlSubscriptionClient)

func (*GraphqlSubscriptionClient) GetState

func (c *GraphqlSubscriptionClient) GetState() bool

func (*GraphqlSubscriptionClient) Start

func (c *GraphqlSubscriptionClient) Start() error

func (*GraphqlSubscriptionClient) Stop

func (c *GraphqlSubscriptionClient) Stop() error

func (*GraphqlSubscriptionClient) Subscribe

func (c *GraphqlSubscriptionClient) Subscribe(query interface{}, handler func(message []byte, err error) error) error

func (*GraphqlSubscriptionClient) Unsubscribe

func (c *GraphqlSubscriptionClient) Unsubscribe() error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL