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 MutationResolver ¶
type QueryResolver ¶
type ResolverRoot ¶
type ResolverRoot interface { Entity() EntityResolver Library() LibraryResolver Mutation() MutationResolver Query() QueryResolver User() UserResolver }
Click to show internal directories.
Click to hide internal directories.