Skip to content

graphql

import "github.com/xigxog/kubefox/kit/graphql"

Index

type Client

type Client struct {
    // contains filtered or unexported fields
}

func New

func New(ktx kit.Kontext, dependency kit.ComponentDep) *Client

func (*Client) Mutate

func (c *Client) Mutate(m interface{}, variables map[string]interface{}, options ...graphql.Option) 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 (*Client) MutateCtx

func (c *Client) MutateCtx(ctx context.Context, m interface{}, variables map[string]interface{}, options ...graphql.Option) error

See Mutate for details.

func (*Client) MutateRaw

func (c *Client) MutateRaw(m interface{}, variables map[string]interface{}, options ...graphql.Option) ([]byte, error)

MutateRaw 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. return raw bytes message.

func (*Client) MutateRawCtx

func (c *Client) MutateRawCtx(ctx context.Context, m interface{}, variables map[string]interface{}, options ...graphql.Option) ([]byte, error)

See MutateRaw for details.

func (*Client) Query

func (c *Client) Query(q interface{}, variables map[string]interface{}, options ...graphql.Option) 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.

func (*Client) QueryCtx

func (c *Client) QueryCtx(ctx context.Context, q interface{}, variables map[string]interface{}, options ...graphql.Option) error

See Query for details.

func (*Client) QueryRaw

func (c *Client) QueryRaw(q interface{}, variables map[string]interface{}, options ...graphql.Option) ([]byte, 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. return raw bytes message.

func (*Client) QueryRawCtx

func (c *Client) QueryRawCtx(ctx context.Context, q interface{}, variables map[string]interface{}, options ...graphql.Option) ([]byte, error)

See QueryRaw for details.

Generated by gomarkdoc