Documentation ¶
Index ¶
- func NewExecutableSchema(cfg Config) graphql.ExecutableSchema
- type Auth
- type ComplexityRoot
- type Config
- type CreateUserPayload
- type DecodeImageInput
- type DecodeImagePayload
- type DirectiveRoot
- type EncodeImageInput
- type EncodeImagePayload
- type FileType
- type ImageResolver
- type ImagesConnection
- type Login
- type LoginPayload
- type MutationResolver
- type NewUser
- type OverviewPayload
- type QueryResolver
- type RefreshTokenInput
- type RefreshTokenPayload
- type ResolverRoot
- type UpdateUser
- type UpdateUserPayload
- 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 ComplexityRoot ¶
type ComplexityRoot struct { Auth struct { Expires func(childComplexity int) int Token func(childComplexity int) int } CreateUserPayload struct { Auth func(childComplexity int) int User func(childComplexity int) int } DecodeImagePayload struct { Data func(childComplexity int) int } EncodeImagePayload struct { File func(childComplexity int) int } FileType struct { Content func(childComplexity int) int Name func(childComplexity int) int } Image struct { CreatedAt func(childComplexity int) int File func(childComplexity int) int ID func(childComplexity int) int UpdatedAt func(childComplexity int) int } ImageEdge struct { Cursor func(childComplexity int) int Node func(childComplexity int) int } ImagesConnection struct { Edges func(childComplexity int) int PageInfo func(childComplexity int) int TotalCount func(childComplexity int) int } LoginPayload struct { Auth func(childComplexity int) int User func(childComplexity int) int } Mutation struct { CreateUser func(childComplexity int, input NewUser) int DecodeImage func(childComplexity int, input DecodeImageInput) int EncodeImage func(childComplexity int, input EncodeImageInput) int Login func(childComplexity int, input Login) int RefreshToken func(childComplexity int, input RefreshTokenInput) int UpdateUser func(childComplexity int, input UpdateUser) int } OverviewPayload struct { User func(childComplexity int) int } PageInfo struct { EndCursor func(childComplexity int) int HasNextPage func(childComplexity int) int HasPreviousPage func(childComplexity int) int StartCursor func(childComplexity int) int } Query struct { Image func(childComplexity int, id ulid.ID) int Images func(childComplexity int, after *ent.Cursor, first *int, before *ent.Cursor, last *int, where *ent.ImageWhereInput, orderBy *ent.ImageOrder) int Overview func(childComplexity int) int } RefreshTokenPayload struct { Auth func(childComplexity int) int User func(childComplexity int) int } UpdateUserPayload struct { User func(childComplexity int) int } User struct { CreatedAt func(childComplexity int) int Email func(childComplexity int) int ID func(childComplexity int) int LastLogin func(childComplexity int) int UpdatedAt func(childComplexity int) int Username func(childComplexity int) int } }
type Config ¶
type Config struct { Resolvers ResolverRoot Directives DirectiveRoot Complexity ComplexityRoot }
type CreateUserPayload ¶
type DecodeImageInput ¶
type DecodeImagePayload ¶
type DecodeImagePayload struct {
Data string `json:"data"`
}
type DirectiveRoot ¶
type DirectiveRoot struct{}
type EncodeImageInput ¶
type EncodeImagePayload ¶
type EncodeImagePayload struct {
File *FileType `json:"file"`
}
type ImageResolver ¶
type ImagesConnection ¶
type LoginPayload ¶
type MutationResolver ¶
type MutationResolver interface { EncodeImage(ctx context.Context, input EncodeImageInput) (*EncodeImagePayload, error) DecodeImage(ctx context.Context, input DecodeImageInput) (*DecodeImagePayload, error) CreateUser(ctx context.Context, input NewUser) (*CreateUserPayload, error) UpdateUser(ctx context.Context, input UpdateUser) (*UpdateUserPayload, error) Login(ctx context.Context, input Login) (*LoginPayload, error) RefreshToken(ctx context.Context, input RefreshTokenInput) (*RefreshTokenPayload, error) }
type OverviewPayload ¶
type QueryResolver ¶
type QueryResolver interface { Image(ctx context.Context, id ulid.ID) (*ent.Image, error) Images(ctx context.Context, after *ent.Cursor, first *int, before *ent.Cursor, last *int, where *ent.ImageWhereInput, orderBy *ent.ImageOrder) (*ImagesConnection, error) Overview(ctx context.Context) (*OverviewPayload, error) }
type RefreshTokenInput ¶
type RefreshTokenInput struct {
Token string `json:"token"`
}
type RefreshTokenPayload ¶
type ResolverRoot ¶
type ResolverRoot interface { Image() ImageResolver Mutation() MutationResolver Query() QueryResolver User() UserResolver }
type UpdateUser ¶
type UpdateUserPayload ¶
Click to show internal directories.
Click to hide internal directories.