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 { Conversation struct { CreatedAt func(childComplexity int) int Creator func(childComplexity int) int DeletedAt func(childComplexity int) int ID func(childComplexity int) int Messages func(childComplexity int, first int, after entity.ID, sortBy entity.MessagesSortByType, sortOrder entity.SortOrderType) int Participants func(childComplexity int) int Title func(childComplexity int) int Type func(childComplexity int) int UpdatedAt func(childComplexity int) int } ConversationMessagesConnection struct { Edges func(childComplexity int) int PageInfo func(childComplexity int) int TotalCount func(childComplexity int) int } ConversationMessagesEdge struct { Cursor func(childComplexity int) int Node func(childComplexity int) int } ConversationsConnection struct { Edges func(childComplexity int) int PageInfo func(childComplexity int) int TotalCount func(childComplexity int) int } ConversationsEdge struct { Cursor func(childComplexity int) int Node func(childComplexity int) int } CreateNewConversationPayload struct { Conversation func(childComplexity int) int } FriendsConnection struct { Edges func(childComplexity int) int PageInfo func(childComplexity int) int TotalCount func(childComplexity int) int } FriendsEdge struct { Cursor func(childComplexity int) int Node func(childComplexity int) int } Message struct { Content func(childComplexity int) int Conversation func(childComplexity int) int CreatedAt func(childComplexity int) int DeletedAt func(childComplexity int) int ID func(childComplexity int) int Sender func(childComplexity int) int Type func(childComplexity int) int UpdatedAt func(childComplexity int) int } Mutation struct { CreateNewConversation func(childComplexity int, input model.CreateNewConversationInput) int Login func(childComplexity int) int PostMessage func(childComplexity int, input model.PostMessageInput) int } PageInfo struct { HasNextPage func(childComplexity int) int HasPreviousPage func(childComplexity int) int } PostMessagePayload struct { Message func(childComplexity int) int } Query struct { Me func(childComplexity int) int } Subscription struct { MessagePosted func(childComplexity int) int UserJoined func(childComplexity int) int } User struct { Conversations func(childComplexity int, first int, after entity.ID, sortBy entity.ConversationsSortByType, sortOrder entity.SortOrderType) int EmailAddress func(childComplexity int) int EmailVerified func(childComplexity int) int FirebaseID func(childComplexity int) int Friends func(childComplexity int, first int, after entity.ID, sortBy entity.FriendsSortByType, sortOrder entity.SortOrderType) int ID func(childComplexity int) int Name func(childComplexity int) int PictureUrl func(childComplexity int) int Provider func(childComplexity int) int } }
type Config ¶
type Config struct { Resolvers ResolverRoot Directives DirectiveRoot Complexity ComplexityRoot }
type ConversationResolver ¶
type ConversationResolver interface { Creator(ctx context.Context, obj *entity.Conversation) (*entity.User, error) Messages(ctx context.Context, obj *entity.Conversation, first int, after entity.ID, sortBy entity.MessagesSortByType, sortOrder entity.SortOrderType) (*entity.ConversationMessagesConnection, error) Participants(ctx context.Context, obj *entity.Conversation) ([]*entity.User, error) }
type DirectiveRoot ¶
type DirectiveRoot struct { }
type MessageResolver ¶
type MutationResolver ¶
type MutationResolver interface { CreateNewConversation(ctx context.Context, input model.CreateNewConversationInput) (*model.CreateNewConversationPayload, error) PostMessage(ctx context.Context, input model.PostMessageInput) (*model.PostMessagePayload, error) Login(ctx context.Context) (*entity.User, error) }
type ResolverRoot ¶
type ResolverRoot interface { Conversation() ConversationResolver Message() MessageResolver Mutation() MutationResolver Query() QueryResolver Subscription() SubscriptionResolver User() UserResolver }
type SubscriptionResolver ¶
type UserResolver ¶
type UserResolver interface { Friends(ctx context.Context, obj *entity.User, first int, after entity.ID, sortBy entity.FriendsSortByType, sortOrder entity.SortOrderType) (*entity.FriendsConnection, error) Conversations(ctx context.Context, obj *entity.User, first int, after entity.ID, sortBy entity.ConversationsSortByType, sortOrder entity.SortOrderType) (*entity.ConversationsConnection, error) }
Click to show internal directories.
Click to hide internal directories.