todo

package
v1.11.2 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Module

type Module struct{}

Module struct for the todo module

func (Module) Configure

func (Module) Configure(injector *dingo.Injector)

Configure registers the service graphql service

func (*Module) Depends

func (*Module) Depends() []dingo.Module

Depends marks for the user Module

type MutationResolver

type MutationResolver struct {
	// contains filtered or unexported fields
}

MutationResolver maps mutations

func (*MutationResolver) Inject

func (r *MutationResolver) Inject(resolver *UserResolver) *MutationResolver

Inject dependencies

func (*MutationResolver) TodoAdd

func (r *MutationResolver) TodoAdd(ctx context.Context, user string, task string) (*domain.Todo, error)

TodoAdd mutation

func (*MutationResolver) TodoDone

func (r *MutationResolver) TodoDone(ctx context.Context, todo string, done bool) (*domain.Todo, error)

TodoDone mutation

type Service

type Service struct{}

Service for the todo graphql service

func (*Service) Schema

func (*Service) Schema() []byte

Schema getter for graphql

func (*Service) Types added in v1.1.0

func (*Service) Types(types *graphql.Types)

Types define the mappings and resolvers for Todos

type UserResolver

type UserResolver struct {
	// contains filtered or unexported fields
}

UserResolver mapper between graphql and the todos backend

func (*UserResolver) Inject

func (r *UserResolver) Inject(todosBackend *infrastructure.TodoService) *UserResolver

Inject dependencies

func (*UserResolver) Todos

func (r *UserResolver) Todos(ctx context.Context, obj *userDomain.User) ([]*domain.Todo, error)

Todos getter

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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