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 { ChangePassword func(childComplexity int, password string) int Login func(childComplexity int, email string, password string) int RegisterUser func(childComplexity int, email string, password string) int RemovePanda func(childComplexity int, id string) int TagPanda func(childComplexity int, id string, tags []string) int UploadPanda func(childComplexity int, file graphql.Upload, tags []string) int } PandaFile struct { Created func(childComplexity int) int FileName func(childComplexity int) int FileSize func(childComplexity int) int FileType func(childComplexity int) int ID func(childComplexity int) int Modified func(childComplexity int) int Tags func(childComplexity int) int URL func(childComplexity int) int } Query struct { Me func(childComplexity int) int Panda func(childComplexity int, id string) int Pandas func(childComplexity int, tags []string) int } Subscription struct { PandaAdded func(childComplexity int) int PandaRemoved func(childComplexity int) int } User struct { Email 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 { UploadPanda(ctx context.Context, file graphql.Upload, tags []string) (*models.PandaFile, error) RemovePanda(ctx context.Context, id string) (bool, error) TagPanda(ctx context.Context, id string, tags []string) (*models.PandaFile, error) RegisterUser(ctx context.Context, email string, password string) (bool, error) Login(ctx context.Context, email string, password string) (string, error) ChangePassword(ctx context.Context, password string) (bool, error) }
type PandaFileResolver ¶
type PandaFileResolver interface { URL(ctx context.Context, obj *models.PandaFile) (string, error) Tags(ctx context.Context, obj *models.PandaFile) ([]string, error) Created(ctx context.Context, obj *models.PandaFile) (*time.Time, error) Modified(ctx context.Context, obj *models.PandaFile) (*time.Time, error) }
type QueryResolver ¶
type Resolver ¶
type Resolver struct {
// contains filtered or unexported fields
}
func (*Resolver) Mutation ¶
func (r *Resolver) Mutation() MutationResolver
func (*Resolver) PandaFile ¶
func (r *Resolver) PandaFile() PandaFileResolver
func (*Resolver) Query ¶
func (r *Resolver) Query() QueryResolver
func (*Resolver) Subscription ¶
func (r *Resolver) Subscription() SubscriptionResolver
type ResolverRoot ¶
type ResolverRoot interface { Mutation() MutationResolver PandaFile() PandaFileResolver Query() QueryResolver Subscription() SubscriptionResolver }
Click to show internal directories.
Click to hide internal directories.