Documentation
¶
Overview ¶
Code generated by graphql-go-tools gen, DO NOT EDIT.
Package execution is a complete GraphQL runtime. It contains a Handler to orchestrate the execution, a Query Planner to generate a Query Plan from an AST as well as the Executor to execute a Query Plan.
Index ¶
- type ArgsResolver
- type BooleanCondition
- type Context
- type DataResolvingConfig
- type DataSourceDefinition
- type DataSourceInvocation
- type ErrJSONValueTypeValueIncompatible
- type Executor
- type Fetch
- type Field
- type GraphQLDataSourceConfig
- type GraphqlRequest
- type HTTP_METHOD
- type Handler
- type Header
- type HttpJsonDataSourceConfig
- type HttpPollingStreamDataSourceConfig
- type IfEqual
- type IfNotEqual
- type JSONValueType
- type List
- type ListFilter
- type ListFilterFirstN
- type ListFilterKind
- type LockableBufferMap
- type MAPPING_MODE
- type MQTTDataSourceConfig
- type MappingConfig
- type NatsDataSourceConfig
- type Node
- type NodeKind
- type Object
- type PARAMETER_SOURCE
- type ParallelFetch
- type Parameter
- type PipelineDataSourceConfig
- type PipelineTransformation
- type Planner
- type ResolvedArgs
- type ResolvedArgument
- type RootNode
- type SerialFetch
- type SingleFetch
- type StaticDataSourceConfig
- type StatusCodeTypeNameMapping
- type TRANSFORMATION_MODE
- type Transformation
- type TransformationConfig
- type Value
- type Variables
- type WasmDataSourceConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArgsResolver ¶
type ArgsResolver interface {
ResolveArgs(args []datasource.Argument, data []byte) ResolvedArgs
}
type BooleanCondition ¶
type Context ¶
type Context struct {
context.Context
Variables Variables
ExtraArguments []datasource.Argument
}
type DataResolvingConfig ¶
type DataResolvingConfig struct {
PathSelector datasource.PathSelector
Transformation Transformation
}
type DataSourceDefinition ¶
type DataSourceDefinition struct {
// the type name to which the data source is attached
TypeName []byte
// the field on the type to which the data source is attached
FieldName []byte
// a factory method to return a new planner
DataSourcePlannerFactory func() datasource.Planner
}
type DataSourceInvocation ¶
type DataSourceInvocation struct {
Args []datasource.Argument
DataSource datasource.DataSource
}
type ErrJSONValueTypeValueIncompatible ¶
type ErrJSONValueTypeValueIncompatible struct {
// contains filtered or unexported fields
}
func (ErrJSONValueTypeValueIncompatible) Error ¶
func (e ErrJSONValueTypeValueIncompatible) Error() string
type Executor ¶
type Executor struct {
// contains filtered or unexported fields
}
func NewExecutor ¶
func NewExecutor(templateDirectives []byte_template.DirectiveDefinition) *Executor
func (*Executor) ResolveArgs ¶
func (e *Executor) ResolveArgs(args []datasource.Argument, data []byte) ResolvedArgs
type Fetch ¶
type Fetch interface {
Fetch(ctx Context, data []byte, argsResolver ArgsResolver, suffix string, buffers *LockableBufferMap) (n int, err error)
}
type Field ¶
type Field struct {
Name []byte
Value Node
Skip BooleanCondition
HasResolvedData bool
}
func (*Field) HasResolversRecursively ¶
type GraphQLDataSourceConfig ¶
type GraphQLDataSourceConfig struct {
Host string
Url string
Method HTTP_METHOD
Params *[]*Parameter
}
type GraphqlRequest ¶
type GraphqlRequest struct {
OperationName string `json:"operationName"`
Variables json.RawMessage `json:"variables"`
Query string `json:"query"`
}
type HTTP_METHOD ¶
type HTTP_METHOD int
const ( UNDEFINED_HTTP_METHOD HTTP_METHOD = iota HTTP_METHOD_GET HTTP_METHOD_POST HTTP_METHOD_UPDATE HTTP_METHOD_DELETE )
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func NewHandler ¶
func NewHandler(base *datasource.BasePlanner, templateDirectives []byte_template.DirectiveDefinition) *Handler
type HttpJsonDataSourceConfig ¶
type HttpJsonDataSourceConfig struct {
Host string
Url string
Method HTTP_METHOD
Params *[]*Parameter
Body *string
Headers *[]*Header
DefaultTypeName *string
StatusCodeTypeNameMappings *[]*StatusCodeTypeNameMapping
}
type HttpPollingStreamDataSourceConfig ¶
type HttpPollingStreamDataSourceConfig struct {
Host string
Url string
Method HTTP_METHOD
DelaySeconds int64
Params *[]*Parameter
}
type IfEqual ¶
type IfEqual struct {
Left, Right datasource.Argument
}
type IfNotEqual ¶
type IfNotEqual struct {
Left, Right datasource.Argument
}
type JSONValueType ¶
type JSONValueType int
const ( UnknownValueType JSONValueType = iota StringValueType IntegerValueType FloatValueType BooleanValueType )
func (JSONValueType) String ¶
func (i JSONValueType) String() string
type List ¶
type List struct {
DataResolvingConfig DataResolvingConfig
Value Node
Filter ListFilter
}
func (*List) HasResolversRecursively ¶
type ListFilter ¶
type ListFilter interface {
Kind() ListFilterKind
}
type ListFilterFirstN ¶
type ListFilterFirstN struct {
FirstN int
}
func (ListFilterFirstN) Kind ¶
func (_ ListFilterFirstN) Kind() ListFilterKind
type ListFilterKind ¶
type ListFilterKind int
const (
ListFilterKindFirstN ListFilterKind = iota + 1
)
type LockableBufferMap ¶
type MAPPING_MODE ¶
type MAPPING_MODE int
const ( UNDEFINED_MAPPING_MODE MAPPING_MODE = iota MAPPING_MODE_NONE MAPPING_MODE_PATH_SELECTOR )
type MQTTDataSourceConfig ¶
type MappingConfig ¶
type MappingConfig struct {
Mode MAPPING_MODE
PathSelector *string
}
type NatsDataSourceConfig ¶
type Object ¶
type Object struct {
DataResolvingConfig DataResolvingConfig
Fields []Field
Fetch Fetch
// contains filtered or unexported fields
}
func (*Object) HasResolversRecursively ¶
func (*Object) OperationType ¶
func (o *Object) OperationType() ast.OperationType
type PARAMETER_SOURCE ¶
type PARAMETER_SOURCE int
const ( UNDEFINED_PARAMETER_SOURCE PARAMETER_SOURCE = iota PARAMETER_SOURCE_CONTEXT_VARIABLE PARAMETER_SOURCE_OBJECT_VARIABLE_ARGUMENT PARAMETER_SOURCE_FIELD_ARGUMENTS )
type ParallelFetch ¶
type ParallelFetch struct {
Fetches []Fetch
// contains filtered or unexported fields
}
func (*ParallelFetch) Fetch ¶
func (p *ParallelFetch) Fetch(ctx Context, data []byte, argsResolver ArgsResolver, suffix string, buffers *LockableBufferMap) (n int, err error)
type Parameter ¶
type Parameter struct {
Name string
SourceKind PARAMETER_SOURCE
SourceName string
VariableType string
}
type PipelineDataSourceConfig ¶
type PipelineTransformation ¶
type PipelineTransformation struct {
// contains filtered or unexported fields
}
type Planner ¶
type Planner struct {
// contains filtered or unexported fields
}
func NewPlanner ¶
func NewPlanner(base *datasource.BasePlanner) *Planner
type ResolvedArgs ¶
type ResolvedArgs []ResolvedArgument
func (ResolvedArgs) ByKey ¶
func (r ResolvedArgs) ByKey(key []byte) []byte
func (ResolvedArgs) Dump ¶
func (r ResolvedArgs) Dump() []string
func (*ResolvedArgs) Filter ¶
func (r *ResolvedArgs) Filter(condition func(i int) (keep bool))
func (ResolvedArgs) Keys ¶
func (r ResolvedArgs) Keys() [][]byte
type ResolvedArgument ¶
type RootNode ¶
type RootNode interface {
Node
OperationType() ast.OperationType
}
type SerialFetch ¶
type SerialFetch struct {
Fetches []Fetch
}
func (*SerialFetch) Fetch ¶
func (s *SerialFetch) Fetch(ctx Context, data []byte, argsResolver ArgsResolver, suffix string, buffers *LockableBufferMap) (n int, err error)
type SingleFetch ¶
type SingleFetch struct {
Source *DataSourceInvocation
BufferName string
}
func (*SingleFetch) Fetch ¶
func (s *SingleFetch) Fetch(ctx Context, data []byte, argsResolver ArgsResolver, path string, buffers *LockableBufferMap) (int, error)
type StaticDataSourceConfig ¶
type StaticDataSourceConfig struct {
Data *string
}
type TRANSFORMATION_MODE ¶
type TRANSFORMATION_MODE int
const ( UNDEFINED_TRANSFORMATION_MODE TRANSFORMATION_MODE = iota TRANSFORMATION_MODE_PIPELINE )
type Transformation ¶
type TransformationConfig ¶
type TransformationConfig struct {
Mode TRANSFORMATION_MODE
PipelineConfigFile *string
PipelineConfigString *string
}
type Value ¶
type Value struct {
DataResolvingConfig DataResolvingConfig
ValueType JSONValueType
}
func (*Value) HasResolversRecursively ¶
type Variables ¶
func VariablesFromJson ¶
func VariablesFromJson(requestVariables, extraVariables []byte) (variables Variables, extraArguments []datasource.Argument)
type WasmDataSourceConfig ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.