generated

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2021 License: Apache-2.0 Imports: 13 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 {
	Category struct {
		ID       func(childComplexity int) int
		Name     func(childComplexity int) int
		Parent   func(childComplexity int) int
		Products func(childComplexity int) int
		Status   func(childComplexity int) int
	}

	CategoryCollection struct {
		Data  func(childComplexity int) int
		Total func(childComplexity int) int
	}

	Image struct {
		BasePath      func(childComplexity int) int
		Disk          func(childComplexity int) int
		ID            func(childComplexity int) int
		ImageableID   func(childComplexity int) int
		ImageableType func(childComplexity int) int
		Path          func(childComplexity int) int
		Type          func(childComplexity int) int
	}

	Login struct {
		Token func(childComplexity int) int
		User  func(childComplexity int) int
	}

	Mutation struct {
		Login    func(childComplexity int, email string, password string) int
		Register func(childComplexity int, data types.Register) int
	}

	Product struct {
		Category    func(childComplexity int) int
		Description func(childComplexity int) int
		ID          func(childComplexity int) int
		Images      func(childComplexity int) int
		Name        func(childComplexity int) int
		Price       func(childComplexity int) int
		Stock       func(childComplexity int) int
	}

	ProductCollection struct {
		Data  func(childComplexity int) int
		Total func(childComplexity int) int
	}

	Profile struct {
		Lastname func(childComplexity int) int
		Name     func(childComplexity int) int
	}

	Query struct {
		Categories func(childComplexity int, search *string, pagination int, page int, productsPagination int, productsPage int) int
		Category   func(childComplexity int, id int, productsPagination int, productsPage int) int
		Product    func(childComplexity int, id int) int
		Products   func(childComplexity int, search *string, pagination int, page int, category *int) int
	}

	User struct {
		Email   func(childComplexity int) int
		ID      func(childComplexity int) int
		Profile func(childComplexity int) int
		Type    func(childComplexity int) int
	}
}

type Config

type Config struct {
	Resolvers  ResolverRoot
	Directives DirectiveRoot
	Complexity ComplexityRoot
}

type DirectiveRoot

type DirectiveRoot struct {
}

type MutationResolver

type MutationResolver interface {
	Register(ctx context.Context, data types.Register) (*types.Login, error)
	Login(ctx context.Context, email string, password string) (*types.Login, error)
}

type QueryResolver

type QueryResolver interface {
	Categories(ctx context.Context, search *string, pagination int, page int, productsPagination int, productsPage int) (*types.CategoryCollection, error)
	Category(ctx context.Context, id int, productsPagination int, productsPage int) (*model.Category, error)
	Products(ctx context.Context, search *string, pagination int, page int, category *int) (*types.ProductCollection, error)
	Product(ctx context.Context, id int) (*model.Product, error)
}

type ResolverRoot

type ResolverRoot interface {
	Mutation() MutationResolver
	Query() QueryResolver
}

Jump to

Keyboard shortcuts

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