graph

package
v0.0.0-...-dbf843a Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2025 License: GPL-3.0 Imports: 16 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.

func OneOf

func OneOf(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error)

Types

type ComplexityRoot

type ComplexityRoot struct {
	Mutation struct {
		DedupeStorage func(childComplexity int) int
		UploadFile    func(childComplexity int, dir string, file graphql.Upload) int
	}

	Plugin struct {
		EndpountSubPath func(childComplexity int) int
		Name            func(childComplexity int) int
	}

	Query struct {
		FsEntry func(childComplexity int, path string) int
		Plugins func(childComplexity int) int
	}

	ResolverFS struct {
		Entries func(childComplexity int) int
		Name    func(childComplexity int) int
	}

	Schema struct {
		Mutation func(childComplexity int) int
		Query    func(childComplexity int) int
	}

	SimpleDir struct {
		Entries func(childComplexity int) int
		Name    func(childComplexity int) int
	}

	SimpleFile struct {
		Name func(childComplexity int) int
		Size func(childComplexity int) int
	}

	Subscription struct {
		TaskProgress func(childComplexity int, taskID string) int
	}

	Task struct {
		ID func(childComplexity int) int
	}
}

type Config

type Config struct {
	Schema     *ast.Schema
	Resolvers  ResolverRoot
	Directives DirectiveRoot
	Complexity ComplexityRoot
}

type DirectiveRoot

type DirectiveRoot struct {
	Resolver func(ctx context.Context, obj any, next graphql.Resolver) (res any, err error)
	Stream   func(ctx context.Context, obj any, next graphql.Resolver) (res any, err error)
}

type MutationResolver

type MutationResolver interface {
	UploadFile(ctx context.Context, dir string, file graphql.Upload) (bool, error)
	DedupeStorage(ctx context.Context) (int64, error)
}

type QueryResolver

type QueryResolver interface {
	Plugins(ctx context.Context) ([]*model.Plugin, error)
	FsEntry(ctx context.Context, path string) (fs.FsEntry, error)
}

type ResolverRoot

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

type SubscriptionResolver

type SubscriptionResolver interface {
	TaskProgress(ctx context.Context, taskID string) (<-chan model.Progress, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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