Versions in this module Expand all Collapse all v0 v0.0.2 Nov 9, 2022 Changes in this version + func FixedError(err error) pets.Hook + func If(hk pets.Hook, cond Condition) pets.Hook + func On(hk pets.Hook, op pets.Op) pets.Hook + func Reject(op pets.Op) pets.Hook + func Unless(hk pets.Hook, op pets.Op) pets.Hook + type CategoryFunc func(context.Context, *pets.CategoryMutation) (pets.Value, error) + func (f CategoryFunc) Mutate(ctx context.Context, m pets.Mutation) (pets.Value, error) + type Chain struct + func NewChain(hooks ...pets.Hook) Chain + func (c Chain) Append(hooks ...pets.Hook) Chain + func (c Chain) Extend(chain Chain) Chain + func (c Chain) Hook() pets.Hook + type Condition func(context.Context, pets.Mutation) bool + func And(first, second Condition, rest ...Condition) Condition + func HasAddedFields(field string, fields ...string) Condition + func HasClearedFields(field string, fields ...string) Condition + func HasFields(field string, fields ...string) Condition + func HasOp(op pets.Op) Condition + func Not(cond Condition) Condition + func Or(first, second Condition, rest ...Condition) Condition + type PetFunc func(context.Context, *pets.PetMutation) (pets.Value, error) + func (f PetFunc) Mutate(ctx context.Context, m pets.Mutation) (pets.Value, error) + type UserFunc func(context.Context, *pets.UserMutation) (pets.Value, error) + func (f UserFunc) Mutate(ctx context.Context, m pets.Mutation) (pets.Value, error)