graph

package
v0.1.13 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2023 License: MIT Imports: 17 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) (*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) (*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) (*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) (*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) (*model.UserQueryResult, error)
}

type ComplexityRoot

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

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

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

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

	AddUserPayload struct {
		User func(childComplexity int, filter *model.UserFiltersInput, order *model.UserOrder, first *int, offset *int) 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) 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) 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) 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) 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) 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
		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
	}

	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) int
		QueryCompany    func(childComplexity int, filter *model.CompanyFiltersInput, order *model.CompanyOrder, first *int, offset *int) int
		QuerySmartPhone func(childComplexity int, filter *model.SmartPhoneFiltersInput, order *model.SmartPhoneOrder, first *int, offset *int) int
		QueryTodo       func(childComplexity int, filter *model.TodoFiltersInput, order *model.TodoOrder, first *int, offset *int) int
		QueryUser       func(childComplexity int, filter *model.UserFiltersInput, order *model.UserOrder, first *int, offset *int) 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
		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 {
		Cat   func(childComplexity int, filter *model.CatFiltersInput, order *model.CatOrder, first *int, offset *int) int
		Count func(childComplexity int) int
	}

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

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

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

	UpdateUserPayload struct {
		Count func(childComplexity int) int
		User  func(childComplexity int, filter *model.UserFiltersInput, order *model.UserOrder, first *int, offset *int) 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
		ID          func(childComplexity int) int
		Name        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 {
	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) (*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) (*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) (*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) (*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) (*model.UserQueryResult, error)
}

type DirectiveRoot

type DirectiveRoot struct {
}

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)
	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) (*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) (*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) (*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) (*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) (*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) (*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) (*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) (*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) (*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) (*model.UserQueryResult, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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