Documentation ¶
Index ¶
- func DBAddContact(input *NewContact, userId int64) (int64, error)
- func DBCreateUser(input *NewUser) (int64, error)
- func DBDeleteContact(userId, cid int64) error
- func DBGetUser(user *User) error
- func DBUpdateContact(input *ContactUpdate, userId int64) (int64, error)
- func MarshalID(id int64) graphql.Marshaler
- func NewExecutableSchema(cfg Config) graphql.ExecutableSchema
- func UnmarshalID(v interface{}) (int64, error)
- type ComplexityRoot
- type Config
- type Contact
- type ContactUpdate
- type DirectiveRoot
- type MutationResolver
- type NewContact
- type NewUser
- type QueryResolver
- type Resolver
- type ResolverRoot
- type User
- type UserResolver
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DBAddContact ¶
func DBAddContact(input *NewContact, userId int64) (int64, error)
func DBCreateUser ¶
func DBDeleteContact ¶
func DBUpdateContact ¶
func DBUpdateContact(input *ContactUpdate, userId int64) (int64, error)
func NewExecutableSchema ¶
func NewExecutableSchema(cfg Config) graphql.ExecutableSchema
NewExecutableSchema creates an ExecutableSchema from the ResolverRoot interface.
func UnmarshalID ¶
Types ¶
type ComplexityRoot ¶
type ComplexityRoot struct { Contact struct { Address func(childComplexity int) int Cid func(childComplexity int) int Email func(childComplexity int) int Name func(childComplexity int) int Phone func(childComplexity int) int } Mutation struct { AddContacts func(childComplexity int, input []NewContact) int CreateUser func(childComplexity int, input NewUser) int DeleteContacts func(childComplexity int, input []int64) int UpdateContacts func(childComplexity int, input []ContactUpdate) int } Query struct { User func(childComplexity int) int } User struct { Contacts func(childComplexity int, limit *int, offset *int) int Email func(childComplexity int) int Uid func(childComplexity int) int Username func(childComplexity int) int } }
type Config ¶
type Config struct { Resolvers ResolverRoot Directives DirectiveRoot Complexity ComplexityRoot }
func NewRootResolvers ¶
func NewRootResolvers() Config
type ContactUpdate ¶
type DirectiveRoot ¶
type MutationResolver ¶
type MutationResolver interface { CreateUser(ctx context.Context, input NewUser) (*User, error) AddContacts(ctx context.Context, input []NewContact) ([]*int64, error) DeleteContacts(ctx context.Context, input []int64) ([]*int64, error) UpdateContacts(ctx context.Context, input []ContactUpdate) ([]*int64, error) }
type NewContact ¶
type Resolver ¶
type Resolver struct{}
func (*Resolver) Mutation ¶
func (r *Resolver) Mutation() MutationResolver
func (*Resolver) Query ¶
func (r *Resolver) Query() QueryResolver
func (*Resolver) User ¶
func (r *Resolver) User() UserResolver
type ResolverRoot ¶
type ResolverRoot interface { Mutation() MutationResolver Query() QueryResolver User() UserResolver }
Click to show internal directories.
Click to hide internal directories.