Documentation ¶
Index ¶
- func AnalyzePlanKind(operation, definition *ast.Document, operationName string) (subscription, streaming bool, error error)
- type ArgumentConfiguration
- type ArgumentsConfigurations
- type Configuration
- type DataSourceConfiguration
- type DataSourcePlanner
- type FetchConfiguration
- type FieldConfiguration
- type FieldConfigurations
- type FieldMapping
- type Kind
- type Plan
- type Planner
- type PlannerFactory
- type SourceType
- type StreamingResponsePlan
- type SubscriptionConfiguration
- type SubscriptionResponsePlan
- type SynchronousResponsePlan
- type TypeField
- type Visitor
- func (v *Visitor) AllowVisitor(kind astvisitor.VisitorKind, ref int, visitor interface{}) bool
- func (v *Visitor) EnterDirective(ref int)
- func (v *Visitor) EnterDocument(operation, definition *ast.Document)
- func (v *Visitor) EnterField(ref int)
- func (v *Visitor) EnterOperationDefinition(ref int)
- func (v *Visitor) EnterSelectionSet(ref int)
- func (v *Visitor) LeaveDocument(operation, definition *ast.Document)
- func (v *Visitor) LeaveField(ref int)
- func (v *Visitor) LeaveSelectionSet(ref int)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ArgumentConfiguration ¶
type ArgumentConfiguration struct { Name string SourceType SourceType SourcePath []string }
type ArgumentsConfigurations ¶
type ArgumentsConfigurations []ArgumentConfiguration
func (ArgumentsConfigurations) ForName ¶
func (a ArgumentsConfigurations) ForName(argName string) *ArgumentConfiguration
type Configuration ¶
type Configuration struct { DefaultFlushInterval int64 DataSources []DataSourceConfiguration Fields FieldConfigurations Schema string }
type DataSourceConfiguration ¶
type DataSourceConfiguration struct { RootNodes []TypeField ChildNodes []TypeField Factory PlannerFactory OverrideFieldPathFromAlias bool Custom json.RawMessage }
func (*DataSourceConfiguration) HasRootNode ¶
func (d *DataSourceConfiguration) HasRootNode(typeName, fieldName string) bool
type DataSourcePlanner ¶
type DataSourcePlanner interface { Register(visitor *Visitor, customConfiguration json.RawMessage, isNested bool) error ConfigureFetch() FetchConfiguration ConfigureSubscription() SubscriptionConfiguration }
type FetchConfiguration ¶
type FieldConfiguration ¶
type FieldConfigurations ¶
type FieldConfigurations []FieldConfiguration
func (FieldConfigurations) ForTypeField ¶
func (f FieldConfigurations) ForTypeField(typeName, fieldName string) *FieldConfiguration
type FieldMapping ¶
type Planner ¶
type Planner struct {
// contains filtered or unexported fields
}
func NewPlanner ¶
func NewPlanner(config Configuration) *Planner
func (*Planner) SetConfig ¶
func (p *Planner) SetConfig(config Configuration)
type PlannerFactory ¶
type PlannerFactory interface {
Planner() DataSourcePlanner
}
type SourceType ¶
type SourceType string
const ( ObjectFieldSource SourceType = "object_field" FieldArgumentSource SourceType = "field_argument" )
type StreamingResponsePlan ¶
type StreamingResponsePlan struct { Response resolve.GraphQLStreamingResponse FlushInterval int64 }
func (*StreamingResponsePlan) PlanKind ¶
func (_ *StreamingResponsePlan) PlanKind() Kind
func (*StreamingResponsePlan) SetFlushInterval ¶
func (s *StreamingResponsePlan) SetFlushInterval(interval int64)
type SubscriptionResponsePlan ¶
type SubscriptionResponsePlan struct { Response resolve.GraphQLSubscription FlushInterval int64 }
func (*SubscriptionResponsePlan) PlanKind ¶
func (_ *SubscriptionResponsePlan) PlanKind() Kind
func (*SubscriptionResponsePlan) SetFlushInterval ¶
func (s *SubscriptionResponsePlan) SetFlushInterval(interval int64)
type SynchronousResponsePlan ¶
type SynchronousResponsePlan struct { Response *resolve.GraphQLResponse FlushInterval int64 }
func (*SynchronousResponsePlan) PlanKind ¶
func (_ *SynchronousResponsePlan) PlanKind() Kind
func (*SynchronousResponsePlan) SetFlushInterval ¶
func (s *SynchronousResponsePlan) SetFlushInterval(interval int64)
type Visitor ¶
type Visitor struct {
Operation, Definition *ast.Document
Walker *astvisitor.Walker
Importer astimport.Importer
Config Configuration
OperationName string
// contains filtered or unexported fields
}
func (*Visitor) AllowVisitor ¶
func (v *Visitor) AllowVisitor(kind astvisitor.VisitorKind, ref int, visitor interface{}) bool
func (*Visitor) EnterDirective ¶
func (*Visitor) EnterDocument ¶
func (*Visitor) EnterField ¶
func (*Visitor) EnterOperationDefinition ¶
func (*Visitor) EnterSelectionSet ¶
func (*Visitor) LeaveDocument ¶
func (*Visitor) LeaveField ¶
func (*Visitor) LeaveSelectionSet ¶
Click to show internal directories.
Click to hide internal directories.