generated

package
v0.0.0-...-ae1a546 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2021 License: MIT Imports: 13 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 {
	FileUpload struct {
		ContentType func(childComplexity int) int
		Extension   func(childComplexity int) int
		Filename    func(childComplexity int) int
		ID          func(childComplexity int) int
		Size        func(childComplexity int) int
		User        func(childComplexity int) int
	}

	Mutation struct {
		AddFriend     func(childComplexity int, friendID string) int
		DeleteAccount func(childComplexity int) int
		DeleteFile    func(childComplexity int, id string) int
		Login         func(childComplexity int, input *model.Login) int
		Logout        func(childComplexity int) int
		Register      func(childComplexity int, input *model.Register) int
		RemoveFriend  func(childComplexity int, friendID string) int
		SendMessage   func(childComplexity int, message string) int
		UpdateAccount func(childComplexity int, input *model.UpdateUser) int
		UpdateFile    func(childComplexity int, input *model.UpdateFile) int
		Upload        func(childComplexity int, files []*graphql.Upload) int
	}

	PublicMessage struct {
		CreatedAt func(childComplexity int) int
		ID        func(childComplexity int) int
		Message   func(childComplexity int) int
		User      func(childComplexity int) int
		UserID    func(childComplexity int) int
	}

	Query struct {
		AllUsers func(childComplexity int) int
		Auth     func(childComplexity int) int
		Download func(childComplexity int, id string) int
		Messages func(childComplexity int) int
	}

	Subscription struct {
		MessageAdded func(childComplexity int) int
	}

	User struct {
		Address     func(childComplexity int) int
		DateOfBirth func(childComplexity int) int
		Email       func(childComplexity int) int
		FileUploads func(childComplexity int) int
		Friends     func(childComplexity int) int
		Gender      func(childComplexity int) int
		ID          func(childComplexity int) int
		Name        func(childComplexity int) int
		Password    func(childComplexity int) int
		UserRole    func(childComplexity int) int
		UserRoleID  func(childComplexity int) int
	}

	UserRole struct {
		ID   func(childComplexity int) int
		Name 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 {
	Login(ctx context.Context, input *model.Login) (string, error)
	Logout(ctx context.Context) (bool, error)
	UpdateFile(ctx context.Context, input *model.UpdateFile) (*model.FileUpload, error)
	DeleteFile(ctx context.Context, id string) (*model.FileUpload, error)
	Upload(ctx context.Context, files []*graphql.Upload) (bool, error)
	AddFriend(ctx context.Context, friendID string) (*model.User, error)
	RemoveFriend(ctx context.Context, friendID string) (*model.User, error)
	SendMessage(ctx context.Context, message string) (*model.PublicMessage, error)
	Register(ctx context.Context, input *model.Register) (*model.User, error)
	UpdateAccount(ctx context.Context, input *model.UpdateUser) (*model.User, error)
	DeleteAccount(ctx context.Context) (*model.User, error)
}

type QueryResolver

type QueryResolver interface {
	Auth(ctx context.Context) (*model.User, error)
	Download(ctx context.Context, id string) (string, error)
	Messages(ctx context.Context) ([]*model.PublicMessage, error)
	AllUsers(ctx context.Context) ([]*model.User, error)
}

type ResolverRoot

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

type SubscriptionResolver

type SubscriptionResolver interface {
	MessageAdded(ctx context.Context) (<-chan *model.PublicMessage, error)
}

Jump to

Keyboard shortcuts

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