generated

package
v0.0.0-...-b8d2545 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2024 License: MIT 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 {
	Mutation struct {
		PasswordEncrypt func(childComplexity int, password string) int
		UserCreate      func(childComplexity int, data model.UserInput) int
		UserLogin       func(childComplexity int, userName string, password string) int
		UserUpdate      func(childComplexity int, data model.UserInput) int
	}

	Query struct {
		UserGet  func(childComplexity int, userID *string) int
		UserList func(childComplexity int, userID string, statusCd string) int
	}

	TokenResponse struct {
		Expired func(childComplexity int) int
		Token   func(childComplexity int) int
		UserID  func(childComplexity int) int
	}

	User struct {
		IsAdmin  func(childComplexity int) int
		StatusCd func(childComplexity int) int
		UserID   func(childComplexity int) int
		UserNm   func(childComplexity int) int
	}
}

type Config

type Config struct {
	Schema     *ast.Schema
	Resolvers  ResolverRoot
	Directives DirectiveRoot
	Complexity ComplexityRoot
}

type DirectiveRoot

type DirectiveRoot struct {
}

type MutationResolver

type MutationResolver interface {
	UserLogin(ctx context.Context, userName string, password string) (*model.TokenResponse, error)
	UserCreate(ctx context.Context, data model.UserInput) (*model.User, error)
	UserUpdate(ctx context.Context, data model.UserInput) ([]*model.User, error)
	PasswordEncrypt(ctx context.Context, password string) (string, error)
}

type QueryResolver

type QueryResolver interface {
	UserGet(ctx context.Context, userID *string) (*model.User, error)
	UserList(ctx context.Context, userID string, statusCd string) ([]*model.User, 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