gqlgen

package
v0.0.0-...-e5cbba9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 4, 2022 License: MIT Imports: 12 Imported by: 0

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 {
	Dir struct {
		Dirs  func(childComplexity int) int
		Files func(childComplexity int) int
		Path  func(childComplexity int) int
	}

	File struct {
		CreatedAt   func(childComplexity int) int
		DownloadURL func(childComplexity int) int
		FileType    func(childComplexity int) int
		ID          func(childComplexity int) int
		Name        func(childComplexity int) int
		Path        func(childComplexity int) int
		Size        func(childComplexity int) int
		UpdatedAt   func(childComplexity int) int
		User        func(childComplexity int) int
	}

	Mutation struct {
		Delete func(childComplexity int, id string) int
		Move   func(childComplexity int, input model.MoveInput) int
		Upload func(childComplexity int, input model.UploadInput) int
	}

	Query struct {
		File          func(childComplexity int, id string) int
		FileTree      func(childComplexity int) int
		ListUserFiles func(childComplexity int, user int, pathPrefix *string) int
	}
}

type Config

type Config struct {
	Resolvers  ResolverRoot
	Directives DirectiveRoot
	Complexity ComplexityRoot
}

type DirectiveRoot

type DirectiveRoot struct {
}

type MutationResolver

type MutationResolver interface {
	Upload(ctx context.Context, input model.UploadInput) (*model.File, error)
	Move(ctx context.Context, input model.MoveInput) (*model.File, error)
	Delete(ctx context.Context, id string) (bool, error)
}

type QueryResolver

type QueryResolver interface {
	File(ctx context.Context, id string) (*model.File, error)
	ListUserFiles(ctx context.Context, user int, pathPrefix *string) ([]*model.File, error)
	FileTree(ctx context.Context) ([]*model.Dir, error)
}

type ResolverRoot

type ResolverRoot interface {
	Mutation() MutationResolver
	Query() QueryResolver
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL