generated

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2021 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 {
	Product struct {
		CompanyCd   func(childComplexity int) int
		Description func(childComplexity int) int
		InventoryCd func(childComplexity int) int
		PriceJpy    func(childComplexity int) int
		ProductID   func(childComplexity int) int
		ProductName func(childComplexity int) int
	}

	Query struct {
		ProductByCompanyCd func(childComplexity int, companyCd *int) int
		ProductByID        func(childComplexity int, productID *int) int
		ProductByName      func(childComplexity int, productName *string) int
		StationByCd        func(childComplexity int, stationCd *int) int
		StationByName      func(childComplexity int, stationName *string) int
	}

	Station struct {
		Address         func(childComplexity int) int
		AfterStation    func(childComplexity int) int
		BeforeStation   func(childComplexity int) int
		LineName        func(childComplexity int) int
		StationCd       func(childComplexity int) int
		StationName     func(childComplexity int) int
		TransferStation func(childComplexity int) int
	}
}

type Config

type Config struct {
	Resolvers  ResolverRoot
	Directives DirectiveRoot
	Complexity ComplexityRoot
}

type DirectiveRoot

type DirectiveRoot struct {
}

type QueryResolver

type QueryResolver interface {
	StationByName(ctx context.Context, stationName *string) ([]*model.Station, error)
	StationByCd(ctx context.Context, stationCd *int) (*model.Station, error)
	ProductByName(ctx context.Context, productName *string) ([]*model.Product, error)
	ProductByID(ctx context.Context, productID *int) (*model.Product, error)
	ProductByCompanyCd(ctx context.Context, companyCd *int) ([]*model.Product, error)
}

type ResolverRoot

type ResolverRoot interface {
	Query() QueryResolver
	Station() StationResolver
}

type StationResolver

type StationResolver interface {
	BeforeStation(ctx context.Context, obj *model.Station) (*model.Station, error)
	AfterStation(ctx context.Context, obj *model.Station) (*model.Station, error)
	TransferStation(ctx context.Context, obj *model.Station) ([]*model.Station, error)
}

Jump to

Keyboard shortcuts

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