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 ComplexityRoot ¶
type ComplexityRoot struct { Client struct { ID func(childComplexity int) int Invoices func(childComplexity int) int } Company struct { ID func(childComplexity int) int InvoiceTaxInclusive func(childComplexity int) int } Entity struct { FindClientByID func(childComplexity int, id hide.ID) int FindCompanyByID func(childComplexity int, id hide.ID) int } Invoice struct { Client func(childComplexity int) int CreatedBy func(childComplexity int) int DateDue func(childComplexity int) int ID func(childComplexity int) int LineItems func(childComplexity int) int Number func(childComplexity int) int PaymentStatus func(childComplexity int) int Status func(childComplexity int) int SubTotal func(childComplexity int) int Total func(childComplexity int) int TotalTax func(childComplexity int) int } LineItem struct { Description func(childComplexity int) int Name func(childComplexity int) int Quantity func(childComplexity int) int Tax func(childComplexity int) int TaxInclusive func(childComplexity int) int TaxRate func(childComplexity int) int Total func(childComplexity int) int UnitCost func(childComplexity int) int } Mutation struct { CreateInvoice func(childComplexity int, invoice model.InvoiceInput) int CreateInvoicePdf func(childComplexity int, id hide.ID) int UpdateCompanyTaxInclusive func(childComplexity int, invoiceTaxInclusive bool) int UpdateInvoice func(childComplexity int, id hide.ID, invoice model.InvoiceInput) int } Query struct { Invoice func(childComplexity int, id hide.ID) int Invoices func(childComplexity int, page *int) int PreviewInvoice func(childComplexity int, invoice model.InvoiceInput) int // contains filtered or unexported fields } User struct { ID func(childComplexity int) int } Service struct { SDL func(childComplexity int) int } }
type Config ¶
type Config struct { Resolvers ResolverRoot Directives DirectiveRoot Complexity ComplexityRoot }
type DirectiveRoot ¶
type DirectiveRoot struct { HasPerm func(ctx context.Context, obj interface{}, next graphql.Resolver, perm string) (res interface{}, err error) HasPerms func(ctx context.Context, obj interface{}, next graphql.Resolver, perms []string) (res interface{}, err error) IsAuthenticated func(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error) IsSecureAuthenticated func(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error) }
type EntityResolver ¶
type InvoiceResolver ¶
type InvoiceResolver interface { Status(ctx context.Context, obj *model.Invoice) (model.InvoiceStatus, error) PaymentStatus(ctx context.Context, obj *model.Invoice) (*model.InvoicePaymentStatus, error) Number(ctx context.Context, obj *model.Invoice) (string, error) CreatedBy(ctx context.Context, obj *model.Invoice) (*model.User, error) Client(ctx context.Context, obj *model.Invoice) (*model.Client, error) SubTotal(ctx context.Context, obj *model.Invoice) (float64, error) TotalTax(ctx context.Context, obj *model.Invoice) (float64, error) Total(ctx context.Context, obj *model.Invoice) (float64, error) }
type LineItemResolver ¶
type MutationResolver ¶
type MutationResolver interface { CreateInvoice(ctx context.Context, invoice model.InvoiceInput) (*model.Invoice, error) UpdateInvoice(ctx context.Context, id hide.ID, invoice model.InvoiceInput) (*model.Invoice, error) CreateInvoicePdf(ctx context.Context, id hide.ID) (string, error) UpdateCompanyTaxInclusive(ctx context.Context, invoiceTaxInclusive bool) (*model.Company, error) }
type QueryResolver ¶
type ResolverRoot ¶
type ResolverRoot interface { Entity() EntityResolver Invoice() InvoiceResolver LineItem() LineItemResolver Mutation() MutationResolver Query() QueryResolver }
Click to show internal directories.
Click to hide internal directories.