generated

package
v0.0.0-...-273f3ac Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2021 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 CompanyResolver

type CompanyResolver interface {
	Departments(ctx context.Context, obj *model.Company) (*model.DepartmentPagination, error)
	Employees(ctx context.Context, obj *model.Company) (*model.EmployeePagination, error)
}

type ComplexityRoot

type ComplexityRoot struct {
	Company struct {
		CompanyName    func(childComplexity int) int
		Departments    func(childComplexity int) int
		Employees      func(childComplexity int) int
		ID             func(childComplexity int) int
		PhoneNumber    func(childComplexity int) int
		Representative func(childComplexity int) int
	}

	CompanyPagination struct {
		Nodes    func(childComplexity int) int
		PageInfo func(childComplexity int) int
	}

	Department struct {
		Company        func(childComplexity int) int
		DepartmentName func(childComplexity int) int
		Email          func(childComplexity int) int
		Employees      func(childComplexity int) int
		ID             func(childComplexity int) int
	}

	DepartmentPagination struct {
		Nodes    func(childComplexity int) int
		PageInfo func(childComplexity int) int
	}

	Employee struct {
		Company       func(childComplexity int) int
		Department    func(childComplexity int) int
		DependentsNum func(childComplexity int) int
		Email         func(childComplexity int) int
		Gender        func(childComplexity int) int
		ID            func(childComplexity int) int
		IsManager     func(childComplexity int) int
		LatestLoginAt func(childComplexity int) int
		Name          func(childComplexity int) int
	}

	EmployeePagination struct {
		Nodes    func(childComplexity int) int
		PageInfo func(childComplexity int) int
	}

	Mutation struct {
		CreateCompany    func(childComplexity int, input model.CreateCompanyInput) int
		CreateDepartment func(childComplexity int, input model.CreateDepartmentInput) int
		CreateEmployee   func(childComplexity int, input model.CreateEmployeeInput) int
		DeleteCompany    func(childComplexity int, id string) int
		DeleteDepartment func(childComplexity int, id string) int
		DeleteEmployee   func(childComplexity int, id string) int
		UpdateCompany    func(childComplexity int, input model.UpdateCompanyInput) int
		UpdateDepartment func(childComplexity int, input model.UpdateDepartmentInput) int
		UpdateEmployee   func(childComplexity int, input model.UpdateEmployeeInput) int
	}

	PaginationInfo struct {
		Count            func(childComplexity int) int
		HasNextPage      func(childComplexity int) int
		HasPreviousPage  func(childComplexity int) int
		Page             func(childComplexity int) int
		PaginationLength func(childComplexity int) int
		TotalCount       func(childComplexity int) int
	}

	Query struct {
		Companies   func(childComplexity int, limit int, offset *int) int
		Company     func(childComplexity int, id string) int
		Department  func(childComplexity int, id string) int
		Departments func(childComplexity int, limit int, offset *int) int
		Employee    func(childComplexity int, id string) int
		Employees   func(childComplexity int, limit int, offset *int, email *string, gender *model.Gender, isManager *bool, hasDependent *bool) int
	}
}

type Config

type Config struct {
	Resolvers  ResolverRoot
	Directives DirectiveRoot
	Complexity ComplexityRoot
}

type DepartmentResolver

type DepartmentResolver interface {
	Company(ctx context.Context, obj *model.Department) (*model.Company, error)
	Employees(ctx context.Context, obj *model.Department) (*model.EmployeePagination, error)
}

type DirectiveRoot

type DirectiveRoot struct {
}

type EmployeeResolver

type EmployeeResolver interface {
	Department(ctx context.Context, obj *model.Employee) (*model.Department, error)
	Company(ctx context.Context, obj *model.Employee) (*model.Company, error)
}

type MutationResolver

type MutationResolver interface {
	CreateCompany(ctx context.Context, input model.CreateCompanyInput) (*model.Company, error)
	UpdateCompany(ctx context.Context, input model.UpdateCompanyInput) (*model.Company, error)
	DeleteCompany(ctx context.Context, id string) (bool, error)
	CreateDepartment(ctx context.Context, input model.CreateDepartmentInput) (*model.Department, error)
	UpdateDepartment(ctx context.Context, input model.UpdateDepartmentInput) (*model.Department, error)
	DeleteDepartment(ctx context.Context, id string) (bool, error)
	CreateEmployee(ctx context.Context, input model.CreateEmployeeInput) (*model.Employee, error)
	UpdateEmployee(ctx context.Context, input model.UpdateEmployeeInput) (*model.Employee, error)
	DeleteEmployee(ctx context.Context, id string) (bool, error)
}

type QueryResolver

type QueryResolver interface {
	Company(ctx context.Context, id string) (*model.Company, error)
	Companies(ctx context.Context, limit int, offset *int) (*model.CompanyPagination, error)
	Department(ctx context.Context, id string) (*model.Department, error)
	Departments(ctx context.Context, limit int, offset *int) (*model.DepartmentPagination, error)
	Employee(ctx context.Context, id string) (*model.Employee, error)
	Employees(ctx context.Context, limit int, offset *int, email *string, gender *model.Gender, isManager *bool, hasDependent *bool) (*model.EmployeePagination, error)
}

type ResolverRoot

type ResolverRoot interface {
	Company() CompanyResolver
	Department() DepartmentResolver
	Employee() EmployeeResolver
	Mutation() MutationResolver
	Query() QueryResolver
}

Jump to

Keyboard shortcuts

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