Documentation ¶
Index ¶
- func NewExecutableSchema(cfg Config) graphql.ExecutableSchema
- type ComplexityRoot
- type Config
- type DirectiveRoot
- type Entity
- type EntityResolver
- type MutationResolver
- type ProblemReport
- type ProblemReportCategory
- type ProblemReportCreateResource
- type QueryResolver
- type ReportPosition
- type Resolver
- type ResolverRoot
- type WGS84Position
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 { Entity struct { FindProblemReportByID func(childComplexity int, id string) int FindProblemReportCategoryByID func(childComplexity int, id string) int } Mutation struct { Create func(childComplexity int, input ProblemReportCreateResource) int } ProblemReport struct { ID func(childComplexity int) int Pos func(childComplexity int) int Type func(childComplexity int) int } ProblemReportCategory struct { ID func(childComplexity int) int Label func(childComplexity int) int ReportType func(childComplexity int) int } Query struct { GetAll func(childComplexity int) int GetCategories func(childComplexity int) int // contains filtered or unexported fields } WGS84Position struct { Lat func(childComplexity int) int Lon func(childComplexity int) int } // contains filtered or unexported fields }
type Config ¶
type Config struct { Resolvers ResolverRoot Directives DirectiveRoot Complexity ComplexityRoot }
type DirectiveRoot ¶
type DirectiveRoot struct { }
type Entity ¶
type Entity struct { FindProblemReportByID *ProblemReport `json:"findProblemReportByID"` FindProblemReportCategoryByID *ProblemReportCategory `json:"findProblemReportCategoryByID"` }
type EntityResolver ¶
type EntityResolver interface { FindProblemReportByID(ctx context.Context, id string) (*ProblemReport, error) FindProblemReportCategoryByID(ctx context.Context, id string) (*ProblemReportCategory, error) }
type MutationResolver ¶
type MutationResolver interface {
Create(ctx context.Context, input ProblemReportCreateResource) (*ProblemReport, error)
}
type ProblemReport ¶
type ProblemReport struct { ID string `json:"id"` Pos *WGS84Position `json:"pos"` Type string `json:"type"` }
func (ProblemReport) Is_Entity ¶
func (ProblemReport) Is_Entity()
type ProblemReportCategory ¶
type ProblemReportCategory struct { ID string `json:"id"` Label string `json:"label"` ReportType string `json:"reportType"` }
func (ProblemReportCategory) Is_Entity ¶
func (ProblemReportCategory) Is_Entity()
type ProblemReportCreateResource ¶
type ProblemReportCreateResource struct { Pos *ReportPosition `json:"pos"` Type string `json:"type"` }
type QueryResolver ¶
type QueryResolver interface { GetAll(ctx context.Context) ([]*ProblemReport, error) GetCategories(ctx context.Context) ([]*ProblemReportCategory, error) }
type ReportPosition ¶
type Resolver ¶
type Resolver struct{}
func (*Resolver) Entity ¶
func (r *Resolver) Entity() EntityResolver
func (*Resolver) Mutation ¶
func (r *Resolver) Mutation() MutationResolver
func (*Resolver) Query ¶
func (r *Resolver) Query() QueryResolver
type ResolverRoot ¶
type ResolverRoot interface { Entity() EntityResolver Mutation() MutationResolver Query() QueryResolver }
type WGS84Position ¶
Click to show internal directories.
Click to hide internal directories.