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 { Mutation struct { CreatePost func(childComplexity int, input domain.CreatePostInput) int CreateVerifyEmailCode func(childComplexity int, email string) int DeletePost func(childComplexity int, id ksuid.KSUID) int ForgotPassword func(childComplexity int, input domain.ForgotPasswordInput) int RefreshToken func(childComplexity int, token string) int SignIn func(childComplexity int, input domain.SignInInput) int SignOut func(childComplexity int, token string) int SignUp func(childComplexity int, input domain.SignUpInput) int UpdateAvatar func(childComplexity int, file graphql.Upload) int UpdatePost func(childComplexity int, input domain.UpdatePostInput) int } PageInfo struct { EndCursor func(childComplexity int) int StartCursor func(childComplexity int) int } Post struct { Attachments func(childComplexity int) int Author func(childComplexity int) int Id func(childComplexity int) int Text func(childComplexity int) int UpdatedAt func(childComplexity int) int } PostConnection struct { Edges func(childComplexity int) int Nodes func(childComplexity int) int PageInfo func(childComplexity int) int } PostEdge struct { Cursor func(childComplexity int) int Node func(childComplexity int) int } Query struct { Me func(childComplexity int) int Post func(childComplexity int, id ksuid.KSUID) int User func(childComplexity int, id ksuid.KSUID) int } Tokens struct { Access func(childComplexity int) int Refresh func(childComplexity int) int } User struct { AvatarUrl func(childComplexity int) int Id func(childComplexity int) int LastVisit func(childComplexity int) int Posts func(childComplexity int, first *int, last *int, before *string, after *string) int Username func(childComplexity int) int Verified func(childComplexity int) int } }
type Config ¶
type Config struct { Resolvers ResolverRoot Directives DirectiveRoot Complexity ComplexityRoot }
type DirectiveRoot ¶
type MutationResolver ¶
type MutationResolver interface { SignUp(ctx context.Context, input domain.SignUpInput) (*domain.Tokens, error) SignIn(ctx context.Context, input domain.SignInInput) (*domain.Tokens, error) SignOut(ctx context.Context, token string) (bool, error) RefreshToken(ctx context.Context, token string) (string, error) CreatePost(ctx context.Context, input domain.CreatePostInput) (ksuid.KSUID, error) DeletePost(ctx context.Context, id ksuid.KSUID) (bool, error) UpdatePost(ctx context.Context, input domain.UpdatePostInput) (bool, error) CreateVerifyEmailCode(ctx context.Context, email string) (bool, error) ForgotPassword(ctx context.Context, input domain.ForgotPasswordInput) (bool, error) UpdateAvatar(ctx context.Context, file graphql.Upload) (string, error) }
type PostConnectionResolver ¶
type PostResolver ¶
type QueryResolver ¶
type ResolverRoot ¶
type ResolverRoot interface { Mutation() MutationResolver Post() PostResolver PostConnection() PostConnectionResolver Query() QueryResolver User() UserResolver }
Click to show internal directories.
Click to hide internal directories.