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 { AuthPayload struct { Token func(childComplexity int) int User func(childComplexity int) int } File struct { Collaborators func(childComplexity int, after *string, before *string, first *int, last *int, username *string, permission *models.FilePermission) int CreatedAt func(childComplexity int) int Extension func(childComplexity int) int ID func(childComplexity int) int MimeType func(childComplexity int) int Name func(childComplexity int) int Size func(childComplexity int) int Tags func(childComplexity int, after *string, before *string, first *int, last *int, name *string) int URL func(childComplexity int) int UpdatedAt func(childComplexity int) int } FileCollaboratorConnection struct { Edges func(childComplexity int) int Nodes func(childComplexity int) int PageInfo func(childComplexity int) int } FileCollaboratorEdge struct { Cursor func(childComplexity int) int Node func(childComplexity int) int Permission func(childComplexity int) int } FileConnection struct { Edges func(childComplexity int) int Nodes func(childComplexity int) int PageInfo func(childComplexity int) int } FileEdge struct { Cursor func(childComplexity int) int Node func(childComplexity int) int } FileTagConnection struct { Edges func(childComplexity int) int Nodes func(childComplexity int) int PageInfo func(childComplexity int) int } FileTagEdge struct { Cursor func(childComplexity int) int Node func(childComplexity int) int } Mutation struct { AddCollaboratorToFile func(childComplexity int, input models.FileCollaboratorInput) int AddTagsToFile func(childComplexity int, input models.FileTagsInput) int CreateFile func(childComplexity int, input models.FileInput) int CreateUser func(childComplexity int, input models.UserInput) int DeleteFile func(childComplexity int, id string) int DeleteUser func(childComplexity int, id *string) int Login func(childComplexity int, username string, password string) int RemoveCollaboratorFromFile func(childComplexity int, fileID string, collaboratorID string) int RemoveTagsFromFile func(childComplexity int, input models.FileTagsInput) int UpdateFile func(childComplexity int, id string, input models.FileUpdateInput) int UpdateUser func(childComplexity int, id *string, input models.UserUpdateInput) int } PageInfo struct { HasNextPage func(childComplexity int) int HasPreviousPage func(childComplexity int) int } Query struct { File func(childComplexity int, id string) int Files func(childComplexity int, after *string, before *string, first *int, last *int, name *string, permission *models.FilePermission, tags []string) int Tag func(childComplexity int, name string) int Tags func(childComplexity int, after *string, before *string, first *int, last *int, name *string) int User func(childComplexity int, id *string) int Users func(childComplexity int, after *string, before *string, first *int, last *int, username *string) int } Tag struct { CreatedAt func(childComplexity int) int Files func(childComplexity int, after *string, before *string, first *int, last *int, name *string, permission *models.FilePermission, tags []string) int Name func(childComplexity int) int UpdatedAt func(childComplexity int) int } TagConnection struct { Edges func(childComplexity int) int Nodes func(childComplexity int) int PageInfo func(childComplexity int) int } TagEdge struct { Cursor func(childComplexity int) int Node func(childComplexity int) int } User struct { CreatedAt func(childComplexity int) int ID func(childComplexity int) int Kind func(childComplexity int) int UpdatedAt func(childComplexity int) int Username func(childComplexity int) int } UserConnection struct { Edges func(childComplexity int) int Nodes func(childComplexity int) int PageInfo func(childComplexity int) int } UserEdge struct { Cursor func(childComplexity int) int Node func(childComplexity int) int } }
type Config ¶
type Config struct { Resolvers ResolverRoot Directives DirectiveRoot Complexity ComplexityRoot }
type DirectiveRoot ¶
type FileResolver ¶
type FileResolver interface { URL(ctx context.Context, obj *models.File) (string, error) Tags(ctx context.Context, obj *models.File, after *string, before *string, first *int, last *int, name *string) (*models.FileTagConnection, error) Collaborators(ctx context.Context, obj *models.File, after *string, before *string, first *int, last *int, username *string, permission *models.FilePermission) (*models.FileCollaboratorConnection, error) }
type MutationResolver ¶
type MutationResolver interface { Login(ctx context.Context, username string, password string) (*models.AuthPayload, error) CreateUser(ctx context.Context, input models.UserInput) (*models.User, error) UpdateUser(ctx context.Context, id *string, input models.UserUpdateInput) (*models.User, error) DeleteUser(ctx context.Context, id *string) (*models.User, error) CreateFile(ctx context.Context, input models.FileInput) (*models.File, error) UpdateFile(ctx context.Context, id string, input models.FileUpdateInput) (*models.File, error) DeleteFile(ctx context.Context, id string) (*models.File, error) AddTagsToFile(ctx context.Context, input models.FileTagsInput) (*models.File, error) RemoveTagsFromFile(ctx context.Context, input models.FileTagsInput) (*models.File, error) AddCollaboratorToFile(ctx context.Context, input models.FileCollaboratorInput) (*models.File, error) RemoveCollaboratorFromFile(ctx context.Context, fileID string, collaboratorID string) (*models.File, error) }
type QueryResolver ¶
type QueryResolver interface { User(ctx context.Context, id *string) (*models.User, error) Users(ctx context.Context, after *string, before *string, first *int, last *int, username *string) (*models.UserConnection, error) File(ctx context.Context, id string) (*models.File, error) Files(ctx context.Context, after *string, before *string, first *int, last *int, name *string, permission *models.FilePermission, tags []string) (*models.FileConnection, error) Tag(ctx context.Context, name string) (*models.Tag, error) Tags(ctx context.Context, after *string, before *string, first *int, last *int, name *string) (*models.TagConnection, error) }
type ResolverRoot ¶
type ResolverRoot interface { File() FileResolver Mutation() MutationResolver Query() QueryResolver Tag() TagResolver }
Click to show internal directories.
Click to hide internal directories.