querybuilder

package
v0.6.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	GraphQLMarshallerType = "XXX_GraphQLType"
	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 added in v0.4.0

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

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) Execute

func (s *Selection) Execute(ctx context.Context, c graphql.Client) error

func (*Selection) Select

func (s *Selection) Select(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