planner

package
v0.0.0-...-2952f12 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildQueryPlan

func BuildQueryPlan(ctx context.Context, operationContext *OperationContext, opts ...QueryPlanOption) (*plan.QueryPlan, error)

Types

type ComposedSchema

type ComposedSchema struct {
	Schema         *ast.Schema `yaml:"-"`
	SchemaMetadata *FederationSchemaMetadata
	TypeMetadata   map[*ast.Definition]*FederationTypeMetadata
	FieldMetadata  map[*ast.FieldDefinition]*FederationFieldMetadata
}

func BuildComposedSchema

func BuildComposedSchema(ctx context.Context, document *ast.SchemaDocument) (*ComposedSchema, error)

func (*ComposedSchema) MarshalJSON

func (cs *ComposedSchema) MarshalJSON() ([]byte, error)

func (*ComposedSchema) MarshalYAML

func (cs *ComposedSchema) MarshalYAML() (interface{}, error)

type FederationFieldMetadata

type FederationFieldMetadata struct {
	GraphName string
	Requires  ast.SelectionSet // readonly (FieldNode | InlineFragmentNode)[];
	Provides  ast.SelectionSet // readonly (FieldNode | InlineFragmentNode)[];
}

type FederationSchemaMetadata

type FederationSchemaMetadata struct {
	Graphs map[string]*Graph
}

type FederationTypeMetadata

type FederationTypeMetadata struct {
	IsValueType bool

	// available when IsValueType=false
	GraphName string
	Keys      map[string]ast.SelectionSet // readonly (FieldNode | InlineFragmentNode)[];
}

type FetchGroup

type FetchGroup struct {
	ServiceName       string
	Fields            FieldSet
	InternalFragments ast.FragmentDefinitionList

	RequiredFields FieldSet
	ProvidedFields FieldSet

	MergeAt ast.Path
	// contains filtered or unexported fields
}

type Field

type Field struct {
	Scope     *Scope
	FieldNode *ast.Field
	FieldDef  *ast.FieldDefinition
}

func (*Field) MarshalLog

func (field *Field) MarshalLog() interface{}

type FieldSet

type FieldSet []*Field

func (FieldSet) MarshalLog

func (fieldSet FieldSet) MarshalLog() interface{}

type Graph

type Graph struct {
	Name string
	URL  string
}

type OperationContext

type OperationContext struct {
	QueryDocument *ast.QueryDocument
	OperationName string
	Schema        *ast.Schema
	Fragments     ast.FragmentDefinitionList
	// contains filtered or unexported fields
}

func BuildOperationContext

func BuildOperationContext(ctx context.Context, cs *ComposedSchema, document *ast.QueryDocument, operationName string) (*OperationContext, error)

type QueryPlanOption

type QueryPlanOption func(cfg *queryPlanConfig)

func WithAutoFragmentation

func WithAutoFragmentation(autoFragmentation bool) QueryPlanOption

type Scope

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

func (*Scope) MarshalLog

func (scope *Scope) MarshalLog() interface{}

Jump to

Keyboard shortcuts

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