generated

package
v0.0.0-...-f270e70 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2023 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 {
	Article struct {
		ArticleKey    func(childComplexity int) int
		Content       func(childComplexity int) int
		CreatedAt     func(childComplexity int) int
		ID            func(childComplexity int) int
		PublishOption func(childComplexity int) int
		UpdatedAt     func(childComplexity int) int
		XJwtToken     func(childComplexity int) int
	}

	ArticleConnection struct {
		Edges     func(childComplexity int) int
		PageInfo  func(childComplexity int) int
		XJwtToken func(childComplexity int) int
	}

	ArticleEdge struct {
		Cursor func(childComplexity int) int
		Node   func(childComplexity int) int
	}

	Blog struct {
		Author        func(childComplexity int) int
		BlogKey       func(childComplexity int) int
		CreatedAt     func(childComplexity int) int
		Description   func(childComplexity int) int
		ID            func(childComplexity int) int
		Links         func(childComplexity int) int
		Name          func(childComplexity int) int
		PasswordHint  func(childComplexity int) int
		PublishOption func(childComplexity int) int
		UpdatedAt     func(childComplexity int) int
		XJwtToken     func(childComplexity int) int
	}

	BlogLink struct {
		ID   func(childComplexity int) int
		Name func(childComplexity int) int
		URL  func(childComplexity int) int
	}

	Config struct {
		AllowRegister func(childComplexity int) int
	}

	MasterParameter struct {
		MaxBlogLinks func(childComplexity int) int
		MaxBlogs     func(childComplexity int) int
	}

	Mutation struct {
		CreateArticle func(childComplexity int, input model.CreateArticleInput) int
		CreateBlog    func(childComplexity int, input model.CreateBlogInput) int
		DeleteArticle func(childComplexity int, id string) int
		DeleteBlog    func(childComplexity int, id string) int
		DeleteUser    func(childComplexity int) int
		Login         func(childComplexity int, input model.LoginInput) int
		Logout        func(childComplexity int) int
		UpdateArticle func(childComplexity int, input model.UpdateArticleInput) int
		UpdateBlog    func(childComplexity int, input model.UpdateBlogInput) int
		UpdateConfig  func(childComplexity int, input model.UpdateConfigInput) int
	}

	PageInfo struct {
		EndCursor       func(childComplexity int) int
		HasNextPage     func(childComplexity int) int
		HasPreviousPage func(childComplexity int) int
		StartCursor     func(childComplexity int) int
	}

	Query struct {
		ArticleByArticleKey func(childComplexity int, input model.ArticleByArticleKeyInput) int
		Articles            func(childComplexity int, input model.BlogByBlogKeyInput, paginationInput model.ArticlePaginationInput) int
		BlogByBlogKey       func(childComplexity int, input model.BlogByBlogKeyInput) int
		BlogByID            func(childComplexity int, id string) int
		Blogs               func(childComplexity int) int
		Config              func(childComplexity int) int
		IsAuthor            func(childComplexity int, blogKey string) int
		MasterParameter     func(childComplexity int) int
	}
}

type Config

type Config struct {
	Resolvers  ResolverRoot
	Directives DirectiveRoot
	Complexity ComplexityRoot
}

type DirectiveRoot

type DirectiveRoot struct {
	NumberValue        func(ctx context.Context, obj interface{}, next graphql.Resolver, min *int, max *int) (res interface{}, err error)
	PasswordValue      func(ctx context.Context, obj interface{}, next graphql.Resolver, isValidPassword *bool) (res interface{}, err error)
	PublishOptionValue func(ctx context.Context, obj interface{}, next graphql.Resolver, requireIf *string) (res interface{}, err error)
	StringValue        func(ctx context.Context, obj interface{}, next graphql.Resolver, min *int, max *int) (res interface{}, err error)
}

type MutationResolver

type MutationResolver interface {
	Login(ctx context.Context, input model.LoginInput) (bool, error)
	Logout(ctx context.Context) (bool, error)
	DeleteUser(ctx context.Context) (bool, error)
	CreateBlog(ctx context.Context, input model.CreateBlogInput) (*model.Blog, error)
	CreateArticle(ctx context.Context, input model.CreateArticleInput) (*model.Article, error)
	UpdateBlog(ctx context.Context, input model.UpdateBlogInput) (*model.Blog, error)
	UpdateArticle(ctx context.Context, input model.UpdateArticleInput) (*model.Article, error)
	DeleteBlog(ctx context.Context, id string) (bool, error)
	DeleteArticle(ctx context.Context, id string) (bool, error)
	UpdateConfig(ctx context.Context, input model.UpdateConfigInput) (*model.Config, error)
}

type QueryResolver

type QueryResolver interface {
	Blogs(ctx context.Context) ([]*model.Blog, error)
	BlogByID(ctx context.Context, id string) (*model.Blog, error)
	BlogByBlogKey(ctx context.Context, input model.BlogByBlogKeyInput) (*model.Blog, error)
	IsAuthor(ctx context.Context, blogKey string) (bool, error)
	Articles(ctx context.Context, input model.BlogByBlogKeyInput, paginationInput model.ArticlePaginationInput) (*model.ArticleConnection, error)
	ArticleByArticleKey(ctx context.Context, input model.ArticleByArticleKeyInput) (*model.Article, error)
	MasterParameter(ctx context.Context) (*model.MasterParameter, error)
	Config(ctx context.Context) (*model.Config, 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