generated

package
v0.0.0-...-263783a Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2020 License: Apache-2.0 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 {
	Query struct {
		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)
}

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