ent_project

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2023 License: GPL-3.0 Imports: 16 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.

func NewSchema

func NewSchema(client *ent.Client) graphql.ExecutableSchema

NewSchema creates a graphql executable schema.

Types

type ComplexityRoot

type ComplexityRoot struct {
	Company struct {
		Countries     func(childComplexity int, after *ent.Cursor, first *int, before *ent.Cursor, last *int, orderBy *ent.CountryOrder, where *ent.CountryWhereInput) int
		CoverImage    func(childComplexity int) int
		Description   func(childComplexity int) int
		Emails        func(childComplexity int, after *ent.Cursor, first *int, before *ent.Cursor, last *int, orderBy *ent.EmailOrder, where *ent.EmailWhereInput) int
		GalleryImages func(childComplexity int, after *ent.Cursor, first *int, before *ent.Cursor, last *int, orderBy *ent.ImageOrder, where *ent.ImageWhereInput) int
		ID            func(childComplexity int) int
		Locations     func(childComplexity int, after *ent.Cursor, first *int, before *ent.Cursor, last *int, orderBy *ent.LocationOrder, where *ent.LocationWhereInput) int
		LogoImage     func(childComplexity int) int
		Name          func(childComplexity int) int
		Phones        func(childComplexity int, after *ent.Cursor, first *int, before *ent.Cursor, last *int, orderBy *ent.PhoneOrder, where *ent.PhoneWhereInput) int
		Websites      func(childComplexity int, after *ent.Cursor, first *int, before *ent.Cursor, last *int, orderBy *ent.WebsiteOrder, where *ent.WebsiteWhereInput) int
	}

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

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

	Country struct {
		Code      func(childComplexity int) int
		Companies func(childComplexity int, after *ent.Cursor, first *int, before *ent.Cursor, last *int, orderBy *ent.CompanyOrder, where *ent.CompanyWhereInput) int
		Emails    func(childComplexity int, after *ent.Cursor, first *int, before *ent.Cursor, last *int, orderBy *ent.EmailOrder, where *ent.EmailWhereInput) int
		ID        func(childComplexity int) int
		Locations func(childComplexity int, after *ent.Cursor, first *int, before *ent.Cursor, last *int, orderBy *ent.LocationOrder, where *ent.LocationWhereInput) int
		Name      func(childComplexity int) int
		Phones    func(childComplexity int, after *ent.Cursor, first *int, before *ent.Cursor, last *int, orderBy *ent.PhoneOrder, where *ent.PhoneWhereInput) int
		Websites  func(childComplexity int, after *ent.Cursor, first *int, before *ent.Cursor, last *int, orderBy *ent.WebsiteOrder, where *ent.WebsiteWhereInput) int
	}

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

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

	Email struct {
		Address     func(childComplexity int) int
		Company     func(childComplexity int) int
		Country     func(childComplexity int) int
		Description func(childComplexity int) int
		ID          func(childComplexity int) int
		Title       func(childComplexity int) int
	}

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

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

	Image struct {
		CoverCompany   func(childComplexity int) int
		GalleryCompany func(childComplexity int) int
		ID             func(childComplexity int) int
		LogoCompany    func(childComplexity int) int
		OriginalURL    func(childComplexity int) int
		Title          func(childComplexity int) int
	}

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

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

	Location struct {
		Address     func(childComplexity int) int
		Company     func(childComplexity int) int
		Country     func(childComplexity int) int
		Description func(childComplexity int) int
		ID          func(childComplexity int) int
		Latitude    func(childComplexity int) int
		Longitude   func(childComplexity int) int
		Postcode    func(childComplexity int) int
		State       func(childComplexity int) int
		StreetName  func(childComplexity int) int
		StreetType  func(childComplexity int) int
		Suburb      func(childComplexity int) int
		Title       func(childComplexity int) int
		Type        func(childComplexity int) int
	}

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

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

	Mutation struct {
		CreateCompany    func(childComplexity int, input ent.CreateCompanyInput) int
		CreateCountry    func(childComplexity int, input ent.CreateCountryInput) int
		CreateEmail      func(childComplexity int, input ent.CreateEmailInput) int
		CreateImage      func(childComplexity int, input ent.CreateImageInput) int
		CreateLocation   func(childComplexity int, input ent.CreateLocationInput) int
		CreatePhone      func(childComplexity int, input ent.CreatePhoneInput) int
		CreateProduct    func(childComplexity int, input ent.CreateProductInput) int
		CreateVendor     func(childComplexity int, input ent.CreateVendorInput) int
		CreateWarehouse  func(childComplexity int, input ent.CreateWarehouseInput) int
		CreateWebsite    func(childComplexity int, input ent.CreateWebsiteInput) int
		DeleteCompanies  func(childComplexity int, where ent.CompanyWhereInput) int
		DeleteCountries  func(childComplexity int, where ent.CountryWhereInput) int
		DeleteEmails     func(childComplexity int, where ent.EmailWhereInput) int
		DeleteImages     func(childComplexity int, where ent.ImageWhereInput) int
		DeleteLocations  func(childComplexity int, where ent.LocationWhereInput) int
		DeletePhones     func(childComplexity int, where ent.PhoneWhereInput) int
		DeleteProducts   func(childComplexity int, where ent.ProductWhereInput) int
		DeleteVendors    func(childComplexity int, where ent.VendorWhereInput) int
		DeleteWarehouses func(childComplexity int, where ent.WarehouseWhereInput) int
		DeleteWebsites   func(childComplexity int, where ent.WebsiteWhereInput) int
		UpdateCompany    func(childComplexity int, id uuid.UUID, input ent.UpdateCompanyInput) int
		UpdateCountry    func(childComplexity int, id uuid.UUID, input ent.UpdateCountryInput) int
		UpdateEmail      func(childComplexity int, id uuid.UUID, input ent.UpdateEmailInput) int
		UpdateImage      func(childComplexity int, id uuid.UUID, input ent.UpdateImageInput) int
		UpdateLocation   func(childComplexity int, id uuid.UUID, input ent.UpdateLocationInput) int
		UpdatePhone      func(childComplexity int, id uuid.UUID, input ent.UpdatePhoneInput) int
		UpdateProduct    func(childComplexity int, id uuid.UUID, input ent.UpdateProductInput) int
		UpdateVendor     func(childComplexity int, id uuid.UUID, input ent.UpdateVendorInput) int
		UpdateWarehouse  func(childComplexity int, id uuid.UUID, input ent.UpdateWarehouseInput) int
		UpdateWebsite    func(childComplexity int, id uuid.UUID, input ent.UpdateWebsiteInput) int
	}

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

	Phone struct {
		Company     func(childComplexity int) int
		Country     func(childComplexity int) int
		Description func(childComplexity int) int
		ID          func(childComplexity int) int
		Number      func(childComplexity int) int
		Title       func(childComplexity int) int
		Type        func(childComplexity int) int
	}

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

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

	Product struct {
		BuildStatus func(childComplexity int) int
		CreatedAt   func(childComplexity int) int
		Description func(childComplexity int) int
		ID          func(childComplexity int) int
		Image       func(childComplexity int) int
		LastSell    func(childComplexity int) int
		Name        func(childComplexity int) int
		Status      func(childComplexity int) int
		URL         func(childComplexity int) int
		Vendor      func(childComplexity int) int
		Warehouse   func(childComplexity int) int
	}

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

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

	Query struct {
		Companies  func(childComplexity int, after *ent.Cursor, first *int, before *ent.Cursor, last *int, orderBy *ent.CompanyOrder, where *ent.CompanyWhereInput, q *string) int
		Countries  func(childComplexity int, after *ent.Cursor, first *int, before *ent.Cursor, last *int, orderBy *ent.CountryOrder, where *ent.CountryWhereInput, q *string) int
		Emails     func(childComplexity int, after *ent.Cursor, first *int, before *ent.Cursor, last *int, orderBy *ent.EmailOrder, where *ent.EmailWhereInput, q *string) int
		Images     func(childComplexity int, after *ent.Cursor, first *int, before *ent.Cursor, last *int, orderBy *ent.ImageOrder, where *ent.ImageWhereInput, q *string) int
		Locations  func(childComplexity int, after *ent.Cursor, first *int, before *ent.Cursor, last *int, orderBy *ent.LocationOrder, where *ent.LocationWhereInput, q *string) int
		Node       func(childComplexity int, id uuid.UUID) int
		Nodes      func(childComplexity int, ids []uuid.UUID) int
		Phones     func(childComplexity int, after *ent.Cursor, first *int, before *ent.Cursor, last *int, orderBy *ent.PhoneOrder, where *ent.PhoneWhereInput, q *string) int
		Products   func(childComplexity int, after *ent.Cursor, first *int, before *ent.Cursor, last *int, orderBy *ent.ProductOrder, where *ent.ProductWhereInput, q *string) int
		Vendors    func(childComplexity int, after *ent.Cursor, first *int, before *ent.Cursor, last *int, orderBy *ent.VendorOrder, where *ent.VendorWhereInput, q *string) int
		Warehouses func(childComplexity int, after *ent.Cursor, first *int, before *ent.Cursor, last *int, orderBy *ent.WarehouseOrder, where *ent.WarehouseWhereInput, q *string) int
		Websites   func(childComplexity int, after *ent.Cursor, first *int, before *ent.Cursor, last *int, orderBy *ent.WebsiteOrder, where *ent.WebsiteWhereInput, q *string) int
	}

	Vendor struct {
		ID         func(childComplexity int) int
		Name       func(childComplexity int) int
		Products   func(childComplexity int, after *ent.Cursor, first *int, before *ent.Cursor, last *int, orderBy *ent.ProductOrder, where *ent.ProductWhereInput) int
		Schema     func(childComplexity int) int
		Warehouses func(childComplexity int, after *ent.Cursor, first *int, before *ent.Cursor, last *int, orderBy *ent.WarehouseOrder, where *ent.WarehouseWhereInput) int
	}

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

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

	Warehouse struct {
		Enabled      func(childComplexity int) int
		Filters      func(childComplexity int) int
		ID           func(childComplexity int) int
		LastUpdate   func(childComplexity int) int
		Name         func(childComplexity int) int
		OriginalData func(childComplexity int) int
		Products     func(childComplexity int, after *ent.Cursor, first *int, before *ent.Cursor, last *int, orderBy *ent.ProductOrder, where *ent.ProductWhereInput) int
		Vendor       func(childComplexity int) int
	}

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

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

	Website struct {
		Company     func(childComplexity int) int
		Country     func(childComplexity int) int
		Description func(childComplexity int) int
		ID          func(childComplexity int) int
		Title       func(childComplexity int) int
		URL         func(childComplexity int) int
	}

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

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

type Config

type Config struct {
	Resolvers  ResolverRoot
	Directives DirectiveRoot
	Complexity ComplexityRoot
}

type DirectiveRoot

type DirectiveRoot struct {
}

type MutationResolver

type MutationResolver interface {
	CreateVendor(ctx context.Context, input ent.CreateVendorInput) (*ent.Vendor, error)
	UpdateVendor(ctx context.Context, id uuid.UUID, input ent.UpdateVendorInput) (*ent.Vendor, error)
	DeleteVendors(ctx context.Context, where ent.VendorWhereInput) (int, error)
	CreateWarehouse(ctx context.Context, input ent.CreateWarehouseInput) (*ent.Warehouse, error)
	UpdateWarehouse(ctx context.Context, id uuid.UUID, input ent.UpdateWarehouseInput) (*ent.Warehouse, error)
	DeleteWarehouses(ctx context.Context, where ent.WarehouseWhereInput) (int, error)
	CreateProduct(ctx context.Context, input ent.CreateProductInput) (*ent.Product, error)
	UpdateProduct(ctx context.Context, id uuid.UUID, input ent.UpdateProductInput) (*ent.Product, error)
	DeleteProducts(ctx context.Context, where ent.ProductWhereInput) (int, error)
	CreateCompany(ctx context.Context, input ent.CreateCompanyInput) (*ent.Company, error)
	UpdateCompany(ctx context.Context, id uuid.UUID, input ent.UpdateCompanyInput) (*ent.Company, error)
	DeleteCompanies(ctx context.Context, where ent.CompanyWhereInput) (int, error)
	CreateCountry(ctx context.Context, input ent.CreateCountryInput) (*ent.Country, error)
	UpdateCountry(ctx context.Context, id uuid.UUID, input ent.UpdateCountryInput) (*ent.Country, error)
	DeleteCountries(ctx context.Context, where ent.CountryWhereInput) (int, error)
	CreatePhone(ctx context.Context, input ent.CreatePhoneInput) (*ent.Phone, error)
	UpdatePhone(ctx context.Context, id uuid.UUID, input ent.UpdatePhoneInput) (*ent.Phone, error)
	DeletePhones(ctx context.Context, where ent.PhoneWhereInput) (int, error)
	CreateLocation(ctx context.Context, input ent.CreateLocationInput) (*ent.Location, error)
	UpdateLocation(ctx context.Context, id uuid.UUID, input ent.UpdateLocationInput) (*ent.Location, error)
	DeleteLocations(ctx context.Context, where ent.LocationWhereInput) (int, error)
	CreateWebsite(ctx context.Context, input ent.CreateWebsiteInput) (*ent.Website, error)
	UpdateWebsite(ctx context.Context, id uuid.UUID, input ent.UpdateWebsiteInput) (*ent.Website, error)
	DeleteWebsites(ctx context.Context, where ent.WebsiteWhereInput) (int, error)
	CreateEmail(ctx context.Context, input ent.CreateEmailInput) (*ent.Email, error)
	UpdateEmail(ctx context.Context, id uuid.UUID, input ent.UpdateEmailInput) (*ent.Email, error)
	DeleteEmails(ctx context.Context, where ent.EmailWhereInput) (int, error)
	CreateImage(ctx context.Context, input ent.CreateImageInput) (*ent.Image, error)
	UpdateImage(ctx context.Context, id uuid.UUID, input ent.UpdateImageInput) (*ent.Image, error)
	DeleteImages(ctx context.Context, where ent.ImageWhereInput) (int, error)
}

type QueryResolver

type QueryResolver interface {
	Node(ctx context.Context, id uuid.UUID) (ent.Noder, error)
	Nodes(ctx context.Context, ids []uuid.UUID) ([]ent.Noder, error)
	Companies(ctx context.Context, after *ent.Cursor, first *int, before *ent.Cursor, last *int, orderBy *ent.CompanyOrder, where *ent.CompanyWhereInput, q *string) (*ent.CompanyConnection, error)
	Countries(ctx context.Context, after *ent.Cursor, first *int, before *ent.Cursor, last *int, orderBy *ent.CountryOrder, where *ent.CountryWhereInput, q *string) (*ent.CountryConnection, error)
	Emails(ctx context.Context, after *ent.Cursor, first *int, before *ent.Cursor, last *int, orderBy *ent.EmailOrder, where *ent.EmailWhereInput, q *string) (*ent.EmailConnection, error)
	Images(ctx context.Context, after *ent.Cursor, first *int, before *ent.Cursor, last *int, orderBy *ent.ImageOrder, where *ent.ImageWhereInput, q *string) (*ent.ImageConnection, error)
	Locations(ctx context.Context, after *ent.Cursor, first *int, before *ent.Cursor, last *int, orderBy *ent.LocationOrder, where *ent.LocationWhereInput, q *string) (*ent.LocationConnection, error)
	Phones(ctx context.Context, after *ent.Cursor, first *int, before *ent.Cursor, last *int, orderBy *ent.PhoneOrder, where *ent.PhoneWhereInput, q *string) (*ent.PhoneConnection, error)
	Products(ctx context.Context, after *ent.Cursor, first *int, before *ent.Cursor, last *int, orderBy *ent.ProductOrder, where *ent.ProductWhereInput, q *string) (*ent.ProductConnection, error)
	Vendors(ctx context.Context, after *ent.Cursor, first *int, before *ent.Cursor, last *int, orderBy *ent.VendorOrder, where *ent.VendorWhereInput, q *string) (*ent.VendorConnection, error)
	Warehouses(ctx context.Context, after *ent.Cursor, first *int, before *ent.Cursor, last *int, orderBy *ent.WarehouseOrder, where *ent.WarehouseWhereInput, q *string) (*ent.WarehouseConnection, error)
	Websites(ctx context.Context, after *ent.Cursor, first *int, before *ent.Cursor, last *int, orderBy *ent.WebsiteOrder, where *ent.WebsiteWhereInput, q *string) (*ent.WebsiteConnection, error)
}

type Resolver

type Resolver struct {
	// contains filtered or unexported fields
}

Resolver is the resolver root.

func (*Resolver) Mutation

func (r *Resolver) Mutation() MutationResolver

Mutation returns MutationResolver implementation.

func (*Resolver) Query

func (r *Resolver) Query() QueryResolver

Query returns QueryResolver implementation.

type ResolverRoot

type ResolverRoot interface {
	Mutation() MutationResolver
	Query() QueryResolver
}

Jump to

Keyboard shortcuts

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