Back to godoc.org

Package fileupload

v0.13.0
Latest Go to latest

The latest major version is .

Published: Sep 21, 2020 | License: MIT | Module: github.com/99designs/gqlgen

Index

func NewExecutableSchema

func NewExecutableSchema(cfg Config) graphql.ExecutableSchema

NewExecutableSchema creates an ExecutableSchema from the ResolverRoot interface.

type ComplexityRoot

type ComplexityRoot struct {
	File struct {
		Content     func(childComplexity int) int
		ContentType func(childComplexity int) int
		ID          func(childComplexity int) int
		Name        func(childComplexity int) int
	}

	Mutation struct {
		MultipleUpload            func(childComplexity int, files []*graphql.Upload) int
		MultipleUploadWithPayload func(childComplexity int, req []*model.UploadFile) int
		SingleUpload              func(childComplexity int, file graphql.Upload) int
		SingleUploadWithPayload   func(childComplexity int, req model.UploadFile) int
	}

	Query struct {
		Empty 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 {
	SingleUpload(ctx context.Context, file graphql.Upload) (*model.File, error)
	SingleUploadWithPayload(ctx context.Context, req model.UploadFile) (*model.File, error)
	MultipleUpload(ctx context.Context, files []*graphql.Upload) ([]*model.File, error)
	MultipleUploadWithPayload(ctx context.Context, req []*model.UploadFile) ([]*model.File, error)
}

type QueryResolver

type QueryResolver interface {
	Empty(ctx context.Context) (string, error)
}

type ResolverRoot

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

type Stub

type Stub struct {
	MutationResolver struct {
		SingleUpload              func(ctx context.Context, file graphql.Upload) (*model.File, error)
		SingleUploadWithPayload   func(ctx context.Context, req model.UploadFile) (*model.File, error)
		MultipleUpload            func(ctx context.Context, files []*graphql.Upload) ([]*model.File, error)
		MultipleUploadWithPayload func(ctx context.Context, req []*model.UploadFile) ([]*model.File, error)
	}
	QueryResolver struct {
		Empty func(ctx context.Context) (string, error)
	}
}

func (*Stub) Mutation

func (r *Stub) Mutation() MutationResolver

func (*Stub) Query

func (r *Stub) Query() QueryResolver

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier