postprocess

package
v2.0.0-rc.60 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2024 License: MIT Imports: 7 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateConcreteSingleFetchTypes

type CreateConcreteSingleFetchTypes struct{}

CreateConcreteSingleFetchTypes is a postprocessor that transforms fetches into more concrete fetch types

func (*CreateConcreteSingleFetchTypes) Process

func (d *CreateConcreteSingleFetchTypes) Process(node resolve.Node)

func (*CreateConcreteSingleFetchTypes) ProcessSubscription

func (d *CreateConcreteSingleFetchTypes) ProcessSubscription(node resolve.Node, trigger *resolve.GraphQLSubscriptionTrigger)

type CreateFetchTree

type CreateFetchTree struct {
	*PlanWalker
	// contains filtered or unexported fields
}

func NewFetchTreeCreator

func NewFetchTreeCreator(fieldHasFetch map[*resolve.Field]struct{}) *CreateFetchTree

func (*CreateFetchTree) CloneArray

func (e *CreateFetchTree) CloneArray(a *resolve.Array) *resolve.Array

func (*CreateFetchTree) CloneField

func (e *CreateFetchTree) CloneField(f *resolve.Field) *resolve.Field

func (*CreateFetchTree) CloneObject

func (e *CreateFetchTree) CloneObject(o *resolve.Object) *resolve.Object

func (*CreateFetchTree) EnterArray

func (e *CreateFetchTree) EnterArray(array *resolve.Array)

func (*CreateFetchTree) EnterField

func (e *CreateFetchTree) EnterField(field *resolve.Field)

func (*CreateFetchTree) EnterObject

func (e *CreateFetchTree) EnterObject(object *resolve.Object)

func (*CreateFetchTree) ExtractFetchTree

func (e *CreateFetchTree) ExtractFetchTree(res *resolve.GraphQLResponse) *resolve.Object

func (*CreateFetchTree) LeaveArray

func (e *CreateFetchTree) LeaveArray(_ *resolve.Array)

func (*CreateFetchTree) LeaveField

func (e *CreateFetchTree) LeaveField(field *resolve.Field)

func (*CreateFetchTree) LeaveObject

func (e *CreateFetchTree) LeaveObject(_ *resolve.Object)

type CreateMultiFetchTypes

type CreateMultiFetchTypes struct{}

CreateMultiFetchTypes is a postprocessor that transforms multi fetches into more concrete fetch types

func (*CreateMultiFetchTypes) Process

func (d *CreateMultiFetchTypes) Process(node resolve.Node)

func (*CreateMultiFetchTypes) ProcessSubscription

func (d *CreateMultiFetchTypes) ProcessSubscription(node resolve.Node, trigger *resolve.GraphQLSubscriptionTrigger)

type DeduplicateMultiFetch

type DeduplicateMultiFetch struct{}

DeduplicateMultiFetch is a postprocessor that transforms multi fetches into more concrete fetch types

func (*DeduplicateMultiFetch) Process

func (d *DeduplicateMultiFetch) Process(node resolve.Node)

func (*DeduplicateMultiFetch) ProcessSubscription

func (d *DeduplicateMultiFetch) ProcessSubscription(node resolve.Node, trigger *resolve.GraphQLSubscriptionTrigger)

type FetchFinder

type FetchFinder struct {
	*PlanWalker
	// contains filtered or unexported fields
}

func NewFetchFinder

func NewFetchFinder() *FetchFinder

func (*FetchFinder) EnterObject

func (e *FetchFinder) EnterObject(object *resolve.Object)

func (*FetchFinder) Find

func (e *FetchFinder) Find(res *resolve.GraphQLResponse) map[*resolve.Field]struct{}

func (*FetchFinder) LeaveObject

func (e *FetchFinder) LeaveObject(object *resolve.Object)

type MergeFields

type MergeFields struct {
}

func (*MergeFields) Process

func (m *MergeFields) Process(node resolve.Node)

func (*MergeFields) ProcessSubscription

func (m *MergeFields) ProcessSubscription(node resolve.Node, trigger *resolve.GraphQLSubscriptionTrigger)

type PlanArrayVisitor

type PlanArrayVisitor interface {
	PlanEnterArrayVisitor
	PlanLeaveArrayVisitor
}

type PlanEnterArrayVisitor

type PlanEnterArrayVisitor interface {
	EnterArray(array *resolve.Array)
}

type PlanEnterFieldVisitor

type PlanEnterFieldVisitor interface {
	EnterField(field *resolve.Field)
}

type PlanEnterObjectVisitor

type PlanEnterObjectVisitor interface {
	EnterObject(object *resolve.Object)
}

type PlanFieldVisitor

type PlanFieldVisitor interface {
	PlanEnterFieldVisitor
	PlanLeaveFieldVisitor
}

type PlanLeaveArrayVisitor

type PlanLeaveArrayVisitor interface {
	LeaveArray(array *resolve.Array)
}

type PlanLeaveFieldVisitor

type PlanLeaveFieldVisitor interface {
	LeaveField(field *resolve.Field)
}

type PlanLeaveObjectVisitor

type PlanLeaveObjectVisitor interface {
	LeaveObject(object *resolve.Object)
}

type PlanObjectVisitor

type PlanObjectVisitor interface {
	PlanEnterObjectVisitor
	PlanLeaveObjectVisitor
}

type PlanVisitor

type PlanVisitor interface {
	PlanObjectVisitor
	PlanArrayVisitor
}

type PlanWalker

type PlanWalker struct {
	CurrentFields  []*resolve.Field
	CurrentObjects []*resolve.Object
	// contains filtered or unexported fields
}

func (*PlanWalker) SetSkip

func (e *PlanWalker) SetSkip(skip bool)

func (*PlanWalker) Walk

func (e *PlanWalker) Walk(data *resolve.Object, info *resolve.GraphQLResponseInfo)

type PostProcessor

type PostProcessor interface {
	Process(node resolve.Node)
	ProcessSubscription(node resolve.Node, trigger *resolve.GraphQLSubscriptionTrigger)
}

type Processor

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

func DefaultProcessor

func DefaultProcessor() *Processor

func NewProcessor

func NewProcessor(postProcessors []PostProcessor, extractFetches bool) *Processor

func (*Processor) Process

func (p *Processor) Process(pre plan.Plan) plan.Plan

type ResolveInputTemplates

type ResolveInputTemplates struct{}

ResolveInputTemplates is a postprocessor that resolves input template

func (*ResolveInputTemplates) Process

func (d *ResolveInputTemplates) Process(node resolve.Node)

func (*ResolveInputTemplates) ProcessSubscription

func (d *ResolveInputTemplates) ProcessSubscription(node resolve.Node, trigger *resolve.GraphQLSubscriptionTrigger)

Jump to

Keyboard shortcuts

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