generated

package
v0.0.0-...-2952f12 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnknownType  = errors.New("unknown type")
	ErrTypeNotFound = errors.New("type not found")
)

Functions

func NewExecutableSchema

func NewExecutableSchema(cfg Config) graphql.ExecutableSchema

NewExecutableSchema creates an ExecutableSchema from the ResolverRoot interface.

Types

type ComplexityRoot

type ComplexityRoot struct {
	Entity struct {
		FindLibraryByID                           func(childComplexity int, id string) int
		FindPasswordAccountByEmail                func(childComplexity int, email string) int
		FindSMSAccountByNumber                    func(childComplexity int, number *string) int
		FindUserByID                              func(childComplexity int, id string) int
		FindUserByUsernameAndNameFirstAndNameLast func(childComplexity int, username *string, nameFirst *string, nameLast *string) int
	}

	Library struct {
		ID          func(childComplexity int) int
		Name        func(childComplexity int) int
		UserAccount func(childComplexity int, id string) int
	}

	Mutation struct {
		Login func(childComplexity int, username string, password string, userID *string) int
	}

	Name struct {
		First func(childComplexity int) int
		Last  func(childComplexity int) int
	}

	PasswordAccount struct {
		Email func(childComplexity int) int
	}

	Query struct {
		Me   func(childComplexity int) int
		User func(childComplexity int, id string) int
		// contains filtered or unexported fields
	}

	SMSAccount struct {
		Number func(childComplexity int) int
	}

	User struct {
		Account   func(childComplexity int) int
		BirthDate func(childComplexity int, locale *string) int
		ID        func(childComplexity int) int
		Metadata  func(childComplexity int) int
		Name      func(childComplexity int) int
		Ssn       func(childComplexity int) int
		Username  func(childComplexity int) int
	}

	UserMetadata struct {
		Address     func(childComplexity int) int
		Description func(childComplexity int) int
		Name        func(childComplexity int) int
	}
	// contains filtered or unexported fields
}

type Config

type Config struct {
	Resolvers  ResolverRoot
	Directives DirectiveRoot
	Complexity ComplexityRoot
}

type DirectiveRoot

type DirectiveRoot struct {
	CacheControl func(ctx context.Context, obj interface{}, next graphql.Resolver, maxAge *int, scope *model.CacheControlScope, inheritMaxAge *bool) (res interface{}, err error)
	Stream       func(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error)
	Tag          func(ctx context.Context, obj interface{}, next graphql.Resolver, name string) (res interface{}, err error)
	Transform    func(ctx context.Context, obj interface{}, next graphql.Resolver, from string) (res interface{}, err error)
}

type EntityResolver

type EntityResolver interface {
	FindLibraryByID(ctx context.Context, id string) (*model.Library, error)
	FindPasswordAccountByEmail(ctx context.Context, email string) (*model.PasswordAccount, error)
	FindSMSAccountByNumber(ctx context.Context, number *string) (*model.SMSAccount, error)
	FindUserByID(ctx context.Context, id string) (*model.User, error)
	FindUserByUsernameAndNameFirstAndNameLast(ctx context.Context, username *string, nameFirst *string, nameLast *string) (*model.User, error)
}

type LibraryResolver

type LibraryResolver interface {
	UserAccount(ctx context.Context, obj *model.Library, id string) (*model.User, error)
}

type MutationResolver

type MutationResolver interface {
	Login(ctx context.Context, username string, password string, userID *string) (*model.User, error)
}

type QueryResolver

type QueryResolver interface {
	User(ctx context.Context, id string) (*model.User, error)
	Me(ctx context.Context) (*model.User, error)
}

type ResolverRoot

type ResolverRoot interface {
	Entity() EntityResolver
	Library() LibraryResolver
	Mutation() MutationResolver
	Query() QueryResolver
	User() UserResolver
}

type UserResolver

type UserResolver interface {
	BirthDate(ctx context.Context, obj *model.User, locale *string) (*string, error)

	Metadata(ctx context.Context, obj *model.User) ([]*model.UserMetadata, error)
}

Jump to

Keyboard shortcuts

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