graph

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

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

Go to latest
Published: May 16, 2019 License: MIT Imports: 10 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 {
	Concentrate struct {
		Gravity func(childComplexity int) int
		ID      func(childComplexity int) int
		Name    func(childComplexity int) int
		Urls    func(childComplexity int) int
		Vendor  func(childComplexity int) int
	}

	Mutation struct {
		AddConcentrateURL func(childComplexity int, input model.NewConcentrateURL) int
		AddVendorURL      func(childComplexity int, input model.NewVendorURL) int
		CreateConcentrate func(childComplexity int, input model.NewConcentrate) int
		CreateVendor      func(childComplexity int, input model.NewVendor) int
	}

	Query struct {
		Concentrates func(childComplexity int) int
		Vendors      func(childComplexity int) int
	}

	URL struct {
		Description func(childComplexity int) int
		ID          func(childComplexity int) int
		URL         func(childComplexity int) int
	}

	Vendor struct {
		Code func(childComplexity int) int
		ID   func(childComplexity int) int
		Name func(childComplexity int) int
		Urls func(childComplexity int) int
	}
}

type ConcentrateResolver

type ConcentrateResolver interface {
	Vendor(ctx context.Context, obj *model.Concentrate) (*model.Vendor, error)

	Urls(ctx context.Context, obj *model.Concentrate) ([]*model.URL, error)
}

type Config

type Config struct {
	Resolvers  ResolverRoot
	Directives DirectiveRoot
	Complexity ComplexityRoot
}

type DirectiveRoot

type DirectiveRoot struct {
}

type MutationResolver

type MutationResolver interface {
	CreateVendor(ctx context.Context, input model.NewVendor) (*model.Vendor, error)
	AddVendorURL(ctx context.Context, input model.NewVendorURL) (*model.URL, error)
	CreateConcentrate(ctx context.Context, input model.NewConcentrate) (*model.Concentrate, error)
	AddConcentrateURL(ctx context.Context, input model.NewConcentrateURL) (*model.URL, error)
}

type QueryResolver

type QueryResolver interface {
	Vendors(ctx context.Context) ([]model.Vendor, error)
	Concentrates(ctx context.Context) ([]model.Concentrate, error)
}

type ResolverRoot

type ResolverRoot interface {
	Concentrate() ConcentrateResolver
	Mutation() MutationResolver
	Query() QueryResolver
	Vendor() VendorResolver
}

type VendorResolver

type VendorResolver interface {
	Urls(ctx context.Context, obj *model.Vendor) ([]*model.URL, error)
}

Jump to

Keyboard shortcuts

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