argument

package
v0.0.0-...-8285219 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterArgument

func RegisterArgument(typename string, arg Builder)

Types

type Argument

type Argument interface {
	TypeName() string
	// Validate checks if the value that pass in by client is legal.
	Validate(interface{}) error
	GetArgumentType() graphql.Input
}

Argument represents an abstracted definition of GraphQL's conditional querying capabilities. It is decoupled from specific Query implementations, offering a universal and flexible solution for conditional queries. This approach transforms Argument into a reusable component, standardizing condition filtering and data processing across various querying contexts, thereby enhancing the framework's versatility and adaptability.

func Factory

func Factory(typename string) Argument

Factory create a argument instance by typename, when typename is not exist, return nil.

type Builder

type Builder func() Argument

type DefaultArgumentBuilder

type DefaultArgumentBuilder struct {
}

func (*DefaultArgumentBuilder) BuildArgs

func (i *DefaultArgumentBuilder) BuildArgs() []Argument

Jump to

Keyboard shortcuts

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