generated

package
v0.0.0-...-8a4f413 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2023 License: GPL-3.0 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 {
	Comment struct {
		Content    func(childComplexity int) int
		ID         func(childComplexity int) int
		References func(childComplexity int) int
		Timestamp  func(childComplexity int) int
		Upvotes    func(childComplexity int) int
	}

	Mutation struct {
		CreateComment func(childComplexity int, content string, references *int) int
		DeleteComment func(childComplexity int, comment int) int
		UpvoteComment func(childComplexity int, comment int) int
	}

	Query struct {
		Comments func(childComplexity int) int
	}

	Subscription struct {
		CommentChanged 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 {
	CreateComment(ctx context.Context, content string, references *int) (*model.Comment, error)
	UpvoteComment(ctx context.Context, comment int) (*model.Comment, error)
	DeleteComment(ctx context.Context, comment int) (*model.Comment, error)
}

type QueryResolver

type QueryResolver interface {
	Comments(ctx context.Context) ([]*model.Comment, error)
}

type ResolverRoot

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

type SubscriptionResolver

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

Jump to

Keyboard shortcuts

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