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 { Auction struct { Bids func(childComplexity int) int Deadline func(childComplexity int) int Description func(childComplexity int) int Host func(childComplexity int) int ID func(childComplexity int) int Offer func(childComplexity int) int Timestamp func(childComplexity int) int } Bid struct { Deadline func(childComplexity int) int ID func(childComplexity int) int Issuer func(childComplexity int) int Price func(childComplexity int) int Selected func(childComplexity int) int Timestamp func(childComplexity int) int } Chat struct { ID func(childComplexity int) int Messages func(childComplexity int) int Users func(childComplexity int) int } Comment struct { Author func(childComplexity int) int ID func(childComplexity int) int LikeCount func(childComplexity int) int Likes func(childComplexity int) int Text func(childComplexity int) int Timestamp func(childComplexity int) int } CommentList struct { Count func(childComplexity int) int List func(childComplexity int) int } FeedAuction struct { Bids func(childComplexity int) int Deadline func(childComplexity int) int Description func(childComplexity int) int Host func(childComplexity int) int ID func(childComplexity int) int Offer func(childComplexity int) int Timestamp func(childComplexity int) int } FeedPost struct { Author func(childComplexity int) int BidID func(childComplexity int) int Comments func(childComplexity int) int Content func(childComplexity int) int Description func(childComplexity int) int ID func(childComplexity int) int Liked func(childComplexity int) int Likes func(childComplexity int) int Timestamp func(childComplexity int) int } FeedUser struct { Name func(childComplexity int) int Nickname func(childComplexity int) int Picture func(childComplexity int) int } Login struct { First func(childComplexity int) int Token func(childComplexity int) int } Message struct { ChatID func(childComplexity int) int Message func(childComplexity int) int Sender func(childComplexity int) int Timestamp func(childComplexity int) int } Mutation struct { AcceptBid func(childComplexity int, auctionID string, bidID string) int AddTagToUser func(childComplexity int, tag string) int CommentOnPost func(childComplexity int, postID string, message string) int CreateAuction func(childComplexity int, offer float64, description string) int CreateBid func(childComplexity int, auctionID string, deadline string, price float64) int CreatePost func(childComplexity int, content graphql.Upload, description *string, bidID *string) int CreateUser func(childComplexity int, input model.NewUser) int DeleteAuction func(childComplexity int, auctionID string) int DeleteBid func(childComplexity int, auctionID string, bidID string) int DeleteComment func(childComplexity int, postID string, commentID string) int DeletePost func(childComplexity int, postID string) int EditComment func(childComplexity int, postID string, commentID string, message string) int EditPost func(childComplexity int, postID string, description string) int Follow func(childComplexity int, nickname string) int LikeComment func(childComplexity int, postID string, commentID string) int LikePost func(childComplexity int, postID string) int RemoveTagFromUser func(childComplexity int, tag string) int ResetPassword func(childComplexity int, token string, newPassword string) int SendForgotPasswordEmail func(childComplexity int, nickname string) int SendMessage func(childComplexity int, msg string, receiver string) int SendMessageToDialogflow func(childComplexity int, msg string) int Unfollow func(childComplexity int, nickname string) int UpdateUserBio func(childComplexity int, bio string) int UpdateUserCover func(childComplexity int, cover graphql.Upload) int UpdateUserLocation func(childComplexity int, lat float64, lng float64) int UpdateUserPicture func(childComplexity int, picture graphql.Upload) int UpdateUserTags func(childComplexity int, tags []string) int } Order struct { AuctionID func(childComplexity int) int BidID func(childComplexity int) int ID func(childComplexity int) int PayerID func(childComplexity int) int PaymentID func(childComplexity int) int PaymentURL func(childComplexity int) int Status func(childComplexity int) int } Post struct { Author func(childComplexity int) int BidID func(childComplexity int) int Comments func(childComplexity int) int Content func(childComplexity int) int Description func(childComplexity int) int ID func(childComplexity int) int LikeCount func(childComplexity int) int Liked func(childComplexity int) int Likes func(childComplexity int) int Timestamp func(childComplexity int) int } PostComment struct { Author func(childComplexity int) int ID func(childComplexity int) int Liked func(childComplexity int) int Likes func(childComplexity int) int Text func(childComplexity int) int Timestamp func(childComplexity int) int } Query struct { AcceptedBids func(childComplexity int) int Auctions func(childComplexity int, page *int) int BidPaymentLink func(childComplexity int, auctionID string, bidID string) int Comments func(childComplexity int, postID string, page *int) int Feed func(childComplexity int, page *int) int IsFollowing func(childComplexity int, nickname string) int Login func(childComplexity int, nickname string, password string) int Order func(childComplexity int, orderID string) int Orders func(childComplexity int) int Self func(childComplexity int) int Tags func(childComplexity int) int Trending func(childComplexity int, page *int) int User func(childComplexity int, nickname string) int UserPosts func(childComplexity int, nickname string, page *int) int UserTags func(childComplexity int, nickname string) int Users func(childComplexity int, nickname *string, page *int) int UsersByTags func(childComplexity int, tags []string, page *int) int } Subscription struct { NewChatMessage func(childComplexity int) int } User struct { Bio func(childComplexity int) int Cover func(childComplexity int) int Email func(childComplexity int) int Followers func(childComplexity int) int FollowersCount func(childComplexity int) int Following func(childComplexity int) int Lat func(childComplexity int) int Lng func(childComplexity int) int Name func(childComplexity int) int Nickname func(childComplexity int) int Picture 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 { CreateUser(ctx context.Context, input model.NewUser) (*model.User, error) UpdateUserPicture(ctx context.Context, picture graphql.Upload) (string, error) UpdateUserLocation(ctx context.Context, lat float64, lng float64) (bool, error) UpdateUserBio(ctx context.Context, bio string) (bool, error) UpdateUserCover(ctx context.Context, cover graphql.Upload) (string, error) UpdateUserTags(ctx context.Context, tags []string) (bool, error) AddTagToUser(ctx context.Context, tag string) (bool, error) RemoveTagFromUser(ctx context.Context, tag string) (bool, error) Follow(ctx context.Context, nickname string) (bool, error) Unfollow(ctx context.Context, nickname string) (bool, error) SendMessage(ctx context.Context, msg string, receiver string) (bool, error) SendMessageToDialogflow(ctx context.Context, msg string) (string, error) CreatePost(ctx context.Context, content graphql.Upload, description *string, bidID *string) (string, error) EditPost(ctx context.Context, postID string, description string) (bool, error) DeletePost(ctx context.Context, postID string) (bool, error) LikeComment(ctx context.Context, postID string, commentID string) (bool, error) LikePost(ctx context.Context, postID string) (bool, error) CommentOnPost(ctx context.Context, postID string, message string) (string, error) EditComment(ctx context.Context, postID string, commentID string, message string) (bool, error) DeleteComment(ctx context.Context, postID string, commentID string) (bool, error) CreateAuction(ctx context.Context, offer float64, description string) (*model.Auction, error) DeleteAuction(ctx context.Context, auctionID string) (bool, error) CreateBid(ctx context.Context, auctionID string, deadline string, price float64) (*model.Bid, error) DeleteBid(ctx context.Context, auctionID string, bidID string) (bool, error) AcceptBid(ctx context.Context, auctionID string, bidID string) (bool, error) SendForgotPasswordEmail(ctx context.Context, nickname string) (bool, error) ResetPassword(ctx context.Context, token string, newPassword string) (bool, error) }
type QueryResolver ¶
type QueryResolver interface { Users(ctx context.Context, nickname *string, page *int) ([]*model.User, error) Self(ctx context.Context) (*model.User, error) Feed(ctx context.Context, page *int) ([]*model.FeedPost, error) Trending(ctx context.Context, page *int) ([]*model.FeedPost, error) User(ctx context.Context, nickname string) (*model.User, error) UserPosts(ctx context.Context, nickname string, page *int) ([]*model.Post, error) Comments(ctx context.Context, postID string, page *int) ([]*model.PostComment, error) Tags(ctx context.Context) ([]string, error) UserTags(ctx context.Context, nickname string) ([]string, error) UsersByTags(ctx context.Context, tags []string, page *int) ([]*model.User, error) Auctions(ctx context.Context, page *int) ([]*model.FeedAuction, error) Order(ctx context.Context, orderID string) (*model.Order, error) Orders(ctx context.Context) ([]*model.Order, error) Login(ctx context.Context, nickname string, password string) (*model.Login, error) IsFollowing(ctx context.Context, nickname string) (bool, error) AcceptedBids(ctx context.Context) ([]*model.FeedAuction, error) BidPaymentLink(ctx context.Context, auctionID string, bidID string) (string, error) }
type ResolverRoot ¶
type ResolverRoot interface { Mutation() MutationResolver Query() QueryResolver Subscription() SubscriptionResolver }
Click to show internal directories.
Click to hide internal directories.