generated

package
v0.0.0-...-6c79d6b Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2021 License: MIT Imports: 11 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 {
	AuthResponse struct {
		JwtToken     func(childComplexity int) int
		Message      func(childComplexity int) int
		RefreshToken func(childComplexity int) int
		Success      func(childComplexity int) int
		User         func(childComplexity int) int
	}

	Mutation struct {
		DeleteSession     func(childComplexity int, id string) int
		Login             func(childComplexity int, email string, passcode string) int
		RefreshToken      func(childComplexity int) int
		SaveSession       func(childComplexity int, input *model.SessionInput) int
		SignUp            func(childComplexity int, email string, passcode string, name string) int
		UpdateSessionInfo func(childComplexity int, id string, input *model.UpdateSessionInput) int
	}

	Query struct {
		Me       func(childComplexity int) int
		Session  func(childComplexity int, id string) int
		Sessions func(childComplexity int, filter *model.FilterType) int
	}

	Response struct {
		Message func(childComplexity int) int
		Success func(childComplexity int) int
		Token   func(childComplexity int) int
	}

	Session struct {
		Description func(childComplexity int) int
		Duration    func(childComplexity int) int
		End         func(childComplexity int) int
		ID          func(childComplexity int) int
		Owner       func(childComplexity int) int
		Start       func(childComplexity int) int
		Title       func(childComplexity int) int
		Ts          func(childComplexity int) int
	}

	User struct {
		Email func(childComplexity int) int
		ID    func(childComplexity int) int
		Name  func(childComplexity int) int
		Ts    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 {
	SignUp(ctx context.Context, email string, passcode string, name string) (*model.AuthResponse, error)
	Login(ctx context.Context, email string, passcode string) (*model.AuthResponse, error)
	RefreshToken(ctx context.Context) (*model.AuthResponse, error)
	SaveSession(ctx context.Context, input *model.SessionInput) (*model.Response, error)
	UpdateSessionInfo(ctx context.Context, id string, input *model.UpdateSessionInput) (*model.Response, error)
	DeleteSession(ctx context.Context, id string) (*model.Response, error)
}

type QueryResolver

type QueryResolver interface {
	Me(ctx context.Context) (*model.User, error)
	Session(ctx context.Context, id string) (*model.Session, error)
	Sessions(ctx context.Context, filter *model.FilterType) ([]*model.Session, 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