Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewExecutableSchema ¶
func NewExecutableSchema(cfg Config) graphql.ExecutableSchema
NewExecutableSchema creates an ExecutableSchema from the ResolverRoot interface.
Types ¶
type ComplexityRoot ¶
type ComplexityRoot struct { FeedArticle struct { Author func(childComplexity int) int Content func(childComplexity int) int Created func(childComplexity int) int Description func(childComplexity int) int Image func(childComplexity int) int Link func(childComplexity int) int Published func(childComplexity int) int ResourceID func(childComplexity int) int ResourceTitle func(childComplexity int) int Title func(childComplexity int) int } FeedResource struct { Active func(childComplexity int) int Created func(childComplexity int) int Modified func(childComplexity int) int Published func(childComplexity int) int Title func(childComplexity int) int URL func(childComplexity int) int } Mutation struct { ActivateResources func(childComplexity int, urls []string, active bool) int AddResources func(childComplexity int, resources []*model.NewResource) int RemoveResources func(childComplexity int, urls []string) int } Query struct { Articles func(childComplexity int, after time.Time) int Resources func(childComplexity int, active bool) int } Subscription struct { Articles func(childComplexity int) int } }
type Config ¶
type Config struct { Schema *ast.Schema Resolvers ResolverRoot Directives DirectiveRoot Complexity ComplexityRoot }
type DirectiveRoot ¶
type DirectiveRoot struct { }
type MutationResolver ¶
type QueryResolver ¶
type Resolver ¶
type Resolver struct { *storage.ArticleRepository *storage.ResourceRepository *notifier.SubscriptionManager[*model.FeedArticle] TracerProvider traces.ShutdownTracerProvider }
func (*Resolver) Mutation ¶
func (r *Resolver) Mutation() MutationResolver
Mutation returns MutationResolver implementation.
func (*Resolver) Query ¶
func (r *Resolver) Query() QueryResolver
Query returns QueryResolver implementation.
func (*Resolver) Subscription ¶
func (r *Resolver) Subscription() SubscriptionResolver
Subscription returns SubscriptionResolver implementation.
type ResolverRoot ¶
type ResolverRoot interface { Mutation() MutationResolver Query() QueryResolver Subscription() SubscriptionResolver }
type SubscriptionResolver ¶
type SubscriptionResolver interface {
Articles(ctx context.Context) (<-chan []*model.FeedArticle, error)
}
Click to show internal directories.
Click to hide internal directories.