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 CommentResolver ¶
type ComplexityRoot ¶
type ComplexityRoot struct { Comment struct { Author func(childComplexity int) int Content func(childComplexity int) int Timestamp func(childComplexity int) int } CommentConnection struct { Edges func(childComplexity int) int PageInfo func(childComplexity int) int } CommentEdge struct { Cursor func(childComplexity int) int Node func(childComplexity int) int } Entry struct { AddedBy func(childComplexity int) int Comments func(childComplexity int, first *int, after *string) int HashValue func(childComplexity int) int ID func(childComplexity int) int PartOf func(childComplexity int, first *int, after *string) int Tags func(childComplexity int) int Timestamp func(childComplexity int) int } EntryConnection struct { Edges func(childComplexity int) int PageInfo func(childComplexity int) int } EntryEdge struct { Cursor func(childComplexity int) int Node func(childComplexity int) int } HashCheckerConfig struct { ChatNotice func(childComplexity int) int HashCheckMode func(childComplexity int) int SubscribedLists func(childComplexity int) int } List struct { Comments func(childComplexity int, first *int, after *string) int Creator func(childComplexity int) int Entries func(childComplexity int, first *int, after *string) int ID func(childComplexity int) int Maintainers func(childComplexity int, first *int, after *string) int Name func(childComplexity int) int Tags func(childComplexity int) int } ListConnection struct { Edges func(childComplexity int) int PageInfo func(childComplexity int) int } ListEdge struct { Cursor func(childComplexity int) int Node func(childComplexity int) int } Mutation struct { AddMxid func(childComplexity int, input model.AddMxid) int AddToLists func(childComplexity int, input model.AddToLists) int CommentEntry func(childComplexity int, input model.CommentEntry) int CommentList func(childComplexity int, input model.CommentList) int CreateEntry func(childComplexity int, input model.CreateEntry) int CreateList func(childComplexity int, input model.CreateList) int DeleteList func(childComplexity int, input string) int Login func(childComplexity int, input model.Login) int ReconfigureRoom func(childComplexity int, input model.RoomConfigUpdate) int Register func(childComplexity int, input model.Register) int RemoveFromLists func(childComplexity int, input model.RemoveFromLists) int RemoveMxid func(childComplexity int, input model.RemoveMxid) int SubscribeToList func(childComplexity int, input model.ListSubscriptionUpdate) int UnsubscribeFromList func(childComplexity int, input model.ListSubscriptionUpdate) int } PageInfo struct { EndCursor func(childComplexity int) int HasNextPage func(childComplexity int) int HasPreviousPage func(childComplexity int) int StartCursor func(childComplexity int) int } Query struct { Entries func(childComplexity int, first *int, after *string, filter *model.EntryFilter, sort *model.EntrySort) int Entry func(childComplexity int, id *string, hashValue *string) int List func(childComplexity int, id *string, name *string) int Lists func(childComplexity int, first *int, after *string, filter *model.ListFilter, sort *model.ListSort) int Room func(childComplexity int, id *string) int Rooms func(childComplexity int, first *int, after *string, filter *model.RoomFilter) int Self func(childComplexity int) int User func(childComplexity int, id *string, username *string) int Users func(childComplexity int, first *int, after *string, filter *model.UserFilter, sort *model.UserSort) int } Room struct { Active func(childComplexity int) int AdminPowerLevel func(childComplexity int) int Deactivated func(childComplexity int) int Debug func(childComplexity int) int HashCheckerConfig func(childComplexity int) int ID func(childComplexity int) int Name func(childComplexity int) int RoomID func(childComplexity int) int } RoomConnection struct { Edges func(childComplexity int) int PageInfo func(childComplexity int) int } RoomEdge struct { Cursor func(childComplexity int) int Node func(childComplexity int) int } User struct { Admin func(childComplexity int) int ID func(childComplexity int) int MatrixLinks func(childComplexity int) int PendingMatrixLinks func(childComplexity int) int Username func(childComplexity int) int } UserConnection struct { Edges func(childComplexity int) int PageInfo func(childComplexity int) int } UserEdge struct { Cursor func(childComplexity int) int Node func(childComplexity int) int } }
type Config ¶
type Config struct { Resolvers ResolverRoot Directives DirectiveRoot Complexity ComplexityRoot }
type DirectiveRoot ¶
type DirectiveRoot struct { HasRole func(ctx context.Context, obj interface{}, next graphql.Resolver, role model.UserRole) (res interface{}, err error) LoggedIn func(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error) Owner func(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error) }
type EntryResolver ¶
type EntryResolver interface { PartOf(ctx context.Context, obj *model.Entry, first *int, after *string) (*model.ListConnection, error) AddedBy(ctx context.Context, obj *model.Entry) (*model.User, error) Comments(ctx context.Context, obj *model.Entry, first *int, after *string) (*model.CommentConnection, error) }
type ListResolver ¶
type ListResolver interface { Creator(ctx context.Context, obj *model.List) (*model.User, error) Comments(ctx context.Context, obj *model.List, first *int, after *string) (*model.CommentConnection, error) Maintainers(ctx context.Context, obj *model.List, first *int, after *string) (*model.UserConnection, error) Entries(ctx context.Context, obj *model.List, first *int, after *string) (*model.EntryConnection, error) }
type MutationResolver ¶
type MutationResolver interface { Login(ctx context.Context, input model.Login) (string, error) Register(ctx context.Context, input model.Register) (string, error) AddMxid(ctx context.Context, input model.AddMxid) (*model.User, error) RemoveMxid(ctx context.Context, input model.RemoveMxid) (*model.User, error) ReconfigureRoom(ctx context.Context, input model.RoomConfigUpdate) (*model.Room, error) SubscribeToList(ctx context.Context, input model.ListSubscriptionUpdate) (*model.Room, error) UnsubscribeFromList(ctx context.Context, input model.ListSubscriptionUpdate) (*model.Room, error) CreateEntry(ctx context.Context, input model.CreateEntry) (*model.Entry, error) CommentEntry(ctx context.Context, input model.CommentEntry) (*model.Entry, error) AddToLists(ctx context.Context, input model.AddToLists) (*model.Entry, error) RemoveFromLists(ctx context.Context, input model.RemoveFromLists) (*model.Entry, error) CreateList(ctx context.Context, input model.CreateList) (*model.List, error) CommentList(ctx context.Context, input model.CommentList) (*model.List, error) DeleteList(ctx context.Context, input string) (bool, error) }
type QueryResolver ¶
type QueryResolver interface { Users(ctx context.Context, first *int, after *string, filter *model.UserFilter, sort *model.UserSort) (*model.UserConnection, error) Lists(ctx context.Context, first *int, after *string, filter *model.ListFilter, sort *model.ListSort) (*model.ListConnection, error) Entries(ctx context.Context, first *int, after *string, filter *model.EntryFilter, sort *model.EntrySort) (*model.EntryConnection, error) Rooms(ctx context.Context, first *int, after *string, filter *model.RoomFilter) (*model.RoomConnection, error) Room(ctx context.Context, id *string) (*model.Room, error) User(ctx context.Context, id *string, username *string) (*model.User, error) Entry(ctx context.Context, id *string, hashValue *string) (*model.Entry, error) List(ctx context.Context, id *string, name *string) (*model.List, error) Self(ctx context.Context) (*model.User, error) }
type ResolverRoot ¶
type ResolverRoot interface { Comment() CommentResolver Entry() EntryResolver List() ListResolver Mutation() MutationResolver Query() QueryResolver }
Click to show internal directories.
Click to hide internal directories.