graph

package
v0.5.8 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2024 License: MIT Imports: 19 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 AddCatPayloadResolver

type AddCatPayloadResolver interface {
	Cat(ctx context.Context, obj *model.AddCatPayload, filter *model.CatFiltersInput, order *model.CatOrder, first *int, offset *int, group []model.CatGroup) (*model.CatQueryResult, error)
}

type AddCompanyPayloadResolver

type AddCompanyPayloadResolver interface {
	Company(ctx context.Context, obj *model.AddCompanyPayload, filter *model.CompanyFiltersInput, order *model.CompanyOrder, first *int, offset *int, group []model.CompanyGroup) (*model.CompanyQueryResult, error)
}

type AddSmartPhonePayloadResolver added in v0.1.5

type AddSmartPhonePayloadResolver interface {
	SmartPhone(ctx context.Context, obj *model.AddSmartPhonePayload, filter *model.SmartPhoneFiltersInput, order *model.SmartPhoneOrder, first *int, offset *int, group []model.SmartPhoneGroup) (*model.SmartPhoneQueryResult, error)
}

type AddTodoPayloadResolver

type AddTodoPayloadResolver interface {
	Todo(ctx context.Context, obj *model.AddTodoPayload, filter *model.TodoFiltersInput, order *model.TodoOrder, first *int, offset *int, group []model.TodoGroup) (*model.TodoQueryResult, error)
}

type AddUserPayloadResolver

type AddUserPayloadResolver interface {
	User(ctx context.Context, obj *model.AddUserPayload, filter *model.UserFiltersInput, order *model.UserOrder, first *int, offset *int, group []model.UserGroup) (*model.UserQueryResult, error)
}

type ComplexityRoot

type ComplexityRoot struct {
	AddCatPayload struct {
		Affected func(childComplexity int) int
		Cat      func(childComplexity int, filter *model.CatFiltersInput, order *model.CatOrder, first *int, offset *int, group []model.CatGroup) int
	}

	AddCompanyPayload struct {
		Affected func(childComplexity int) int
		Company  func(childComplexity int, filter *model.CompanyFiltersInput, order *model.CompanyOrder, first *int, offset *int, group []model.CompanyGroup) int
	}

	AddSmartPhonePayload struct {
		Affected   func(childComplexity int) int
		SmartPhone func(childComplexity int, filter *model.SmartPhoneFiltersInput, order *model.SmartPhoneOrder, first *int, offset *int, group []model.SmartPhoneGroup) int
	}

	AddTodoPayload struct {
		Affected func(childComplexity int) int
		Todo     func(childComplexity int, filter *model.TodoFiltersInput, order *model.TodoOrder, first *int, offset *int, group []model.TodoGroup) int
	}

	AddUserPayload struct {
		Affected func(childComplexity int) int
		User     func(childComplexity int, filter *model.UserFiltersInput, order *model.UserOrder, first *int, offset *int, group []model.UserGroup) int
	}

	Cat struct {
		Age      func(childComplexity int) int
		Alive    func(childComplexity int) int
		BirthDay func(childComplexity int) int
		ID       func(childComplexity int) int
		Name     func(childComplexity int) int
		UserID   func(childComplexity int) int
	}

	CatQueryResult struct {
		Count      func(childComplexity int) int
		Data       func(childComplexity int) int
		TotalCount func(childComplexity int) int
	}

	Company struct {
		CreatedAt       func(childComplexity int) int
		Description     func(childComplexity int) int
		ID              func(childComplexity int) int
		MotherCompany   func(childComplexity int) int
		MotherCompanyID func(childComplexity int) int
		Name            func(childComplexity int) int
	}

	CompanyQueryResult struct {
		Count      func(childComplexity int) int
		Data       func(childComplexity int) int
		TotalCount func(childComplexity int) int
	}

	DeleteCatPayload struct {
		Cat   func(childComplexity int, filter *model.CatFiltersInput, order *model.CatOrder, first *int, offset *int, group []model.CatGroup) int
		Count func(childComplexity int) int
		Msg   func(childComplexity int) int
	}

	DeleteCompanyPayload struct {
		Company func(childComplexity int, filter *model.CompanyFiltersInput, order *model.CompanyOrder, first *int, offset *int, group []model.CompanyGroup) int
		Count   func(childComplexity int) int
		Msg     func(childComplexity int) int
	}

	DeleteSmartPhonePayload struct {
		Count      func(childComplexity int) int
		Msg        func(childComplexity int) int
		SmartPhone func(childComplexity int, filter *model.SmartPhoneFiltersInput, order *model.SmartPhoneOrder, first *int, offset *int, group []model.SmartPhoneGroup) int
	}

	DeleteTodoPayload struct {
		Count func(childComplexity int) int
		Msg   func(childComplexity int) int
		Todo  func(childComplexity int, filter *model.TodoFiltersInput, order *model.TodoOrder, first *int, offset *int, group []model.TodoGroup) int
	}

	DeleteUserPayload struct {
		Count func(childComplexity int) int
		Msg   func(childComplexity int) int
		User  func(childComplexity int, filter *model.UserFiltersInput, order *model.UserOrder, first *int, offset *int, group []model.UserGroup) int
	}

	Mutation struct {
		AddCat              func(childComplexity int, input []*model.CatInput) int
		AddCompany          func(childComplexity int, input []*model.CompanyInput) int
		AddSmartPhone       func(childComplexity int, input []*model.SmartPhoneInput) int
		AddTodo             func(childComplexity int, input []*model.TodoInput) int
		AddUser             func(childComplexity int, input []*model.UserInput) int
		AddUser2Todos       func(childComplexity int, input model.UserRef2TodosInput) int
		DeleteCat           func(childComplexity int, filter model.CatFiltersInput) int
		DeleteCompany       func(childComplexity int, filter model.CompanyFiltersInput) int
		DeleteSmartPhone    func(childComplexity int, filter model.SmartPhoneFiltersInput) int
		DeleteTodo          func(childComplexity int, filter model.TodoFiltersInput) int
		DeleteUser          func(childComplexity int, filter model.UserFiltersInput) int
		DeleteUserFromTodos func(childComplexity int, input model.UserRef2TodosInput) int
		UpdateCat           func(childComplexity int, input model.UpdateCatInput) int
		UpdateCompany       func(childComplexity int, input model.UpdateCompanyInput) int
		UpdateSmartPhone    func(childComplexity int, input model.UpdateSmartPhoneInput) int
		UpdateTodo          func(childComplexity int, input model.UpdateTodoInput) int
		UpdateUser          func(childComplexity int, input model.UpdateUserInput) int
	}

	NoSqlControl struct {
		A  func(childComplexity int) int
		B  func(childComplexity int) int
		ID func(childComplexity int) int
	}

	Query struct {
		GetCat          func(childComplexity int, id int) int
		GetCompany      func(childComplexity int, id int) int
		GetSmartPhone   func(childComplexity int, id int) int
		GetTodo         func(childComplexity int, id int) int
		GetUser         func(childComplexity int, id int) int
		QueryCat        func(childComplexity int, filter *model.CatFiltersInput, order *model.CatOrder, first *int, offset *int, group []model.CatGroup) int
		QueryCompany    func(childComplexity int, filter *model.CompanyFiltersInput, order *model.CompanyOrder, first *int, offset *int, group []model.CompanyGroup) int
		QuerySmartPhone func(childComplexity int, filter *model.SmartPhoneFiltersInput, order *model.SmartPhoneOrder, first *int, offset *int, group []model.SmartPhoneGroup) int
		QueryTodo       func(childComplexity int, filter *model.TodoFiltersInput, order *model.TodoOrder, first *int, offset *int, group []model.TodoGroup) int
		QueryUser       func(childComplexity int, filter *model.UserFiltersInput, order *model.UserOrder, first *int, offset *int, group []model.UserGroup) int
	}

	SmartPhone struct {
		Brand       func(childComplexity int) int
		ID          func(childComplexity int) int
		Phonenumber func(childComplexity int) int
		UserID      func(childComplexity int) int
	}

	SmartPhoneQueryResult struct {
		Count      func(childComplexity int) int
		Data       func(childComplexity int) int
		TotalCount func(childComplexity int) int
	}

	Todo struct {
		CreatedAt func(childComplexity int) int
		DeletedAt func(childComplexity int) int
		Etype1    func(childComplexity int) int
		Etype5    func(childComplexity int) int
		ID        func(childComplexity int) int
		Name      func(childComplexity int) int
		NoControl func(childComplexity int) int
		Owner     func(childComplexity int) int
		OwnerID   func(childComplexity int) int
		Test123   func(childComplexity int) int
		UpdatedAt func(childComplexity int) int
		Users     func(childComplexity int) int
	}

	TodoQueryResult struct {
		Count      func(childComplexity int) int
		Data       func(childComplexity int) int
		TotalCount func(childComplexity int) int
	}

	UpdateCatPayload struct {
		Affected func(childComplexity int) int
		Cat      func(childComplexity int, filter *model.CatFiltersInput, order *model.CatOrder, first *int, offset *int, group []model.CatGroup) int
		Count    func(childComplexity int) int
	}

	UpdateCompanyPayload struct {
		Affected func(childComplexity int) int
		Company  func(childComplexity int, filter *model.CompanyFiltersInput, order *model.CompanyOrder, first *int, offset *int, group []model.CompanyGroup) int
		Count    func(childComplexity int) int
	}

	UpdateSmartPhonePayload struct {
		Affected   func(childComplexity int) int
		Count      func(childComplexity int) int
		SmartPhone func(childComplexity int, filter *model.SmartPhoneFiltersInput, order *model.SmartPhoneOrder, first *int, offset *int, group []model.SmartPhoneGroup) int
	}

	UpdateTodoPayload struct {
		Affected func(childComplexity int) int
		Count    func(childComplexity int) int
		Todo     func(childComplexity int, filter *model.TodoFiltersInput, order *model.TodoOrder, first *int, offset *int, group []model.TodoGroup) int
	}

	UpdateUserPayload struct {
		Affected func(childComplexity int) int
		Count    func(childComplexity int) int
		User     func(childComplexity int, filter *model.UserFiltersInput, order *model.UserOrder, first *int, offset *int, group []model.UserGroup) int
	}

	User struct {
		Cat          func(childComplexity int) int
		Company      func(childComplexity int) int
		CompanyID    func(childComplexity int) int
		CreatedAt    func(childComplexity int) int
		DeletedAt    func(childComplexity int) int
		Email        func(childComplexity int) int
		FavoritColor func(childComplexity int) int
		ID           func(childComplexity int) int
		Money        func(childComplexity int) int
		Name         func(childComplexity int) int
		OtherDate    func(childComplexity int) int
		SmartPhones  func(childComplexity int) int
		UpdatedAt    func(childComplexity int) int
	}

	UserQueryResult struct {
		Count      func(childComplexity int) int
		Data       func(childComplexity int) int
		TotalCount func(childComplexity int) int
	}
}

type Config

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

type DeleteCatPayloadResolver

type DeleteCatPayloadResolver interface {
	Cat(ctx context.Context, obj *model.DeleteCatPayload, filter *model.CatFiltersInput, order *model.CatOrder, first *int, offset *int, group []model.CatGroup) (*model.CatQueryResult, error)
}

type DeleteCompanyPayloadResolver

type DeleteCompanyPayloadResolver interface {
	Company(ctx context.Context, obj *model.DeleteCompanyPayload, filter *model.CompanyFiltersInput, order *model.CompanyOrder, first *int, offset *int, group []model.CompanyGroup) (*model.CompanyQueryResult, error)
}

type DeleteSmartPhonePayloadResolver added in v0.1.5

type DeleteSmartPhonePayloadResolver interface {
	SmartPhone(ctx context.Context, obj *model.DeleteSmartPhonePayload, filter *model.SmartPhoneFiltersInput, order *model.SmartPhoneOrder, first *int, offset *int, group []model.SmartPhoneGroup) (*model.SmartPhoneQueryResult, error)
}

type DeleteTodoPayloadResolver

type DeleteTodoPayloadResolver interface {
	Todo(ctx context.Context, obj *model.DeleteTodoPayload, filter *model.TodoFiltersInput, order *model.TodoOrder, first *int, offset *int, group []model.TodoGroup) (*model.TodoQueryResult, error)
}

type DeleteUserPayloadResolver

type DeleteUserPayloadResolver interface {
	User(ctx context.Context, obj *model.DeleteUserPayload, filter *model.UserFiltersInput, order *model.UserOrder, first *int, offset *int, group []model.UserGroup) (*model.UserQueryResult, error)
}

type DirectiveRoot

type DirectiveRoot struct {
	VALIDATE func(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error)
}

type MutationResolver

type MutationResolver interface {
	AddCat(ctx context.Context, input []*model.CatInput) (*model.AddCatPayload, error)
	UpdateCat(ctx context.Context, input model.UpdateCatInput) (*model.UpdateCatPayload, error)
	DeleteCat(ctx context.Context, filter model.CatFiltersInput) (*model.DeleteCatPayload, error)
	AddCompany(ctx context.Context, input []*model.CompanyInput) (*model.AddCompanyPayload, error)
	UpdateCompany(ctx context.Context, input model.UpdateCompanyInput) (*model.UpdateCompanyPayload, error)
	DeleteCompany(ctx context.Context, filter model.CompanyFiltersInput) (*model.DeleteCompanyPayload, error)
	AddSmartPhone(ctx context.Context, input []*model.SmartPhoneInput) (*model.AddSmartPhonePayload, error)
	UpdateSmartPhone(ctx context.Context, input model.UpdateSmartPhoneInput) (*model.UpdateSmartPhonePayload, error)
	DeleteSmartPhone(ctx context.Context, filter model.SmartPhoneFiltersInput) (*model.DeleteSmartPhonePayload, error)
	AddUser2Todos(ctx context.Context, input model.UserRef2TodosInput) (*model.UpdateTodoPayload, error)
	DeleteUserFromTodos(ctx context.Context, input model.UserRef2TodosInput) (*model.DeleteTodoPayload, error)
	AddTodo(ctx context.Context, input []*model.TodoInput) (*model.AddTodoPayload, error)
	UpdateTodo(ctx context.Context, input model.UpdateTodoInput) (*model.UpdateTodoPayload, error)
	DeleteTodo(ctx context.Context, filter model.TodoFiltersInput) (*model.DeleteTodoPayload, error)
	AddUser(ctx context.Context, input []*model.UserInput) (*model.AddUserPayload, error)
	UpdateUser(ctx context.Context, input model.UpdateUserInput) (*model.UpdateUserPayload, error)
	DeleteUser(ctx context.Context, filter model.UserFiltersInput) (*model.DeleteUserPayload, error)
}

type QueryResolver

type QueryResolver interface {
	GetCat(ctx context.Context, id int) (*model.Cat, error)
	QueryCat(ctx context.Context, filter *model.CatFiltersInput, order *model.CatOrder, first *int, offset *int, group []model.CatGroup) (*model.CatQueryResult, error)
	GetCompany(ctx context.Context, id int) (*model.Company, error)
	QueryCompany(ctx context.Context, filter *model.CompanyFiltersInput, order *model.CompanyOrder, first *int, offset *int, group []model.CompanyGroup) (*model.CompanyQueryResult, error)
	GetSmartPhone(ctx context.Context, id int) (*model.SmartPhone, error)
	QuerySmartPhone(ctx context.Context, filter *model.SmartPhoneFiltersInput, order *model.SmartPhoneOrder, first *int, offset *int, group []model.SmartPhoneGroup) (*model.SmartPhoneQueryResult, error)
	GetTodo(ctx context.Context, id int) (*model.Todo, error)
	QueryTodo(ctx context.Context, filter *model.TodoFiltersInput, order *model.TodoOrder, first *int, offset *int, group []model.TodoGroup) (*model.TodoQueryResult, error)
	GetUser(ctx context.Context, id int) (*model.User, error)
	QueryUser(ctx context.Context, filter *model.UserFiltersInput, order *model.UserOrder, first *int, offset *int, group []model.UserGroup) (*model.UserQueryResult, error)
}

type Resolver

type Resolver struct{ Sql *db.AutoGqlDB }

func (*Resolver) AddCatPayload

func (r *Resolver) AddCatPayload() AddCatPayloadResolver

func (*Resolver) AddCompanyPayload

func (r *Resolver) AddCompanyPayload() AddCompanyPayloadResolver

func (*Resolver) AddSmartPhonePayload added in v0.1.5

func (r *Resolver) AddSmartPhonePayload() AddSmartPhonePayloadResolver

func (*Resolver) AddTodoPayload

func (r *Resolver) AddTodoPayload() AddTodoPayloadResolver

func (*Resolver) AddUserPayload

func (r *Resolver) AddUserPayload() AddUserPayloadResolver

func (*Resolver) DeleteCatPayload

func (r *Resolver) DeleteCatPayload() DeleteCatPayloadResolver

func (*Resolver) DeleteCompanyPayload

func (r *Resolver) DeleteCompanyPayload() DeleteCompanyPayloadResolver

func (*Resolver) DeleteSmartPhonePayload added in v0.1.5

func (r *Resolver) DeleteSmartPhonePayload() DeleteSmartPhonePayloadResolver

func (*Resolver) DeleteTodoPayload

func (r *Resolver) DeleteTodoPayload() DeleteTodoPayloadResolver

func (*Resolver) DeleteUserPayload

func (r *Resolver) DeleteUserPayload() DeleteUserPayloadResolver

func (*Resolver) Mutation

func (r *Resolver) Mutation() MutationResolver

Mutation returns MutationResolver implementation.

func (*Resolver) Query

func (r *Resolver) Query() QueryResolver

Query returns QueryResolver implementation.

func (*Resolver) UpdateCatPayload

func (r *Resolver) UpdateCatPayload() UpdateCatPayloadResolver

func (*Resolver) UpdateCompanyPayload

func (r *Resolver) UpdateCompanyPayload() UpdateCompanyPayloadResolver

func (*Resolver) UpdateSmartPhonePayload added in v0.1.5

func (r *Resolver) UpdateSmartPhonePayload() UpdateSmartPhonePayloadResolver

func (*Resolver) UpdateTodoPayload

func (r *Resolver) UpdateTodoPayload() UpdateTodoPayloadResolver

func (*Resolver) UpdateUserPayload

func (r *Resolver) UpdateUserPayload() UpdateUserPayloadResolver

type ResolverRoot

type ResolverRoot interface {
	AddCatPayload() AddCatPayloadResolver
	AddCompanyPayload() AddCompanyPayloadResolver
	AddSmartPhonePayload() AddSmartPhonePayloadResolver
	AddTodoPayload() AddTodoPayloadResolver
	AddUserPayload() AddUserPayloadResolver
	DeleteCatPayload() DeleteCatPayloadResolver
	DeleteCompanyPayload() DeleteCompanyPayloadResolver
	DeleteSmartPhonePayload() DeleteSmartPhonePayloadResolver
	DeleteTodoPayload() DeleteTodoPayloadResolver
	DeleteUserPayload() DeleteUserPayloadResolver
	Mutation() MutationResolver
	Query() QueryResolver
	UpdateCatPayload() UpdateCatPayloadResolver
	UpdateCompanyPayload() UpdateCompanyPayloadResolver
	UpdateSmartPhonePayload() UpdateSmartPhonePayloadResolver
	UpdateTodoPayload() UpdateTodoPayloadResolver
	UpdateUserPayload() UpdateUserPayloadResolver
}

type UpdateCatPayloadResolver

type UpdateCatPayloadResolver interface {
	Cat(ctx context.Context, obj *model.UpdateCatPayload, filter *model.CatFiltersInput, order *model.CatOrder, first *int, offset *int, group []model.CatGroup) (*model.CatQueryResult, error)
}

type UpdateCompanyPayloadResolver

type UpdateCompanyPayloadResolver interface {
	Company(ctx context.Context, obj *model.UpdateCompanyPayload, filter *model.CompanyFiltersInput, order *model.CompanyOrder, first *int, offset *int, group []model.CompanyGroup) (*model.CompanyQueryResult, error)
}

type UpdateSmartPhonePayloadResolver added in v0.1.5

type UpdateSmartPhonePayloadResolver interface {
	SmartPhone(ctx context.Context, obj *model.UpdateSmartPhonePayload, filter *model.SmartPhoneFiltersInput, order *model.SmartPhoneOrder, first *int, offset *int, group []model.SmartPhoneGroup) (*model.SmartPhoneQueryResult, error)
}

type UpdateTodoPayloadResolver

type UpdateTodoPayloadResolver interface {
	Todo(ctx context.Context, obj *model.UpdateTodoPayload, filter *model.TodoFiltersInput, order *model.TodoOrder, first *int, offset *int, group []model.TodoGroup) (*model.TodoQueryResult, error)
}

type UpdateUserPayloadResolver

type UpdateUserPayloadResolver interface {
	User(ctx context.Context, obj *model.UpdateUserPayload, filter *model.UserFiltersInput, order *model.UserOrder, first *int, offset *int, group []model.UserGroup) (*model.UserQueryResult, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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