generated

package
v0.0.0-...-0d50045 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2020 License: GPL-3.0 Imports: 12 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 {
	Ingredient struct {
		From               func(childComplexity int) int
		PharmaceuticalForm func(childComplexity int) int
		Strength           func(childComplexity int) int
		Substance          func(childComplexity int) int
	}

	Medicine struct {
		Code          func(childComplexity int) int
		Ingredient    func(childComplexity int) int
		Name          func(childComplexity int) int
		PosologyNotes func(childComplexity int) int
	}

	PharmaceuticalForm struct {
		Code func(childComplexity int) int
		Name func(childComplexity int) int
	}

	Query struct {
		Medicines  func(childComplexity int) int
		Search     func(childComplexity int, filter *model.Filter) int
		Substances func(childComplexity int) int
	}

	Strength struct {
		Unit  func(childComplexity int) int
		Value func(childComplexity int) int
	}

	Substance struct {
		Code func(childComplexity int) int
		Name 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 {
	Medicines(ctx context.Context) ([]*model.Medicine, error)
	Substances(ctx context.Context) ([]*model.Substance, error)
	Search(ctx context.Context, filter *model.Filter) ([]*model.Medicine, error)
}

type ResolverRoot

type ResolverRoot interface {
	Query() QueryResolver
}

Jump to

Keyboard shortcuts

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