graphapihistory

package
v0.52.2 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2025 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithTransactions

func WithTransactions(h *handler.Server, d *ent.Client)

WithTransactions adds the transactioner to the ent db client

Types

type Handler

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

Handler is an http handler wrapping a Resolver

func (*Handler) Handler

func (h *Handler) Handler() http.HandlerFunc

Handler returns the http.HandlerFunc for the GraphAPI

func (*Handler) Routes

func (h *Handler) Routes(e *echo.Group)

Routes for the the server

type Resolver

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

Resolver provides a graph response resolver

func NewResolver

func NewResolver(db *historygenerated.Client) *Resolver

NewResolver returns a resolver configured with the given ent client

func (*Resolver) Handler

func (r *Resolver) Handler() *Handler

Handler returns an http handler for a graph resolver

func (*Resolver) Query

Query returns gqlhistorygenerated.QueryResolver implementation.

func (*Resolver) WithComplexityLimit

func (r *Resolver) WithComplexityLimit(h *handler.Server)

func (Resolver) WithComplexityLimitConfig

func (r Resolver) WithComplexityLimitConfig(limit int) *Resolver

WithComplexityLimitConfig sets the complexity limit for the resolver

func (Resolver) WithDevelopment

func (r Resolver) WithDevelopment(dev bool) *Resolver

WithDevelopment sets the resolver to development mode when isDevelopment is false, introspection will be disabled

func (Resolver) WithExtensions

func (r Resolver) WithExtensions(enabled bool) *Resolver

func (Resolver) WithMaxResultLimit

func (r Resolver) WithMaxResultLimit(limit int) *Resolver

WithMaxResultLimit sets the max result limit in the config for the resolvers

func (*Resolver) WithPool

func (r *Resolver) WithPool(maxWorkers int, includeMetrics bool, options ...pond.Option)

WithPool adds a worker pool to the resolver for parallel processing

Jump to

Keyboard shortcuts

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