Documentation ¶
Index ¶
- func NewExecutableSchema(cfg Config) graphql.ExecutableSchema
- type ChannelResolver
- type ComplexityRoot
- type Config
- type DirectiveRoot
- type InstanceResolver
- type InviteResolver
- type MessageResolver
- type MutationResolver
- type NotificationResolver
- type QueryResolver
- type ResolverRoot
- type SubscriptionResolver
- type UserResolver
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 ChannelResolver ¶
type ChannelResolver interface { MessagesConnection(ctx context.Context, obj *model.Channel, last int, before string) (*model.ChannelMessagesConnection, error) Publishers(ctx context.Context, obj *model.Channel) ([]model.Role, error) Readers(ctx context.Context, obj *model.Channel) ([]model.Role, error) }
type ComplexityRoot ¶
type ComplexityRoot struct { AppBadgesConnection struct { Edges func(childComplexity int) int PageInfo func(childComplexity int) int } AppBadgesEdge struct { Cursor func(childComplexity int) int Node func(childComplexity int) int } Author struct { Avatar func(childComplexity int) int BanReason func(childComplexity int) int Bio func(childComplexity int) int CreatedAt func(childComplexity int) int ID func(childComplexity int) int InstanceID func(childComplexity int) int Name func(childComplexity int) int Roles func(childComplexity int) int UserID func(childComplexity int) int } Badge struct { ID func(childComplexity int) int Icon func(childComplexity int) int Name func(childComplexity int) int } Channel struct { CreatedAt func(childComplexity int) int ID func(childComplexity int) int InstanceID func(childComplexity int) int IsCategory func(childComplexity int) int IsComments func(childComplexity int) int LastMessageAddedAt func(childComplexity int) int MessageCount func(childComplexity int) int MessagesConnection func(childComplexity int, last int, before string) int Name func(childComplexity int) int Publishers func(childComplexity int) int Rank func(childComplexity int) int Readers func(childComplexity int) int UpdatedAt func(childComplexity int) int } ChannelMessagesConnection struct { Edges func(childComplexity int) int PageInfo func(childComplexity int) int } ChannelMessagesEdge struct { Cursor func(childComplexity int) int Node func(childComplexity int) int } Instance struct { Author func(childComplexity int) int AuthorsConnection func(childComplexity int, roles []model.Role, first int, after string) int ChannelsConnection func(childComplexity int, first int, after string) int CommentsCount func(childComplexity int) int CreatedAt func(childComplexity int) int Description func(childComplexity int) int ID func(childComplexity int) int Icon func(childComplexity int) int LikesConnection func(childComplexity int, first int, after string) int LikesCount func(childComplexity int) int Name func(childComplexity int) int ReadAccess func(childComplexity int) int ShowAuthor func(childComplexity int) int ShowChat func(childComplexity int) int ShowComments func(childComplexity int) int ShowLikes func(childComplexity int) int } InstanceAuthorsConnection struct { Edges func(childComplexity int) int PageInfo func(childComplexity int) int } InstanceAuthorsEdge struct { Cursor func(childComplexity int) int Node func(childComplexity int) int } InstanceChannelsConnection struct { Edges func(childComplexity int) int PageInfo func(childComplexity int) int } InstanceChannelsEdge struct { Cursor func(childComplexity int) int Node func(childComplexity int) int } InstanceLikesConnection struct { Edges func(childComplexity int) int PageInfo func(childComplexity int) int } InstanceLikesEdge struct { Cursor func(childComplexity int) int LikedAt func(childComplexity int) int Node func(childComplexity int) int } Invite struct { Author func(childComplexity int) int Code func(childComplexity int) int CreatedAt func(childComplexity int) int ExpiresAt func(childComplexity int) int ID func(childComplexity int) int Instance func(childComplexity int) int InstanceID func(childComplexity int) int Redemptions func(childComplexity int) int } Message struct { Author func(childComplexity int) int ChannelID func(childComplexity int) int CreatedAt func(childComplexity int) int ID func(childComplexity int) int ImageUrls func(childComplexity int) int RepliedMessage func(childComplexity int) int Text func(childComplexity int) int } Mutation struct { AddBadge func(childComplexity int, input model.BadgeInput) int AddChannel func(childComplexity int, input model.ChannelInput) int AddInstance func(childComplexity int, input model.InstanceInput) int AddInvite func(childComplexity int, input model.InviteInput) int AddLike func(childComplexity int, instanceID uuid.UUID) int AddMessage func(childComplexity int, input model.MessageInput) int AddRole func(childComplexity int, authorID uuid.UUID, role model.Role, banReason *string) int AssignBadge func(childComplexity int, userID uuid.UUID, badgeID uuid.UUID) int PinInstance func(childComplexity int, instanceID uuid.UUID, input model.InstancePinInput) int RedeemInvite func(childComplexity int, code string) int RemoveBadge func(childComplexity int, badgeID uuid.UUID) int RemoveChannel func(childComplexity int, channelID uuid.UUID) int RemoveInstance func(childComplexity int, instanceID uuid.UUID) int RemoveInvite func(childComplexity int, inviteID uuid.UUID) int RemoveLike func(childComplexity int, instanceID uuid.UUID) int RemoveMessage func(childComplexity int, messageID uuid.UUID) int RemoveRole func(childComplexity int, authorID uuid.UUID, role model.Role) int ReorderChannel func(childComplexity int, channelID uuid.UUID, input model.ChannelReorderInput) int ReorderInstance func(childComplexity int, instanceID uuid.UUID, input model.InstanceReorderInput) int UnassignBadge func(childComplexity int, userID uuid.UUID, badgeID uuid.UUID) int UpdateBadge func(childComplexity int, badgeID uuid.UUID, input model.BadgeInput) int UpdateChannel func(childComplexity int, channelID uuid.UUID, input model.ChannelInput) int UpdateInstance func(childComplexity int, instanceID uuid.UUID, input model.InstanceInput) int UpdateUser func(childComplexity int, input model.UserInput) int } Notice struct { Author func(childComplexity int) int Badge func(childComplexity int) int ChannelMessagesEdge func(childComplexity int) int Instance func(childComplexity int) int InstanceChannelsEdge func(childComplexity int) int InstanceLikesEdge func(childComplexity int) int Kind func(childComplexity int) int User func(childComplexity int) int UserInstancesEdge func(childComplexity int) int UserNotificationsEdge func(childComplexity int) int } Notification struct { Author func(childComplexity int) int Badge func(childComplexity int) int CreatedAt func(childComplexity int) int ID func(childComplexity int) int Instance func(childComplexity int) int Kind func(childComplexity int) int Message func(childComplexity int) int Reply func(childComplexity int) int } PageInfo struct { HasNextPage func(childComplexity int) int HasPreviousPage func(childComplexity int) int } Query struct { Author func(childComplexity int, id uuid.UUID) int Badges func(childComplexity int, first int, after string) int Channel func(childComplexity int, id uuid.UUID) int CheckInvite func(childComplexity int, code string) int Instance func(childComplexity int, id uuid.UUID) int InstanceUserListByIds func(childComplexity int, instanceID uuid.UUID, instanceUserIds []uuid.UUID) int Invite func(childComplexity int, instanceID uuid.UUID) int User func(childComplexity int) int UserBadges func(childComplexity int, userID uuid.UUID, first int, after string) int } Subscription struct { Stream func(childComplexity int, instanceID uuid.UUID) int } User struct { Avatar func(childComplexity int) int Bio func(childComplexity int) int ID func(childComplexity int) int InstancesConnection func(childComplexity int, first int, after string) int Name func(childComplexity int) int NotificationsConnection func(childComplexity int, last int, before string) int UID func(childComplexity int) int } UserBadgesConnection struct { Edges func(childComplexity int) int PageInfo func(childComplexity int) int } UserBadgesEdge struct { BadgedAt func(childComplexity int) int Count func(childComplexity int) int Cursor func(childComplexity int) int Node func(childComplexity int) int } UserInstancesConnection struct { Edges func(childComplexity int) int PageInfo func(childComplexity int) int } UserInstancesEdge struct { Cursor func(childComplexity int) int InstanceUser func(childComplexity int) int LikedByMe func(childComplexity int) int Node func(childComplexity int) int Pinned func(childComplexity int) int Rank func(childComplexity int) int } UserNotificationsConnection struct { Edges func(childComplexity int) int HasUnread func(childComplexity int) int PageInfo func(childComplexity int) int } UserNotificationsEdge struct { Cursor func(childComplexity int) int Node func(childComplexity int) int } }
type Config ¶
type Config struct { Schema *ast.Schema Resolvers ResolverRoot Directives DirectiveRoot Complexity ComplexityRoot }
type DirectiveRoot ¶
type InstanceResolver ¶
type InstanceResolver interface { Author(ctx context.Context, obj *model.Instance) (*model.Author, error) ReadAccess(ctx context.Context, obj *model.Instance) (model.Access, error) ChannelsConnection(ctx context.Context, obj *model.Instance, first int, after string) (*model.InstanceChannelsConnection, error) LikesConnection(ctx context.Context, obj *model.Instance, first int, after string) (*model.InstanceLikesConnection, error) AuthorsConnection(ctx context.Context, obj *model.Instance, roles []model.Role, first int, after string) (*model.InstanceAuthorsConnection, error) }
type InviteResolver ¶
type MessageResolver ¶
type MutationResolver ¶
type MutationResolver interface { UpdateUser(ctx context.Context, input model.UserInput) (*model.User, error) AddInstance(ctx context.Context, input model.InstanceInput) (*model.UserInstancesEdge, error) UpdateInstance(ctx context.Context, instanceID uuid.UUID, input model.InstanceInput) (*model.UserInstancesEdge, error) RemoveInstance(ctx context.Context, instanceID uuid.UUID) (*model.UserInstancesEdge, error) ReorderInstance(ctx context.Context, instanceID uuid.UUID, input model.InstanceReorderInput) (*model.UserInstancesEdge, error) PinInstance(ctx context.Context, instanceID uuid.UUID, input model.InstancePinInput) (*model.UserInstancesEdge, error) AddChannel(ctx context.Context, input model.ChannelInput) (*model.InstanceChannelsEdge, error) UpdateChannel(ctx context.Context, channelID uuid.UUID, input model.ChannelInput) (*model.InstanceChannelsEdge, error) ReorderChannel(ctx context.Context, channelID uuid.UUID, input model.ChannelReorderInput) (*model.InstanceChannelsEdge, error) RemoveChannel(ctx context.Context, channelID uuid.UUID) (*model.InstanceChannelsEdge, error) AddMessage(ctx context.Context, input model.MessageInput) (*model.ChannelMessagesEdge, error) RemoveMessage(ctx context.Context, messageID uuid.UUID) (*model.ChannelMessagesEdge, error) AddRole(ctx context.Context, authorID uuid.UUID, role model.Role, banReason *string) (*model.Author, error) RemoveRole(ctx context.Context, authorID uuid.UUID, role model.Role) (*model.Author, error) AddInvite(ctx context.Context, input model.InviteInput) (*model.Invite, error) RemoveInvite(ctx context.Context, inviteID uuid.UUID) (*model.Invite, error) RedeemInvite(ctx context.Context, code string) (*model.Invite, error) AddLike(ctx context.Context, instanceID uuid.UUID) (*model.InstanceLikesEdge, error) RemoveLike(ctx context.Context, instanceID uuid.UUID) (*model.InstanceLikesEdge, error) AddBadge(ctx context.Context, input model.BadgeInput) (*model.Badge, error) AssignBadge(ctx context.Context, userID uuid.UUID, badgeID uuid.UUID) (*model.Badge, error) UnassignBadge(ctx context.Context, userID uuid.UUID, badgeID uuid.UUID) (*model.Badge, error) UpdateBadge(ctx context.Context, badgeID uuid.UUID, input model.BadgeInput) (*model.Badge, error) RemoveBadge(ctx context.Context, badgeID uuid.UUID) (*model.Badge, error) }
type NotificationResolver ¶
type NotificationResolver interface { Kind(ctx context.Context, obj *model.Notification) (model.NotificationKind, error) Author(ctx context.Context, obj *model.Notification) (*model.Author, error) }
type QueryResolver ¶
type QueryResolver interface { User(ctx context.Context) (*model.User, error) Instance(ctx context.Context, id uuid.UUID) (*model.UserInstancesEdge, error) Channel(ctx context.Context, id uuid.UUID) (*model.Channel, error) Invite(ctx context.Context, instanceID uuid.UUID) (*model.Invite, error) CheckInvite(ctx context.Context, code string) (*model.Invite, error) Author(ctx context.Context, id uuid.UUID) (*model.Author, error) UserBadges(ctx context.Context, userID uuid.UUID, first int, after string) (*model.UserBadgesConnection, error) Badges(ctx context.Context, first int, after string) (*model.AppBadgesConnection, error) InstanceUserListByIds(ctx context.Context, instanceID uuid.UUID, instanceUserIds []uuid.UUID) ([]*model.Author, error) }
type ResolverRoot ¶
type ResolverRoot interface { Channel() ChannelResolver Instance() InstanceResolver Invite() InviteResolver Message() MessageResolver Mutation() MutationResolver Notification() NotificationResolver Query() QueryResolver Subscription() SubscriptionResolver User() UserResolver }
type SubscriptionResolver ¶
type UserResolver ¶
Click to show internal directories.
Click to hide internal directories.