querybuilder

package
v0.0.0-...-3c9a48d Latest Latest
Warning

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

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

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

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

func (*Selection) Execute

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

func (*Selection) Root

func (s *Selection) Root() *Selection

func (*Selection) Select

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

func (*Selection) SelectMultiple

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