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 {
ExchangeRate struct {
AsOf func(childComplexity int) int
Base func(childComplexity int) int
FetchedAt func(childComplexity int) int
Rate func(childComplexity int) int
RateType func(childComplexity int) int
Source func(childComplexity int) int
Target func(childComplexity int) int
}
ExchangeRatePage struct {
Results func(childComplexity int) int
Total func(childComplexity int) int
}
Query struct {
Currencies func(childComplexity int) int
Rates func(childComplexity int, base string, target *string, asOf *model.Time, source *string, typeArg *model.RateType, limit *int32, offset *int32) int
Sources func(childComplexity int) int
}
}
type Config ¶
type Config struct {
Schema *ast.Schema
Resolvers ResolverRoot
Directives DirectiveRoot
Complexity ComplexityRoot
}
type DirectiveRoot ¶
type DirectiveRoot struct {
}
type QueryResolver ¶
type QueryResolver interface {
Rates(ctx context.Context, base string, target *string, asOf *model.Time, source *string, typeArg *model.RateType, limit *int32, offset *int32) (*model.ExchangeRatePage, error)
Sources(ctx context.Context) ([]string, error)
Currencies(ctx context.Context) ([]string, error)
}
type Resolver ¶
func NewResolver ¶
func (*Resolver) Query ¶
func (r *Resolver) Query() QueryResolver
Query returns QueryResolver implementation.
type ResolverRoot ¶
type ResolverRoot interface {
Query() QueryResolver
}
Click to show internal directories.
Click to hide internal directories.