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 { Author struct { Anonymous func(childComplexity int) int Author func(childComplexity int) int } Mutation struct { AddSubbedTag func(childComplexity int, tag string) int Auth func(childComplexity int, email string) int BanUser func(childComplexity int, postID *uid.UID, threadID *uid.UID) int BlockPost func(childComplexity int, postID uid.UID) int BlockThread func(childComplexity int, threadID uid.UID) int DelSubbedTag func(childComplexity int, tag string) int EditTags func(childComplexity int, threadID uid.UID, mainTag string, subTags []string) int LockThread func(childComplexity int, threadID uid.UID) int PubPost func(childComplexity int, post entity.PostInput) int PubThread func(childComplexity int, thread entity.ThreadInput) int SetName func(childComplexity int, name string) int SyncTags func(childComplexity int, tags []string) int } NotiSlice struct { Notifications func(childComplexity int) int SliceInfo func(childComplexity int) int } Notification struct { Content func(childComplexity int) int EventTime func(childComplexity int) int HasRead func(childComplexity int) int Type func(childComplexity int) int } Post struct { Author func(childComplexity int) int Blocked func(childComplexity int) int Content func(childComplexity int) int CreatedAt func(childComplexity int) int ID func(childComplexity int) int QuotedCount func(childComplexity int) int Quotes func(childComplexity int) int } PostOutline struct { Author func(childComplexity int) int Content func(childComplexity int) int ID func(childComplexity int) int } PostSlice struct { Posts func(childComplexity int) int SliceInfo func(childComplexity int) int } Query struct { MainTags func(childComplexity int) int Notification func(childComplexity int, query entity.SliceQuery) int Post func(childComplexity int, id uid.UID) int Profile func(childComplexity int) int Recommended func(childComplexity int) int Tags func(childComplexity int, query *string, limit *int) int Thread func(childComplexity int, id uid.UID) int ThreadSlice func(childComplexity int, tags []string, query entity.SliceQuery) int UnreadNotiCount func(childComplexity int) int } QuotedNoti struct { Post func(childComplexity int) int QuotedPost func(childComplexity int) int ThreadID func(childComplexity int) int } RepliedNoti struct { FirstReplyID func(childComplexity int) int NewRepliesCount func(childComplexity int) int Thread func(childComplexity int) int } SliceInfo struct { FirstCursor func(childComplexity int) int HasNext func(childComplexity int) int LastCursor func(childComplexity int) int } SystemNoti struct { Content func(childComplexity int) int Title func(childComplexity int) int } Tag struct { IsMain func(childComplexity int) int Name func(childComplexity int) int } Thread struct { Author func(childComplexity int) int Blocked func(childComplexity int) int Catalog func(childComplexity int) int Content func(childComplexity int) int CreatedAt func(childComplexity int) int ID func(childComplexity int) int Locked func(childComplexity int) int MainTag func(childComplexity int) int Replies func(childComplexity int, query entity.SliceQuery) int ReplyCount func(childComplexity int) int SubTags func(childComplexity int) int Title func(childComplexity int) int } ThreadCatalogItem struct { CreatedAt func(childComplexity int) int PostID func(childComplexity int) int } ThreadOutline struct { Content func(childComplexity int) int ID func(childComplexity int) int MainTag func(childComplexity int) int SubTags func(childComplexity int) int Title func(childComplexity int) int } ThreadSlice struct { SliceInfo func(childComplexity int) int Threads func(childComplexity int) int } User struct { Email func(childComplexity int) int Name func(childComplexity int) int Posts func(childComplexity int, query entity.SliceQuery) int Role func(childComplexity int) int Tags func(childComplexity int) int Threads func(childComplexity int, query entity.SliceQuery) int } }
type Config ¶
type Config struct { Resolvers ResolverRoot Directives DirectiveRoot Complexity ComplexityRoot }
type DirectiveRoot ¶
type DirectiveRoot struct { }
type MutationResolver ¶
type MutationResolver interface { PubPost(ctx context.Context, post entity.PostInput) (*entity.Post, error) PubThread(ctx context.Context, thread entity.ThreadInput) (*entity.Thread, error) Auth(ctx context.Context, email string) (bool, error) SetName(ctx context.Context, name string) (*entity.User, error) SyncTags(ctx context.Context, tags []string) (*entity.User, error) AddSubbedTag(ctx context.Context, tag string) (*entity.User, error) DelSubbedTag(ctx context.Context, tag string) (*entity.User, error) BanUser(ctx context.Context, postID *uid.UID, threadID *uid.UID) (bool, error) BlockPost(ctx context.Context, postID uid.UID) (*entity.Post, error) LockThread(ctx context.Context, threadID uid.UID) (*entity.Thread, error) BlockThread(ctx context.Context, threadID uid.UID) (*entity.Thread, error) EditTags(ctx context.Context, threadID uid.UID, mainTag string, subTags []string) (*entity.Thread, error) }
type QueryResolver ¶
type QueryResolver interface { UnreadNotiCount(ctx context.Context) (int, error) Notification(ctx context.Context, query entity.SliceQuery) (*entity.NotiSlice, error) Post(ctx context.Context, id uid.UID) (*entity.Post, error) MainTags(ctx context.Context) ([]string, error) Recommended(ctx context.Context) ([]string, error) Tags(ctx context.Context, query *string, limit *int) ([]*entity.Tag, error) ThreadSlice(ctx context.Context, tags []string, query entity.SliceQuery) (*entity.ThreadSlice, error) Thread(ctx context.Context, id uid.UID) (*entity.Thread, error) Profile(ctx context.Context) (*entity.User, error) }
type ResolverRoot ¶
type ResolverRoot interface { Mutation() MutationResolver Query() QueryResolver User() UserResolver }
type UserResolver ¶
Click to show internal directories.
Click to hide internal directories.