adminresolvers

package
v0.0.0-...-e28ac33 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2020 License: MIT Imports: 18 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 {
		Body           func(childComplexity int) int
		CreatedAt      func(childComplexity int) int
		Description    func(childComplexity int) int
		ID             func(childComplexity int) int
		PostedAt       func(childComplexity int) int
		PublishStatus  func(childComplexity int) int
		ThumbnailImage func(childComplexity int) int
		Title          func(childComplexity int) int
		UpdatedAt      func(childComplexity int) int
	}

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

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

	Mutation struct {
		NewArticle    func(childComplexity int, input adminmodel.ArticleMutationInput) int
		UpdateArticle func(childComplexity int, id string, input adminmodel.ArticleMutationInput) int
	}

	PageInfo struct {
		Count            func(childComplexity int) int
		HasNextPage      func(childComplexity int) int
		HasPreviousPage  func(childComplexity int) int
		Limit            func(childComplexity int) int
		Offset           func(childComplexity int) int
		Page             func(childComplexity int) int
		PaginationLength func(childComplexity int) int
		TotalCount       func(childComplexity int) int
	}

	Query struct {
		Article  func(childComplexity int, id string) int
		Articles func(childComplexity int, page *adminmodel.Pagination) int
	}
}

type Config

type Config struct {
	Resolvers  ResolverRoot
	Directives DirectiveRoot
	Complexity ComplexityRoot
}

type DirectiveRoot

type DirectiveRoot struct {
}

type MutationResolver

type MutationResolver interface {
	NewArticle(ctx context.Context, input adminmodel.ArticleMutationInput) (*adminmodel.Article, error)
	UpdateArticle(ctx context.Context, id string, input adminmodel.ArticleMutationInput) (*adminmodel.Article, error)
}

type QueryResolver

type QueryResolver interface {
	Article(ctx context.Context, id string) (*adminmodel.Article, error)
	Articles(ctx context.Context, page *adminmodel.Pagination) (*adminmodel.ArticleConnection, error)
}

type Resolver

type Resolver struct{}

func (*Resolver) Mutation

func (r *Resolver) Mutation() MutationResolver

Mutation returns MutationResolver implementation.

func (*Resolver) Query

func (r *Resolver) Query() QueryResolver

Query returns QueryResolver implementation.

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