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 AgentInput ¶
type AgentResolver ¶
type AuthorInput ¶
type AuthorResolver ¶
type BookResolver ¶
type ComplexityRoot ¶
type ComplexityRoot struct { Agent struct { Authors func(childComplexity int) int Email func(childComplexity int) int ID func(childComplexity int) int Name func(childComplexity int) int } Author struct { Agent func(childComplexity int) int Books func(childComplexity int) int ID func(childComplexity int) int Name func(childComplexity int) int Website func(childComplexity int) int } Book struct { Authors func(childComplexity int) int Cover func(childComplexity int) int Description func(childComplexity int) int ID func(childComplexity int) int Title func(childComplexity int) int } Mutation struct { CreateAgent func(childComplexity int, data AgentInput) int CreateAuthor func(childComplexity int, data AuthorInput) int CreateBook func(childComplexity int, data BookInput) int DeleteAgent func(childComplexity int, id int64) int DeleteAuthor func(childComplexity int, id int64) int DeleteBook func(childComplexity int, id int64) int UpdateAgent func(childComplexity int, id int64, data AgentInput) int UpdateAuthor func(childComplexity int, id int64, data AuthorInput) int UpdateBook func(childComplexity int, id int64, data BookInput) int } Query struct { Agent func(childComplexity int, id int64) int Agents func(childComplexity int) int Author func(childComplexity int, id int64) int Authors func(childComplexity int) int Book func(childComplexity int, id int64) int Books 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 { CreateAgent(ctx context.Context, data AgentInput) (*sqlc.Agent, error) UpdateAgent(ctx context.Context, id int64, data AgentInput) (*sqlc.Agent, error) DeleteAgent(ctx context.Context, id int64) (*sqlc.Agent, error) CreateAuthor(ctx context.Context, data AuthorInput) (*sqlc.Author, error) UpdateAuthor(ctx context.Context, id int64, data AuthorInput) (*sqlc.Author, error) DeleteAuthor(ctx context.Context, id int64) (*sqlc.Author, error) CreateBook(ctx context.Context, data BookInput) (*sqlc.Book, error) UpdateBook(ctx context.Context, id int64, data BookInput) (*sqlc.Book, error) DeleteBook(ctx context.Context, id int64) (*sqlc.Book, error) }
type QueryResolver ¶
type QueryResolver interface { Agent(ctx context.Context, id int64) (*sqlc.Agent, error) Agents(ctx context.Context) ([]sqlc.Agent, error) Author(ctx context.Context, id int64) (*sqlc.Author, error) Authors(ctx context.Context) ([]sqlc.Author, error) Book(ctx context.Context, id int64) (*sqlc.Book, error) Books(ctx context.Context) ([]sqlc.Book, error) }
type ResolverRoot ¶
type ResolverRoot interface { Agent() AgentResolver Author() AuthorResolver Book() BookResolver Mutation() MutationResolver Query() QueryResolver }
Click to show internal directories.
Click to hide internal directories.