childfielddedup

package
v0.17.90 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2026 License: MIT Imports: 12 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 Article

type Article struct {
	ID       string  `json:"id"`
	Headline string  `json:"headline"`
	Author   *Author `json:"author"`
	Assignee *User   `json:"assignee,omitempty"`
}

type Author

type Author struct {
	ID    string `json:"id"`
	Name  string `json:"name"`
	Email string `json:"email"`
}

type Book

type Book struct {
	ID       string  `json:"id"`
	Title    string  `json:"title"`
	Author   *Author `json:"author"`
	Reviewer *User   `json:"reviewer,omitempty"`
	Editor   *User   `json:"editor,omitempty"`
}

type Comment

type Comment struct {
	ID        string `json:"id"`
	Text      string `json:"text"`
	Commenter *User  `json:"commenter"`
}

type ComplexityRoot

type ComplexityRoot struct {
}

type DirectiveRoot

type DirectiveRoot struct {
}

type Invoice

type Invoice struct {
	ID         string `json:"id"`
	Total      string `json:"total"`
	CreatedBy  *User  `json:"createdBy"`
	ApprovedBy *User  `json:"approvedBy,omitempty"`
}

type InvoiceResolver

type InvoiceResolver interface {
	CreatedBy(ctx context.Context, obj *Invoice) (*User, error)
	ApprovedBy(ctx context.Context, obj *Invoice) (*User, error)
}

type Query

type Query struct {
}

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 Review

type Review struct {
	ID        string  `json:"id"`
	Body      string  `json:"body"`
	Author    *Author `json:"author"`
	Moderator *User   `json:"moderator,omitempty"`
}

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 Task

type Task struct {
	ID       string `json:"id"`
	Title    string `json:"title"`
	Assignee *User  `json:"assignee"`
	Reporter *User  `json:"reporter,omitempty"`
}

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

Jump to

Keyboard shortcuts

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