generated

package
v0.0.0-...-1a64ad2 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2022 License: AGPL-3.0 Imports: 15 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 {
	Mutation struct {
		CreatePost            func(childComplexity int, input domain.CreatePostInput) int
		CreateVerifyEmailCode func(childComplexity int, email string) int
		DeletePost            func(childComplexity int, id ksuid.KSUID) int
		ForgotPassword        func(childComplexity int, input domain.ForgotPasswordInput) int
		RefreshToken          func(childComplexity int, token string) int
		SignIn                func(childComplexity int, input domain.SignInInput) int
		SignOut               func(childComplexity int, token string) int
		SignUp                func(childComplexity int, input domain.SignUpInput) int
		UpdateAvatar          func(childComplexity int, file graphql.Upload) int
		UpdatePost            func(childComplexity int, input domain.UpdatePostInput) int
	}

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

	Post struct {
		Attachments func(childComplexity int) int
		Author      func(childComplexity int) int
		Id          func(childComplexity int) int
		Text        func(childComplexity int) int
		UpdatedAt   func(childComplexity int) int
	}

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

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

	Query struct {
		Me   func(childComplexity int) int
		Post func(childComplexity int, id ksuid.KSUID) int
		User func(childComplexity int, id ksuid.KSUID) int
	}

	Tokens struct {
		Access  func(childComplexity int) int
		Refresh func(childComplexity int) int
	}

	User struct {
		AvatarUrl func(childComplexity int) int
		Id        func(childComplexity int) int
		LastVisit func(childComplexity int) int
		Posts     func(childComplexity int, first *int, last *int, before *string, after *string) int
		Username  func(childComplexity int) int
		Verified  func(childComplexity int) int
	}
}

type Config

type Config struct {
	Resolvers  ResolverRoot
	Directives DirectiveRoot
	Complexity ComplexityRoot
}

type DirectiveRoot

type DirectiveRoot struct {
	IsAuth func(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error)
}

type MutationResolver

type MutationResolver interface {
	SignUp(ctx context.Context, input domain.SignUpInput) (*domain.Tokens, error)
	SignIn(ctx context.Context, input domain.SignInInput) (*domain.Tokens, error)
	SignOut(ctx context.Context, token string) (bool, error)
	RefreshToken(ctx context.Context, token string) (string, error)
	CreatePost(ctx context.Context, input domain.CreatePostInput) (ksuid.KSUID, error)
	DeletePost(ctx context.Context, id ksuid.KSUID) (bool, error)
	UpdatePost(ctx context.Context, input domain.UpdatePostInput) (bool, error)
	CreateVerifyEmailCode(ctx context.Context, email string) (bool, error)
	ForgotPassword(ctx context.Context, input domain.ForgotPasswordInput) (bool, error)
	UpdateAvatar(ctx context.Context, file graphql.Upload) (string, error)
}

type PostConnectionResolver

type PostConnectionResolver interface {
	Edges(ctx context.Context, obj *domain.PostConnection) ([]*domain.PostEdge, error)
	PageInfo(ctx context.Context, obj *domain.PostConnection) (*domain.PageInfo, error)
}

type PostResolver

type PostResolver interface {
	Author(ctx context.Context, obj *domain.Post) (*domain.User, error)
}

type QueryResolver

type QueryResolver interface {
	Post(ctx context.Context, id ksuid.KSUID) (*domain.Post, error)
	Me(ctx context.Context) (*domain.User, error)
	User(ctx context.Context, id ksuid.KSUID) (*domain.User, error)
}

type ResolverRoot

type ResolverRoot interface {
	Mutation() MutationResolver
	Post() PostResolver
	PostConnection() PostConnectionResolver
	Query() QueryResolver
	User() UserResolver
}

type UserResolver

type UserResolver interface {
	Posts(ctx context.Context, obj *domain.User, first *int, last *int, before *string, after *string) (*domain.PostConnection, error)
}

Jump to

Keyboard shortcuts

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