graph

package
v0.0.0-...-c4c9469 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2023 License: MIT Imports: 14 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 {
	Chatboard struct {
		Description func(childComplexity int) int
		ID          func(childComplexity int) int
		ImageURL    func(childComplexity int) int
		Members     func(childComplexity int) int
		Messages    func(childComplexity int) int
		Name        func(childComplexity int) int
	}

	DeleteChatboard struct {
		ID func(childComplexity int) int
	}

	DeleteMessage struct {
		ID func(childComplexity int) int
	}

	Message struct {
		FileURL   func(childComplexity int) int
		ID        func(childComplexity int) int
		MessageBy func(childComplexity int) int
		MessageOn func(childComplexity int) int
		Text      func(childComplexity int) int
	}

	Mutation struct {
		CreateChatboard func(childComplexity int, input model.NewChatboard) int
		CreateMessage   func(childComplexity int, input model.NewMessage) int
		DeleteChatboard func(childComplexity int, id string) int
		DeleteMessage   func(childComplexity int, id string) int
		UpdateChatboard func(childComplexity int, id string, input model.UpdateChatboard) int
		UpdateMessage   func(childComplexity int, id string, input model.UpdateMessage) int
	}

	Query struct {
		Chatboard func(childComplexity int, input model.Fetch) int
		Messages  func(childComplexity int, input model.Fetch) int
	}

	User struct {
		About          func(childComplexity int) int
		AvatarImageURL func(childComplexity int) int
		Followers      func(childComplexity int) int
		Following      func(childComplexity int) int
		ID             func(childComplexity int) int
		Name           func(childComplexity int) int
		Username       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 {
	CreateChatboard(ctx context.Context, input model.NewChatboard) (*model.Chatboard, error)
	CreateMessage(ctx context.Context, input model.NewMessage) (*model.Message, error)
	UpdateChatboard(ctx context.Context, id string, input model.UpdateChatboard) (*model.Chatboard, error)
	UpdateMessage(ctx context.Context, id string, input model.UpdateMessage) (*model.Message, error)
	DeleteChatboard(ctx context.Context, id string) (*model.DeleteChatboard, error)
	DeleteMessage(ctx context.Context, id string) (*model.DeleteMessage, error)
}

type QueryResolver

type QueryResolver interface {
	Messages(ctx context.Context, input model.Fetch) ([]*model.Message, error)
	Chatboard(ctx context.Context, input model.Fetch) (*model.Chatboard, 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
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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