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 { Barang struct { CreatedAt func(childComplexity int) int Harga func(childComplexity int) int ID func(childComplexity int) int Nama func(childComplexity int) int Stock func(childComplexity int) int UpdatedAt func(childComplexity int) int Vendor func(childComplexity int) int } Mutation struct { BuatBarang func(childComplexity int, input model.BarangBaru) int BuatUser func(childComplexity int, input model.UserBaru) int EditBarang func(childComplexity int, id string, input model.BarangBaru) int EditUser func(childComplexity int, id string, input model.EditUser) int EditUserPassword func(childComplexity int, id string, input model.EditUserPassword) int HapusBarang func(childComplexity int, id string) int HapusUser func(childComplexity int, id string) int LoginUser func(childComplexity int, input model.LoginUser) int RefreshToken func(childComplexity int, input model.RefreshTokenData) int } Query struct { BarangPakeID func(childComplexity int, id string) int ParseTokenData func(childComplexity int) int SemuaBarang func(childComplexity int) int SemuaUser func(childComplexity int) int UserPakeID func(childComplexity int, id string) int } TokenData struct { Role func(childComplexity int) int Username func(childComplexity int) int } User struct { Address func(childComplexity int) int CreatedAt func(childComplexity int) int Email func(childComplexity int) int ID func(childComplexity int) int LastLoginAt func(childComplexity int) int Latlng func(childComplexity int) int Nama func(childComplexity int) int Password func(childComplexity int) int Phone func(childComplexity int) int Role func(childComplexity int) int UpdatedAt func(childComplexity int) int Username 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 { BuatBarang(ctx context.Context, input model.BarangBaru) (*model.Barang, error) EditBarang(ctx context.Context, id string, input model.BarangBaru) (*model.Barang, error) HapusBarang(ctx context.Context, id string) (bool, error) BuatUser(ctx context.Context, input model.UserBaru) (*model.User, error) EditUser(ctx context.Context, id string, input model.EditUser) (*model.User, error) EditUserPassword(ctx context.Context, id string, input model.EditUserPassword) (bool, error) HapusUser(ctx context.Context, id string) (bool, error) LoginUser(ctx context.Context, input model.LoginUser) (string, error) RefreshToken(ctx context.Context, input model.RefreshTokenData) (string, error) }
type QueryResolver ¶
type QueryResolver interface { SemuaBarang(ctx context.Context) ([]*model.Barang, error) BarangPakeID(ctx context.Context, id string) (*model.Barang, error) SemuaUser(ctx context.Context) ([]*model.User, error) UserPakeID(ctx context.Context, id string) (*model.User, error) ParseTokenData(ctx context.Context) (*model.TokenData, error) }
type ResolverRoot ¶
type ResolverRoot interface { Mutation() MutationResolver Query() QueryResolver }
Click to show internal directories.
Click to hide internal directories.