gqlgen

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2025 License: MIT Imports: 18 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 {
	AdminUser struct {
		AdminCreatedBy    func(childComplexity int) int
		AdminUpdatedBy    func(childComplexity int) int
		CreatedAt         func(childComplexity int) int
		DefaultRole       func(childComplexity int) int
		Email             func(childComplexity int) int
		FirstName         func(childComplexity int) int
		ID                func(childComplexity int) int
		LastName          func(childComplexity int) int
		Name              func(childComplexity int) int
		Password          func(childComplexity int) int
		RefAdminUpdatedBy func(childComplexity int) int
		Roles             func(childComplexity int) int
		UpdatedAt         func(childComplexity int) int
	}

	AdminUserConnection struct {
		Edges      func(childComplexity int) int
		PageInfo   func(childComplexity int) int
		TotalCount func(childComplexity int) int
	}

	AdminUserEdge struct {
		Cursor func(childComplexity int) int
		Node   func(childComplexity int) int
	}

	Edge struct {
		BelongsToCaption func(childComplexity int) int
		Caption          func(childComplexity int) int
		Name             func(childComplexity int) int
		Private          func(childComplexity int) int
		RelatedEntity    func(childComplexity int) int
		RelationType     func(childComplexity int) int
		Required         func(childComplexity int) int
	}

	Entity struct {
		Caption      func(childComplexity int) int
		Df           func(childComplexity int) int
		DisplayField func(childComplexity int) int
		Edges        func(childComplexity int) int
		Fields       func(childComplexity int) int
		Name         func(childComplexity int) int
		Owner        func(childComplexity int) int
		PluralName   func(childComplexity int) int
	}

	Field struct {
		AcceptedValues func(childComplexity int) int
		Caption        func(childComplexity int) int
		DefaultValue   func(childComplexity int) int
		Max            func(childComplexity int) int
		Min            func(childComplexity int) int
		Name           func(childComplexity int) int
		Private        func(childComplexity int) int
		Required       func(childComplexity int) int
		Type           func(childComplexity int) int
		Unique         func(childComplexity int) int
	}

	File struct {
		AdminCreatedBy  func(childComplexity int) int
		AdminUpdatedBy  func(childComplexity int) int
		Caption         func(childComplexity int) int
		CreatedAt       func(childComplexity int) int
		CreatedBy       func(childComplexity int) int
		ID              func(childComplexity int) int
		MimeType        func(childComplexity int) int
		Name            func(childComplexity int) int
		Size            func(childComplexity int) int
		StorageFileName func(childComplexity int) int
		UpdatedAt       func(childComplexity int) int
		UpdatedBy       func(childComplexity int) int
	}

	FileConnection struct {
		Edges      func(childComplexity int) int
		PageInfo   func(childComplexity int) int
		TotalCount func(childComplexity int) int
	}

	FileEdge struct {
		Cursor func(childComplexity int) int
		Node   func(childComplexity int) int
	}

	Mutation struct {
		CreateAdminUser       func(childComplexity int, data ent.CreateAdminUserInput) int
		CreateEntity          func(childComplexity int, data entity.CreateEntityInput) int
		CreateFile            func(childComplexity int, data ent.CreateFileInput) int
		CreateManyAdminUsers  func(childComplexity int, data []*ent.CreateAdminUserInput) int
		CreateManyFiles       func(childComplexity int, data []*ent.CreateFileInput) int
		CreateManyPermissions func(childComplexity int, data []*ent.CreatePermissionInput) int
		CreateManyRoles       func(childComplexity int, data []*ent.CreateRoleInput) int
		CreateManyUsers       func(childComplexity int, data []*ent.CreateUserInput) int
		CreatePermission      func(childComplexity int, data ent.CreatePermissionInput) int
		CreateRole            func(childComplexity int, data ent.CreateRoleInput) int
		CreateUser            func(childComplexity int, data ent.CreateUserInput) int
		DeleteAdminUser       func(childComplexity int, where ent.AdminUserWhereUniqueInput) int
		DeleteEntity          func(childComplexity int, where entity.EntityWhereUniqueInput) int
		DeleteFile            func(childComplexity int, where ent.FileWhereUniqueInput) int
		DeleteManyAdminUsers  func(childComplexity int, where ent.AdminUserWhereInput) int
		DeleteManyFiles       func(childComplexity int, where ent.FileWhereInput) int
		DeleteManyPermissions func(childComplexity int, where ent.PermissionWhereInput) int
		DeleteManyRoles       func(childComplexity int, where ent.RoleWhereInput) int
		DeleteManyUsers       func(childComplexity int, where ent.UserWhereInput) int
		DeletePermission      func(childComplexity int, where ent.PermissionWhereUniqueInput) int
		DeleteRole            func(childComplexity int, where ent.RoleWhereUniqueInput) int
		DeleteUser            func(childComplexity int, where ent.UserWhereUniqueInput) int
		UpdateAdminUser       func(childComplexity int, where ent.AdminUserWhereUniqueInput, data ent.UpdateAdminUserInput) int
		UpdateEntity          func(childComplexity int, where entity.EntityWhereUniqueInput, data entity.UpdateEntityInput) int
		UpdateFile            func(childComplexity int, where ent.FileWhereUniqueInput, data ent.UpdateFileInput) int
		UpdateManyAdminUsers  func(childComplexity int, where ent.AdminUserWhereInput, data ent.UpdateAdminUserInput) int
		UpdateManyFiles       func(childComplexity int, where ent.FileWhereInput, data ent.UpdateFileInput) int
		UpdateManyPermissions func(childComplexity int, where ent.PermissionWhereInput, data ent.UpdatePermissionInput) int
		UpdateManyRoles       func(childComplexity int, where ent.RoleWhereInput, data ent.UpdateRoleInput) int
		UpdateManyUsers       func(childComplexity int, where ent.UserWhereInput, data ent.UpdateUserInput) int
		UpdatePermission      func(childComplexity int, where ent.PermissionWhereUniqueInput, data ent.UpdatePermissionInput) int
		UpdateRole            func(childComplexity int, where ent.RoleWhereUniqueInput, data ent.UpdateRoleInput) int
		UpdateUser            func(childComplexity int, where ent.UserWhereUniqueInput, data ent.UpdateUserInput) int
		UpsertAdminUser       func(childComplexity int, data ent.CreateAdminUserInput) int
		UpsertFile            func(childComplexity int, data ent.CreateFileInput) int
		UpsertManyAdminUsers  func(childComplexity int, data []*ent.CreateAdminUserInput) int
		UpsertManyFiles       func(childComplexity int, data []*ent.CreateFileInput) int
		UpsertManyPermissions func(childComplexity int, data []*ent.CreatePermissionInput) int
		UpsertManyRoles       func(childComplexity int, data []*ent.CreateRoleInput) int
		UpsertManyUsers       func(childComplexity int, data []*ent.CreateUserInput) int
		UpsertPermission      func(childComplexity int, data ent.CreatePermissionInput) int
		UpsertRole            func(childComplexity int, data ent.CreateRoleInput) int
		UpsertUser            func(childComplexity int, data ent.CreateUserInput) int
	}

	PageInfo struct {
		EndCursor       func(childComplexity int) int
		HasNextPage     func(childComplexity int) int
		HasPreviousPage func(childComplexity int) int
		StartCursor     func(childComplexity int) int
	}

	Permission struct {
		AdminCreatedBy func(childComplexity int) int
		AdminUpdatedBy func(childComplexity int) int
		CreatedAt      func(childComplexity int) int
		Entity         func(childComplexity int) int
		ID             func(childComplexity int) int
		Operation      func(childComplexity int) int
		Role           func(childComplexity int) int
		UpdatedAt      func(childComplexity int) int
	}

	PermissionConnection struct {
		Edges      func(childComplexity int) int
		PageInfo   func(childComplexity int) int
		TotalCount func(childComplexity int) int
	}

	PermissionEdge struct {
		Cursor func(childComplexity int) int
		Node   func(childComplexity int) int
	}

	Query struct {
		AdminUsers            func(childComplexity int, where *ent.AdminUserWhereInput, orderBy *ent.AdminUserOrder, skip *int, first *int, last *int) int
		AdminUsersConnection  func(childComplexity int, where *ent.AdminUserWhereInput, orderBy *ent.AdminUserOrder, skip *int, first *int, last *int) int
		Entities              func(childComplexity int) int
		Entity                func(childComplexity int, where *entity.EntityWhereUniqueInput) int
		Fields                func(childComplexity int) int
		Files                 func(childComplexity int, where *ent.FileWhereInput, orderBy *ent.FileOrder, skip *int, first *int, last *int) int
		FilesConnection       func(childComplexity int, where *ent.FileWhereInput, orderBy *ent.FileOrder, skip *int, first *int, last *int) int
		Node                  func(childComplexity int, id string) int
		Nodes                 func(childComplexity int, ids []string) int
		Permissions           func(childComplexity int, where *ent.PermissionWhereInput, orderBy *ent.PermissionOrder, skip *int, first *int, last *int) int
		PermissionsConnection func(childComplexity int, where *ent.PermissionWhereInput, orderBy *ent.PermissionOrder, skip *int, first *int, last *int) int
		Roles                 func(childComplexity int, where *ent.RoleWhereInput, orderBy *ent.RoleOrder, skip *int, first *int, last *int) int
		RolesConnection       func(childComplexity int, where *ent.RoleWhereInput, orderBy *ent.RoleOrder, skip *int, first *int, last *int) int
		Users                 func(childComplexity int, where *ent.UserWhereInput, orderBy *ent.UserOrder, skip *int, first *int, last *int) int
		UsersConnection       func(childComplexity int, where *ent.UserWhereInput, orderBy *ent.UserOrder, skip *int, first *int, last *int) int
	}

	Role struct {
		AdminCreatedBy func(childComplexity int) int
		AdminUpdatedBy func(childComplexity int) int
		AdminUserRoles func(childComplexity int) int
		CreatedAt      func(childComplexity int) int
		ID             func(childComplexity int) int
		Name           func(childComplexity int) int
		Permissions    func(childComplexity int) int
		UpdatedAt      func(childComplexity int) int
		UserRoles      func(childComplexity int) int
	}

	RoleConnection struct {
		Edges      func(childComplexity int) int
		PageInfo   func(childComplexity int) int
		TotalCount func(childComplexity int) int
	}

	RoleEdge struct {
		Cursor func(childComplexity int) int
		Node   func(childComplexity int) int
	}

	Subscription struct {
		AppStatus func(childComplexity int) int
		Entities  func(childComplexity int) int
	}

	User struct {
		AdminCreatedBy func(childComplexity int) int
		AdminUpdatedBy func(childComplexity int) int
		CreatedBy      func(childComplexity int) int
		DefaultRole    func(childComplexity int) int
		Email          func(childComplexity int) int
		ID             func(childComplexity int) int
		Password       func(childComplexity int) int
		Roles          func(childComplexity int) int
		UpdatedBy      func(childComplexity int) int
	}

	UserConnection struct {
		Edges      func(childComplexity int) int
		PageInfo   func(childComplexity int) int
		TotalCount func(childComplexity int) int
	}

	UserEdge struct {
		Cursor func(childComplexity int) int
		Node   func(childComplexity int) int
	}
}

type Config

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

type CreateRoleInputResolver

type CreateRoleInputResolver interface {
	AdminUserRoleIDs(ctx context.Context, obj *ent.CreateRoleInput, data []string) error
}

type DirectiveRoot

type DirectiveRoot struct {
}

type EdgeResolver

type EdgeResolver interface {
	RelatedEntity(ctx context.Context, obj *entity.Edge) (*entity.Entity, error)
}

type EntityResolver

type EntityResolver interface {
	Df(ctx context.Context, obj *entity.Entity) (string, error)

	PluralName(ctx context.Context, obj *entity.Entity) (string, error)

	DisplayField(ctx context.Context, obj *entity.Entity) (*entity.Field, error)
	Fields(ctx context.Context, obj *entity.Entity) ([]*entity.Field, error)
	Edges(ctx context.Context, obj *entity.Entity) ([]*entity.Edge, error)
}

type MutationResolver

type MutationResolver interface {
	CreateAdminUser(ctx context.Context, data ent.CreateAdminUserInput) (*ent.AdminUser, error)
	CreateManyAdminUsers(ctx context.Context, data []*ent.CreateAdminUserInput) ([]*ent.AdminUser, error)
	UpdateAdminUser(ctx context.Context, where ent.AdminUserWhereUniqueInput, data ent.UpdateAdminUserInput) (*ent.AdminUser, error)
	UpdateManyAdminUsers(ctx context.Context, where ent.AdminUserWhereInput, data ent.UpdateAdminUserInput) (int, error)
	UpsertAdminUser(ctx context.Context, data ent.CreateAdminUserInput) (*ent.AdminUser, error)
	UpsertManyAdminUsers(ctx context.Context, data []*ent.CreateAdminUserInput) (int, error)
	DeleteAdminUser(ctx context.Context, where ent.AdminUserWhereUniqueInput) (*ent.AdminUser, error)
	DeleteManyAdminUsers(ctx context.Context, where ent.AdminUserWhereInput) (int, error)
	CreateEntity(ctx context.Context, data entity.CreateEntityInput) (*entity.Entity, error)
	UpdateEntity(ctx context.Context, where entity.EntityWhereUniqueInput, data entity.UpdateEntityInput) (*entity.Entity, error)
	DeleteEntity(ctx context.Context, where entity.EntityWhereUniqueInput) (*entity.Entity, error)
	CreateFile(ctx context.Context, data ent.CreateFileInput) (*ent.File, error)
	CreateManyFiles(ctx context.Context, data []*ent.CreateFileInput) ([]*ent.File, error)
	UpdateFile(ctx context.Context, where ent.FileWhereUniqueInput, data ent.UpdateFileInput) (*ent.File, error)
	UpdateManyFiles(ctx context.Context, where ent.FileWhereInput, data ent.UpdateFileInput) (int, error)
	UpsertFile(ctx context.Context, data ent.CreateFileInput) (*ent.File, error)
	UpsertManyFiles(ctx context.Context, data []*ent.CreateFileInput) (int, error)
	DeleteFile(ctx context.Context, where ent.FileWhereUniqueInput) (*ent.File, error)
	DeleteManyFiles(ctx context.Context, where ent.FileWhereInput) (int, error)
	CreatePermission(ctx context.Context, data ent.CreatePermissionInput) (*ent.Permission, error)
	CreateManyPermissions(ctx context.Context, data []*ent.CreatePermissionInput) ([]*ent.Permission, error)
	UpdatePermission(ctx context.Context, where ent.PermissionWhereUniqueInput, data ent.UpdatePermissionInput) (*ent.Permission, error)
	UpdateManyPermissions(ctx context.Context, where ent.PermissionWhereInput, data ent.UpdatePermissionInput) (int, error)
	UpsertPermission(ctx context.Context, data ent.CreatePermissionInput) (*ent.Permission, error)
	UpsertManyPermissions(ctx context.Context, data []*ent.CreatePermissionInput) (int, error)
	DeletePermission(ctx context.Context, where ent.PermissionWhereUniqueInput) (*ent.Permission, error)
	DeleteManyPermissions(ctx context.Context, where ent.PermissionWhereInput) (int, error)
	CreateRole(ctx context.Context, data ent.CreateRoleInput) (*ent.Role, error)
	CreateManyRoles(ctx context.Context, data []*ent.CreateRoleInput) ([]*ent.Role, error)
	UpdateRole(ctx context.Context, where ent.RoleWhereUniqueInput, data ent.UpdateRoleInput) (*ent.Role, error)
	UpdateManyRoles(ctx context.Context, where ent.RoleWhereInput, data ent.UpdateRoleInput) (int, error)
	UpsertRole(ctx context.Context, data ent.CreateRoleInput) (*ent.Role, error)
	UpsertManyRoles(ctx context.Context, data []*ent.CreateRoleInput) (int, error)
	DeleteRole(ctx context.Context, where ent.RoleWhereUniqueInput) (*ent.Role, error)
	DeleteManyRoles(ctx context.Context, where ent.RoleWhereInput) (int, error)
	CreateUser(ctx context.Context, data ent.CreateUserInput) (*ent.User, error)
	CreateManyUsers(ctx context.Context, data []*ent.CreateUserInput) ([]*ent.User, error)
	UpdateUser(ctx context.Context, where ent.UserWhereUniqueInput, data ent.UpdateUserInput) (*ent.User, error)
	UpdateManyUsers(ctx context.Context, where ent.UserWhereInput, data ent.UpdateUserInput) (int, error)
	UpsertUser(ctx context.Context, data ent.CreateUserInput) (*ent.User, error)
	UpsertManyUsers(ctx context.Context, data []*ent.CreateUserInput) (int, error)
	DeleteUser(ctx context.Context, where ent.UserWhereUniqueInput) (*ent.User, error)
	DeleteManyUsers(ctx context.Context, where ent.UserWhereInput) (int, error)
}

type QueryResolver

type QueryResolver interface {
	Node(ctx context.Context, id string) (ent.Noder, error)
	Nodes(ctx context.Context, ids []string) ([]ent.Noder, error)
	AdminUsers(ctx context.Context, where *ent.AdminUserWhereInput, orderBy *ent.AdminUserOrder, skip *int, first *int, last *int) ([]*ent.AdminUser, error)
	AdminUsersConnection(ctx context.Context, where *ent.AdminUserWhereInput, orderBy *ent.AdminUserOrder, skip *int, first *int, last *int) (*ent.AdminUserConnection, error)
	Entities(ctx context.Context) ([]*entity.Entity, error)
	Entity(ctx context.Context, where *entity.EntityWhereUniqueInput) (*entity.Entity, error)
	Fields(ctx context.Context) ([]*entity.Field, error)
	Files(ctx context.Context, where *ent.FileWhereInput, orderBy *ent.FileOrder, skip *int, first *int, last *int) ([]*ent.File, error)
	FilesConnection(ctx context.Context, where *ent.FileWhereInput, orderBy *ent.FileOrder, skip *int, first *int, last *int) (*ent.FileConnection, error)
	Permissions(ctx context.Context, where *ent.PermissionWhereInput, orderBy *ent.PermissionOrder, skip *int, first *int, last *int) ([]*ent.Permission, error)
	PermissionsConnection(ctx context.Context, where *ent.PermissionWhereInput, orderBy *ent.PermissionOrder, skip *int, first *int, last *int) (*ent.PermissionConnection, error)
	Roles(ctx context.Context, where *ent.RoleWhereInput, orderBy *ent.RoleOrder, skip *int, first *int, last *int) ([]*ent.Role, error)
	RolesConnection(ctx context.Context, where *ent.RoleWhereInput, orderBy *ent.RoleOrder, skip *int, first *int, last *int) (*ent.RoleConnection, error)
	Users(ctx context.Context, where *ent.UserWhereInput, orderBy *ent.UserOrder, skip *int, first *int, last *int) ([]*ent.User, error)
	UsersConnection(ctx context.Context, where *ent.UserWhereInput, orderBy *ent.UserOrder, skip *int, first *int, last *int) (*ent.UserConnection, error)
}

type ResolverRoot

type ResolverRoot interface {
	Edge() EdgeResolver
	Entity() EntityResolver
	Mutation() MutationResolver
	Query() QueryResolver
	Subscription() SubscriptionResolver
	CreateRoleInput() CreateRoleInputResolver
	UpdateRoleInput() UpdateRoleInputResolver
}

type Subscription

type Subscription struct {
}

type SubscriptionResolver

type SubscriptionResolver interface {
	AppStatus(ctx context.Context) (<-chan subscription.AppStatus, error)
	Entities(ctx context.Context) (<-chan []*entity.Entity, error)
}

type UpdateRoleInputResolver

type UpdateRoleInputResolver interface {
	AddAdminUserRoleIDs(ctx context.Context, obj *ent.UpdateRoleInput, data []string) error
	RemoveAdminUserRoleIDs(ctx context.Context, obj *ent.UpdateRoleInput, data []string) error
	ClearAdminUserRoles(ctx context.Context, obj *ent.UpdateRoleInput, data *bool) error
}

Jump to

Keyboard shortcuts

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