datasource

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2025 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RocketDataSource

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

RocketDataSource bridges Rocket's resolver pattern to graphql-go-tools DataSource This allows Rocket to work with graphql-go-tools while maintaining its developer-friendly API

type RocketDataSourceFactory

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

RocketDataSourceFactory creates RocketDataSource instances

func NewRocketDataSourceFactory

func NewRocketDataSourceFactory(resolvers *registry.ResolverRegistry, schema *ast.Document) *RocketDataSourceFactory

NewRocketDataSourceFactory creates a new factory for Rocket DataSources

func NewRocketDataSourceFactoryWithFields

func NewRocketDataSourceFactoryWithFields(resolvers *registry.ResolverRegistry, schema *ast.Document, requestedFields []string, operationType ast.OperationType) *RocketDataSourceFactory

NewRocketDataSourceFactoryWithFields creates a factory with knowledge of requested fields and operation type

func (*RocketDataSourceFactory) Context

func (*RocketDataSourceFactory) Planner

func (*RocketDataSourceFactory) PlanningBehavior

func (*RocketDataSourceFactory) ToDataSourceConfiguration

func (f *RocketDataSourceFactory) ToDataSourceConfiguration(id, name string) (plan.DataSourceConfiguration[interface{}], error)

ToDataSourceConfiguration converts the factory to a DataSourceConfiguration This allows it to be used in plan.Configuration.DataSources

func (*RocketDataSourceFactory) UpstreamSchema

func (f *RocketDataSourceFactory) UpstreamSchema(config plan.DataSourceConfiguration[interface{}]) (*ast.Document, bool)

type RocketPlanner

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

RocketPlanner implements plan.DataSourcePlanner for Rocket resolvers It configures how fields are resolved using Rocket's resolver pattern

func (*RocketPlanner) ConfigureFetch

func (p *RocketPlanner) ConfigureFetch() resolve.FetchConfiguration

func (*RocketPlanner) ConfigureSubscription

func (p *RocketPlanner) ConfigureSubscription() plan.SubscriptionConfiguration

func (*RocketPlanner) DataSourcePlanningBehavior

func (p *RocketPlanner) DataSourcePlanningBehavior() plan.DataSourcePlanningBehavior

func (*RocketPlanner) DownstreamResponseFieldAlias

func (p *RocketPlanner) DownstreamResponseFieldAlias(downstreamFieldRef int) (alias string, exists bool)

func (*RocketPlanner) ID

func (p *RocketPlanner) ID() int

func (*RocketPlanner) Register

func (p *RocketPlanner) Register(visitor *plan.Visitor, configuration plan.DataSourceConfiguration[interface{}], dataSourcePlannerConfig plan.DataSourcePlannerConfiguration) error

func (*RocketPlanner) SetID

func (p *RocketPlanner) SetID(id int)

type RocketSource

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

RocketSource implements resolve.DataSource for Rocket resolvers This is where we actually execute Rocket's resolver functions Each RocketSource instance is responsible for resolving ONE specific field

func (*RocketSource) Load

func (s *RocketSource) Load(ctx context.Context, input []byte, out *bytes.Buffer) error

Load executes Rocket resolvers and returns the result

func (*RocketSource) LoadWithFiles

func (s *RocketSource) LoadWithFiles(ctx context.Context, input []byte, files []*httpclient.FileUpload, out *bytes.Buffer) error

Jump to

Keyboard shortcuts

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