generated

package
v0.0.0-...-e331df4 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2022 License: MIT 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
		DeleteSession         func(childComplexity int, id ksuid.KSUID) int
		ForgotPassword        func(childComplexity int, input domain.ForgotPasswordInput) int
		RefreshToken          func(childComplexity int, input domain.SessionCredInput) int
		SignIn                func(childComplexity int, input domain.SignInInput) 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
		TotalCount 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
		Session  func(childComplexity int, id ksuid.KSUID) int
		Sessions func(childComplexity int, first *int, last *int, before *string, after *string) int
		User     func(childComplexity int, id ksuid.KSUID) int
	}

	Session struct {
		ExpiresIn func(childComplexity int) int
		Id        func(childComplexity int) int
		Ip        func(childComplexity int) int
		UserId    func(childComplexity int) int
	}

	SessionConnection struct {
		Edges      func(childComplexity int) int
		Nodes      func(childComplexity int) int
		PageInfo   func(childComplexity int) int
		TotalCount func(childComplexity int) int
	}

	SessionEdge struct {
		Cursor func(childComplexity int) int
		Node   func(childComplexity int) 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
		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)
	RefreshToken(ctx context.Context, input domain.SessionCredInput) (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)
	DeleteSession(ctx context.Context, id ksuid.KSUID) (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 QueryResolver

type QueryResolver interface {
	Post(ctx context.Context, id ksuid.KSUID) (*domain.Post, error)
	Session(ctx context.Context, id ksuid.KSUID) (*domain.Session, error)
	Sessions(ctx context.Context, first *int, last *int, before *string, after *string) (*domain.SessionConnection, 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
	PostConnection() PostConnectionResolver
	Query() QueryResolver
	SessionConnection() SessionConnectionResolver
	User() UserResolver
}

type SessionConnectionResolver

type SessionConnectionResolver interface {
	Edges(ctx context.Context, obj *domain.SessionConnection) ([]*domain.SessionEdge, error)
	PageInfo(ctx context.Context, obj *domain.SessionConnection) (*domain.PageInfo, error)
}

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