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 { Article struct { Content func(childComplexity int) int ID func(childComplexity int) int Subtitle func(childComplexity int) int Title func(childComplexity int) int } Blog struct { Content func(childComplexity int) int ID func(childComplexity int) int Subtitle func(childComplexity int) int Summary func(childComplexity int) int Tags func(childComplexity int) int Title func(childComplexity int) int } Mutation struct { CreateAccount func(childComplexity int, input *model.NewAccount) int CreateArticle func(childComplexity int, input model.NewArticle) int CreateBlog func(childComplexity int, input model.NewBlog) int CreatePost func(childComplexity int, input model.NewPost) int } NewTag struct { Name func(childComplexity int) int Value func(childComplexity int) int } Post struct { Content func(childComplexity int) int ID func(childComplexity int) int Tags func(childComplexity int) int Title func(childComplexity int) int } Query struct { Account func(childComplexity int, id string) int Accounts func(childComplexity int) int AccountsByProvider func(childComplexity int, provider *string) int Article func(childComplexity int, id string) int Articles func(childComplexity int) int Blog func(childComplexity int, id string) int Blogs func(childComplexity int) int Post func(childComplexity int, id string) int Posts func(childComplexity int) int } SocialMediaAccount struct { ID func(childComplexity int) int Provider func(childComplexity int) int ProviderID func(childComplexity int) int ProviderToken func(childComplexity int) int ProviderUsername func(childComplexity int) int } Tag struct { Name func(childComplexity int) int Value 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 { CreateArticle(ctx context.Context, input model.NewArticle) (*model.Article, error) CreateBlog(ctx context.Context, input model.NewBlog) (*model.Blog, error) CreatePost(ctx context.Context, input model.NewPost) (*model.Post, error) CreateAccount(ctx context.Context, input *model.NewAccount) (*model.SocialMediaAccount, error) }
type QueryResolver ¶
type QueryResolver interface { Article(ctx context.Context, id string) (*model.Article, error) Articles(ctx context.Context) ([]*model.Article, error) Blog(ctx context.Context, id string) (*model.Blog, error) Blogs(ctx context.Context) ([]*model.Blog, error) Post(ctx context.Context, id string) (*model.Post, error) Posts(ctx context.Context) ([]*model.Post, error) Account(ctx context.Context, id string) (*model.SocialMediaAccount, error) Accounts(ctx context.Context) ([]*model.SocialMediaAccount, error) AccountsByProvider(ctx context.Context, provider *string) ([]*model.SocialMediaAccount, error) }
type ResolverRoot ¶
type ResolverRoot interface { Mutation() MutationResolver Query() QueryResolver }
Click to show internal directories.
Click to hide internal directories.