querybuilder

package
v0.15.1 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2024 License: Apache-2.0 Imports: 12 Imported by: 1

Documentation

Index

Constants

View Source
const (
	GraphQLMarshallerType   = "XXX_GraphQLType"
	GraphQLMarshallerIDType = "XXX_GraphQLIDType"
	GraphQLMarshallerID     = "XXX_GraphQLID"
)

Variables

This section is empty.

Functions

func IsZeroValue

func IsZeroValue(value any) bool

func MarshalGQL

func MarshalGQL(ctx context.Context, v any) (string, error)

Types

type GraphQLMarshaller

type GraphQLMarshaller interface {
	// XXX_GraphQLType is an internal function. It returns the native GraphQL type name
	XXX_GraphQLType() string
	// XXX_GraphQLIDType is an internal function. It returns the native GraphQL type name for the ID of this object
	XXX_GraphQLIDType() string
	// XXX_GraphqlID is an internal function. It returns the underlying type ID
	XXX_GraphQLID(ctx context.Context) (string, error)
	json.Marshaler
}

GraphQLMarshaller is an internal interface for marshalling an object into GraphQL.

type Selection

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

func Query

func Query() *Selection

func (*Selection) Arg

func (s *Selection) Arg(name string, value any) *Selection

func (*Selection) Bind

func (s *Selection) Bind(v interface{}) *Selection

func (*Selection) Build

func (s *Selection) Build(ctx context.Context) (string, error)

func (*Selection) Client added in v0.10.1

func (s *Selection) Client(c graphql.Client) *Selection

func (*Selection) Execute

func (s *Selection) Execute(ctx context.Context) error

func (*Selection) Root added in v0.10.1

func (s *Selection) Root() *Selection

func (*Selection) Select

func (s *Selection) Select(name string) *Selection

func (*Selection) SelectMultiple added in v0.12.5

func (s *Selection) SelectMultiple(name ...string) *Selection

func (*Selection) SelectWithAlias

func (s *Selection) SelectWithAlias(alias, name string) *Selection

Jump to

Keyboard shortcuts

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