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 ResolverRoot ¶
type ResolverRoot interface { Mutation() MutationResolver Query() QueryResolver }
Click to show internal directories.
Click to hide internal directories.