Documentation ¶
Index ¶
- func NewExecutableSchema(cfg Config) graphql.ExecutableSchema
- type AddNewPostsInput
- type ChatMessageSchema
- type ChatRoomSchema
- type ComplexityRoot
- type Config
- type DirectiveRoot
- type FetchMainFeedPostsInput
- type FetchMainFeedPostsReturnType
- type GetUserProfileInput
- type GetUserProfileReturnType
- type ListSchema
- type MutationResolver
- type NewPostFooterStatisticsSubscriptionReturnType
- type NotificationSchema
- type PollResultReturnType
- type PollSchema
- type PostSchemaResolver
- type QueryResolver
- type ResolverRoot
- type SubscriptionResolver
- type UpdateUserProfileInput
- type UserVoteSchema
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 AddNewPostsInput ¶
type AddNewPostsInput struct { PostContents []string `json:"postContents"` PostImageURLsList [][]*string `json:"postImageURLsList"` PostVideoURLs []*string `json:"postVideoURLs"` PostGifURLs []*string `json:"postGifURLs"` SubwallSlug *string `json:"subwallSlug"` ParentPostUID string `json:"parentPostUID"` QuotingPostUID *string `json:"quotingPostUID"` WhoCanReply string `json:"whoCanReply"` }
type ChatMessageSchema ¶
type ChatMessageSchema struct { UID string `json:"uid"` CreatedAt string `json:"createdAt"` UpdatedAt string `json:"updatedAt"` ChatRoom *ChatRoomSchema `json:"chatRoom"` Content string `json:"content"` ImageURL string `json:"imageURL"` VideoURL string `json:"videoURL"` GifURL string `json:"gifURL"` CreatedBy *models.User `json:"createdBy"` }
type ChatRoomSchema ¶
type ComplexityRoot ¶
type ComplexityRoot struct { ChatMessageSchema struct { ChatRoom func(childComplexity int) int Content func(childComplexity int) int CreatedAt func(childComplexity int) int CreatedBy func(childComplexity int) int GifURL func(childComplexity int) int ImageURL func(childComplexity int) int UID func(childComplexity int) int UpdatedAt func(childComplexity int) int VideoURL func(childComplexity int) int } ChatRoomSchema struct { ChatRoomName func(childComplexity int) int CreatedAt func(childComplexity int) int ImageURL func(childComplexity int) int Members func(childComplexity int) int UID func(childComplexity int) int UpdatedAt func(childComplexity int) int } FetchMainFeedPostsReturnType struct { HasNext func(childComplexity int) int Posts func(childComplexity int) int } GetUserProfileReturnType struct { HasNext func(childComplexity int) int PinnedPost func(childComplexity int) int Posts func(childComplexity int) int ProfileUser func(childComplexity int) int } ListSchema struct { CreatedAt func(childComplexity int) int CreatedBy func(childComplexity int) int Description func(childComplexity int) int HeaderImageURL func(childComplexity int) int ImageURL func(childComplexity int) int IsPinned func(childComplexity int) int IsPrivate func(childComplexity int) int Members func(childComplexity int) int Name func(childComplexity int) int UID func(childComplexity int) int UpdatedAt func(childComplexity int) int } Mutation struct { AddNewPosts func(childComplexity int, input AddNewPostsInput) int FirebaseSignIn func(childComplexity int, firebaseUID string) int HandleClickLikeButton func(childComplexity int, targetPostUID string) int UpdateUserProfile func(childComplexity int, input UpdateUserProfileInput) int } IsLikedByCurrentUser func(childComplexity int) int IsRepostedByCurrentUser func(childComplexity int) int LikeButtonClickedByUID func(childComplexity int) int NumLikes func(childComplexity int) int NumQuotes func(childComplexity int) int NumReplies func(childComplexity int) int NumReposts func(childComplexity int) int RepostButtonClickedByUID func(childComplexity int) int TargetPostUID func(childComplexity int) int } NotificationSchema struct { CreatedAt func(childComplexity int) int NotificationType func(childComplexity int) int NotifyTo func(childComplexity int) int People func(childComplexity int) int SupplementalPost func(childComplexity int) int TargetPost func(childComplexity int) int UID func(childComplexity int) int UpdatedAt func(childComplexity int) int } PollResultReturnType struct { CurrentUserChoiceIdx func(childComplexity int) int IsAlreadyVotedByCurrentUser func(childComplexity int) int NumVotesForEachChoice func(childComplexity int) int PollCreatedByUID func(childComplexity int) int TargetPoll func(childComplexity int) int } PollSchema struct { CreatedAt func(childComplexity int) int ExpiresAt func(childComplexity int) int ParentPostUID func(childComplexity int) int PollChoiceTitles func(childComplexity int) int UID func(childComplexity int) int UpdatedAt func(childComplexity int) int } PostImageSchema struct { ImageURL func(childComplexity int) int } PostSchema struct { Content func(childComplexity int) int CreatedAt func(childComplexity int) int CreatedBy func(childComplexity int) int GifURL func(childComplexity int) int Images func(childComplexity int) int IsDeleted func(childComplexity int) int IsLikedByCurrentUser func(childComplexity int) int IsPinnedToProfile func(childComplexity int) int IsRepostedByCurrentUser func(childComplexity int) int NumLikes func(childComplexity int) int NumQuotes func(childComplexity int) int NumReplies func(childComplexity int) int NumReposts func(childComplexity int) int ParentPostUID func(childComplexity int) int PostedAt func(childComplexity int) int QuotedPost func(childComplexity int) int RepostedBy func(childComplexity int) int Subwall func(childComplexity int) int UID func(childComplexity int) int UpdatedAt func(childComplexity int) int VideoURL func(childComplexity int) int WhoCanReply func(childComplexity int) int } PostSubSchema struct { Content func(childComplexity int) int CreatedAt func(childComplexity int) int CreatedBy func(childComplexity int) int GifURL func(childComplexity int) int Images func(childComplexity int) int IsDeleted func(childComplexity int) int IsPinnedToProfile func(childComplexity int) int ParentPostUID func(childComplexity int) int PostedAt func(childComplexity int) int QuotedPost func(childComplexity int) int Subwall func(childComplexity int) int UID func(childComplexity int) int UpdatedAt func(childComplexity int) int VideoURL func(childComplexity int) int WhoCanReply func(childComplexity int) int } PostSubSchema2 struct { Content func(childComplexity int) int CreatedAt func(childComplexity int) int CreatedBy func(childComplexity int) int GifURL func(childComplexity int) int Images func(childComplexity int) int IsDeleted func(childComplexity int) int IsPinnedToProfile func(childComplexity int) int ParentPostUID func(childComplexity int) int PostedAt func(childComplexity int) int Subwall func(childComplexity int) int UID func(childComplexity int) int UpdatedAt func(childComplexity int) int VideoURL func(childComplexity int) int WhoCanReply func(childComplexity int) int } Query struct { FetchMainFeedPosts func(childComplexity int, input FetchMainFeedPostsInput) int GetUserByUsername func(childComplexity int, username string) int GetUserProfile func(childComplexity int, input GetUserProfileInput) int } Subscription struct { NewPostFooterStatisticsSubscription func(childComplexity int, currentUserUID string, targetPostUIDs []string) int } SubwallSchema struct { CreatedAt func(childComplexity int) int CreatedBy func(childComplexity int) int Description func(childComplexity int) int ExternalLink func(childComplexity int) int IsPrivate func(childComplexity int) int Slug func(childComplexity int) int SubwallHeaderImageURL func(childComplexity int) int SubwallImageURL func(childComplexity int) int SubwallName func(childComplexity int) int UID func(childComplexity int) int UpdatedAt func(childComplexity int) int } UserSchema struct { Biography func(childComplexity int) int CreatedAt func(childComplexity int) int DisplayName func(childComplexity int) int ExternalLink func(childComplexity int) int Location func(childComplexity int) int ProfileHeaderImageURL func(childComplexity int) int ProfileImageURL func(childComplexity int) int UID func(childComplexity int) int UpdatedAt func(childComplexity int) int Username func(childComplexity int) int } UserVoteSchema struct { ChoiceIndex func(childComplexity int) int CreatedAt func(childComplexity int) int TargetPoll func(childComplexity int) int UpdatedAt func(childComplexity int) int VotedBy func(childComplexity int) int } }
type Config ¶
type Config struct { Resolvers ResolverRoot Directives DirectiveRoot Complexity ComplexityRoot }
type DirectiveRoot ¶
type DirectiveRoot struct { }
type FetchMainFeedPostsInput ¶
type GetUserProfileInput ¶
type ListSchema ¶
type ListSchema struct { UID string `json:"uid"` CreatedAt string `json:"createdAt"` UpdatedAt string `json:"updatedAt"` Name string `json:"name"` Description string `json:"description"` ImageURL string `json:"imageURL"` HeaderImageURL string `json:"headerImageURL"` IsPrivate bool `json:"isPrivate"` IsPinned bool `json:"isPinned"` CreatedBy *models.User `json:"createdBy"` Members []*models.User `json:"members"` }
type MutationResolver ¶
type MutationResolver interface { FirebaseSignIn(ctx context.Context, firebaseUID string) (*models.User, error) UpdateUserProfile(ctx context.Context, input UpdateUserProfileInput) (*models.User, error) AddNewPosts(ctx context.Context, input AddNewPostsInput) (*models.Post, error) HandleClickLikeButton(ctx context.Context, targetPostUID string) (*bool, error) }
type NewPostFooterStatisticsSubscriptionReturnType ¶
type NewPostFooterStatisticsSubscriptionReturnType struct {}
type NotificationSchema ¶
type NotificationSchema struct { UID string `json:"uid"` CreatedAt string `json:"createdAt"` UpdatedAt string `json:"updatedAt"` People []*models.User `json:"people"` NotifyTo *models.User `json:"notifyTo"` NotificationType string `json:"notificationType"` TargetPost *models.Post `json:"targetPost"` SupplementalPost *models.Post `json:"supplementalPost"` }
type PollResultReturnType ¶
type PollResultReturnType struct { TargetPoll *PollSchema `json:"targetPoll"` CurrentUserChoiceIdx int `json:"currentUserChoiceIdx"` IsAlreadyVotedByCurrentUser bool `json:"isAlreadyVotedByCurrentUser"` NumVotesForEachChoice []int `json:"numVotesForEachChoice"` PollCreatedByUID string `json:"pollCreatedByUID"` }
type PollSchema ¶
type PostSchemaResolver ¶
type PostSchemaResolver interface { NumReplies(ctx context.Context, obj *models.Post) (int, error) IsRepostedByCurrentUser(ctx context.Context, obj *models.Post) (bool, error) NumReposts(ctx context.Context, obj *models.Post) (int, error) NumQuotes(ctx context.Context, obj *models.Post) (int, error) IsLikedByCurrentUser(ctx context.Context, obj *models.Post) (bool, error) NumLikes(ctx context.Context, obj *models.Post) (int, error) }
type QueryResolver ¶
type QueryResolver interface { GetUserByUsername(ctx context.Context, username string) (*models.User, error) GetUserProfile(ctx context.Context, input GetUserProfileInput) (*GetUserProfileReturnType, error) FetchMainFeedPosts(ctx context.Context, input FetchMainFeedPostsInput) (*FetchMainFeedPostsReturnType, error) }
type ResolverRoot ¶
type ResolverRoot interface { Mutation() MutationResolver PostSchema() PostSchemaResolver Query() QueryResolver Subscription() SubscriptionResolver }
type SubscriptionResolver ¶
type SubscriptionResolver interface {
}type UpdateUserProfileInput ¶
type UserVoteSchema ¶
Click to show internal directories.
Click to hide internal directories.