generated

package
v0.0.0-...-bd97fab Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2020 License: MIT Imports: 11 Imported by: 0

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 {
	Mutation struct {
		AddStock func(childComplexity int, input model.NewStock) int
	}

	Query struct {
		GetStocks        func(childComplexity int, stockSymbol string) int
		GetStocksByRange func(childComplexity int, input model.StockInput) int
	}

	Stock struct {
		Date               func(childComplexity int) int
		Exchange           func(childComplexity int) int
		StockPriceAdjClose func(childComplexity int) int
		StockPriceClose    func(childComplexity int) int
		StockPriceHigh     func(childComplexity int) int
		StockPriceLow      func(childComplexity int) int
		StockPriceOpen     func(childComplexity int) int
		StockSymbol        func(childComplexity int) int
		StockVolume        func(childComplexity int) int
	}

	Subscription struct {
		StockAdded func(childComplexity int) int
	}
}

type Config

type Config struct {
	Resolvers  ResolverRoot
	Directives DirectiveRoot
	Complexity ComplexityRoot
}

type DirectiveRoot

type DirectiveRoot struct {
}

type MutationResolver

type MutationResolver interface {
	AddStock(ctx context.Context, input model.NewStock) (*model.Stock, error)
}

type QueryResolver

type QueryResolver interface {
	GetStocks(ctx context.Context, stockSymbol string) ([]*model.Stock, error)
	GetStocksByRange(ctx context.Context, input model.StockInput) ([]*model.Stock, error)
}

type ResolverRoot

type ResolverRoot interface {
	Mutation() MutationResolver
	Query() QueryResolver
	Subscription() SubscriptionResolver
}

type SubscriptionResolver

type SubscriptionResolver interface {
	StockAdded(ctx context.Context) (<-chan *model.Stock, error)
}

Jump to

Keyboard shortcuts

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