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 {
}
type Config ¶
type Config = graphql.Config[ResolverRoot, DirectiveRoot, ComplexityRoot]
type DirectiveRoot ¶
type DirectiveRoot struct {
}
type InvoiceResolver ¶
type QueryResolver ¶
type QueryResolver interface {
Book(ctx context.Context, id string) (*Book, error)
Article(ctx context.Context, id string) (*Article, error)
Review(ctx context.Context, id string) (*Review, error)
Comment(ctx context.Context, id string) (*Comment, error)
Task(ctx context.Context, id string) (*Task, error)
Invoice(ctx context.Context, id string) (*Invoice, error)
}
type Resolver ¶
type Resolver struct{}
func (*Resolver) Invoice ¶
func (r *Resolver) Invoice() InvoiceResolver
Invoice returns InvoiceResolver implementation.
func (*Resolver) Query ¶
func (r *Resolver) Query() QueryResolver
Query returns QueryResolver implementation.
type ResolverRoot ¶
type ResolverRoot interface {
Invoice() InvoiceResolver
Query() QueryResolver
}
type Stub ¶
type Stub struct {
InvoiceResolver struct {
CreatedBy func(ctx context.Context, obj *Invoice) (*User, error)
ApprovedBy func(ctx context.Context, obj *Invoice) (*User, error)
}
QueryResolver struct {
Book func(ctx context.Context, id string) (*Book, error)
Article func(ctx context.Context, id string) (*Article, error)
Review func(ctx context.Context, id string) (*Review, error)
Comment func(ctx context.Context, id string) (*Comment, error)
Task func(ctx context.Context, id string) (*Task, error)
Invoice func(ctx context.Context, id string) (*Invoice, error)
}
}
func (*Stub) Invoice ¶
func (r *Stub) Invoice() InvoiceResolver
func (*Stub) Query ¶
func (r *Stub) Query() QueryResolver
type User ¶
type User struct {
ID string `json:"id"`
Name string `json:"name"`
Email string `json:"email"`
Phone *string `json:"phone,omitempty"`
Avatar *string `json:"avatar,omitempty"`
Role string `json:"role"`
Status string `json:"status"`
Language *string `json:"language,omitempty"`
Timezone *string `json:"timezone,omitempty"`
CreatedAt *string `json:"createdAt,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.