graph

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 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 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
	}

	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
	}

	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
		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
		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
		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
		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
		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
	}

	Todo struct {
		CreatedAt func(childComplexity int) int
		DeletedAt func(childComplexity int) int
		ID        func(childComplexity int) int
		Name      func(childComplexity int) int
		Owner     func(childComplexity int) int
		OwnerID   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
	}

	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
		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 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 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)
	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) 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) 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) UpdateTodoPayload

func (r *Resolver) UpdateTodoPayload() UpdateTodoPayloadResolver

func (*Resolver) UpdateUserPayload

func (r *Resolver) UpdateUserPayload() UpdateUserPayloadResolver

type ResolverRoot

type ResolverRoot interface {
	AddCatPayload() AddCatPayloadResolver
	AddCompanyPayload() AddCompanyPayloadResolver
	AddTodoPayload() AddTodoPayloadResolver
	AddUserPayload() AddUserPayloadResolver
	DeleteCatPayload() DeleteCatPayloadResolver
	DeleteCompanyPayload() DeleteCompanyPayloadResolver
	DeleteTodoPayload() DeleteTodoPayloadResolver
	DeleteUserPayload() DeleteUserPayloadResolver
	Mutation() MutationResolver
	Query() QueryResolver
	UpdateCatPayload() UpdateCatPayloadResolver
	UpdateCompanyPayload() UpdateCompanyPayloadResolver
	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 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