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 }
Click to show internal directories.
Click to hide internal directories.