Versions in this module Expand all Collapse all v0 v0.0.17 Feb 19, 2020 v0.0.16 Feb 19, 2020 Changes in this version + const MessageMissingCachedQuery + type AutomaticQueryPlanCache struct + func NewAutomaticQueryPlanCache() *AutomaticQueryPlanCache + func (c *AutomaticQueryPlanCache) Retrieve(ctx *PlanningContext, hash *string, planner QueryPlanner) ([]*QueryPlan, error) + func (c *AutomaticQueryPlanCache) WithCacheTTL(duration time.Duration) *AutomaticQueryPlanCache + type ErrExecutor struct + Error error + func (e *ErrExecutor) Execute(ctx *ExecutionContext) (map[string]interface{}, error) + type ExecutionContext struct + Plan *QueryPlan + RequestContext context.Context + RequestMiddlewares []graphql.NetworkMiddleware + Variables map[string]interface{} + type ExecutionMiddleware interface + ExecutionMiddleware func() + type Executor interface + Execute func(ctx *ExecutionContext) (map[string]interface{}, error) + type ExecutorFunc func(ctx *ExecutionContext) (map[string]interface{}, error) + func (e ExecutorFunc) Execute(ctx *ExecutionContext) (map[string]interface{}, error) + type FieldURLMap map[string][]string + func (m FieldURLMap) Concat(other FieldURLMap) FieldURLMap + func (m FieldURLMap) RegisterURL(parent string, field string, locations ...string) + func (m FieldURLMap) URLFor(parent string, field string) ([]string, error) + type Gateway struct + func New(sources []*graphql.RemoteSchema, configs ...Option) (*Gateway, error) + func (g *Gateway) Execute(ctx *RequestContext, plan []*QueryPlan) (map[string]interface{}, error) + func (g *Gateway) GetPlan(ctx *RequestContext) ([]*QueryPlan, error) + func (g *Gateway) GraphQLHandler(w http.ResponseWriter, r *http.Request) + func (g *Gateway) PlaygroundHandler(w http.ResponseWriter, r *http.Request) + func (g *Gateway) Query(ctx context.Context, input *graphql.QueryInput, receiver interface{}) error + type HTTPOperation struct + Extensions struct{ ... } + OperationName string + Query string + Variables map[string]interface{} + type Logger struct + func (l *Logger) Debug(args ...interface{}) + func (l *Logger) FormatSelectionSet(selection ast.SelectionSet) string + func (l *Logger) Info(args ...interface{}) + func (l *Logger) QueryPlanStep(step *QueryPlanStep) + func (l *Logger) Warn(args ...interface{}) + func (l *Logger) WithFields(fields LoggerFields) *Logger + type LoggerFields map[string]interface + type Merger interface + Merge func([]*ast.Schema) (*ast.Schema, error) + type MergerFunc func([]*ast.Schema) (*ast.Schema, error) + func (m MergerFunc) Merge(sources []*ast.Schema) (*ast.Schema, error) + type Middleware interface + Middleware func() + type MiddlewareList []Middleware + type MinQueriesPlanner struct + func (p *MinQueriesPlanner) Plan(ctx *PlanningContext) ([]*QueryPlan, error) + func (p *MinQueriesPlanner) WithQueryerFactory(factory *QueryerFactory) QueryPlanner + type MockErrPlanner struct + Err error + func (p *MockErrPlanner) Plan(*PlanningContext) ([]*QueryPlan, error) + type MockExecutor struct + Value map[string]interface{} + func (e *MockExecutor) Execute(ctx *ExecutionContext) (map[string]interface{}, error) + type MockPlanner struct + Plans []*QueryPlan + func (p *MockPlanner) Plan(*PlanningContext) ([]*QueryPlan, error) + type NoQueryPlanCache struct + func (p *NoQueryPlanCache) Retrieve(ctx *PlanningContext, hash *string, planner QueryPlanner) ([]*QueryPlan, error) + type Option func(*Gateway) + func WithAutomaticQueryPlanCache() Option + func WithExecutor(e Executor) Option + func WithMerger(m Merger) Option + func WithMiddlewares(middlewares ...Middleware) Option + func WithNoQueryPlanCache() Option + func WithPlanner(p QueryPlanner) Option + func WithQueryFields(fields ...*QueryField) Option + func WithQueryPlanCache(p QueryPlanCache) Option + func WithQueryerFactory(factory *QueryerFactory) Option + type ParallelExecutor struct + func (executor *ParallelExecutor) Execute(ctx *ExecutionContext) (map[string]interface{}, error) + type PersistedQuerySpecification struct + Hash string + Version int + type Planner struct + QueryerFactory *QueryerFactory + func (p *Planner) GetQueryer(ctx *PlanningContext, url string) graphql.Queryer + type PlannerWithQueryerFactory interface + WithQueryerFactory func(*QueryerFactory) QueryPlanner + type PlanningContext struct + Gateway *Gateway + Locations FieldURLMap + Query string + Schema *ast.Schema + type QueryField struct + Arguments ast.ArgumentDefinitionList + Name string + Resolver func(context.Context, map[string]interface{}) (string, error) + Type *ast.Type + type QueryPlan struct + FieldsToScrub map[string][][]string + FragmentDefinitions ast.FragmentDefinitionList + Operation *ast.OperationDefinition + RootStep *QueryPlanStep + type QueryPlanCache interface + Retrieve func(ctx *PlanningContext, hash *string, planner QueryPlanner) ([]*QueryPlan, error) + type QueryPlanStep struct + FragmentDefinitions ast.FragmentDefinitionList + InsertionPoint []string + ParentID string + ParentType string + QueryDocument *ast.QueryDocument + QueryString string + Queryer graphql.Queryer + SelectionSet ast.SelectionSet + Then []*QueryPlanStep + Variables Set + type QueryPlanner interface + Plan func(*PlanningContext) ([]*QueryPlan, error) + type QueryerFactory func(ctx *PlanningContext, url string) graphql.Queryer + type RequestContext struct + CacheKey string + Context context.Context + Query string + Variables map[string]interface{} + type RequestMiddleware graphql.NetworkMiddleware + func (p RequestMiddleware) Middleware() + type ResponseMiddleware func(ctx *ExecutionContext, response map[string]interface{}) error + func (p ResponseMiddleware) ExecutionMiddleware() + func (p ResponseMiddleware) Middleware() + type Set map[string]bool + func (set Set) Add(k string) + func (set Set) Has(k string) bool + func (set Set) Remove(k string)