Versions in this module Expand all Collapse all v0 v0.12.1 Aug 11, 2020 Changes in this version + var AllRole = []Role + func NewExecutableSchema(cfg Config) graphql.ExecutableSchema + type ComplexityRoot struct + MyMutation struct{ ... } + MyQuery struct{ ... } + Todo struct{ ... } + type Config struct + Complexity ComplexityRoot + Directives DirectiveRoot + Resolvers ResolverRoot + func New() Config + type DirectiveRoot struct + HasRole func(ctx context.Context, obj interface{}, next graphql.Resolver, role Role) (res interface{}, err error) + User func(ctx context.Context, obj interface{}, next graphql.Resolver, id int) (res interface{}, err error) + type MutationResolver resolvers + func (r *MutationResolver) CreateTodo(ctx context.Context, todo TodoInput) (*Todo, error) + func (r *MutationResolver) UpdateTodo(ctx context.Context, id int, changes map[string]interface{}) (*Todo, error) + type MyMutationResolver interface + CreateTodo func(ctx context.Context, todo TodoInput) (*Todo, error) + UpdateTodo func(ctx context.Context, id int, changes map[string]interface{}) (*Todo, error) + type MyQueryResolver interface + LastTodo func(ctx context.Context) (*Todo, error) + Todo func(ctx context.Context, id int) (*Todo, error) + Todos func(ctx context.Context) ([]*Todo, error) + type Ownable interface + Owner func() *User + type QueryResolver resolvers + func (r *QueryResolver) LastTodo(ctx context.Context) (*Todo, error) + func (r *QueryResolver) Todo(ctx context.Context, id int) (*Todo, error) + func (r *QueryResolver) Todos(ctx context.Context) ([]*Todo, error) + type ResolverRoot interface + MyMutation func() MyMutationResolver + MyQuery func() MyQueryResolver + type Role string + const RoleAdmin + const RoleOwner + func (e *Role) UnmarshalGQL(v interface{}) error + func (e Role) IsValid() bool + func (e Role) MarshalGQL(w io.Writer) + func (e Role) String() string + type Todo struct + Done bool + ID int + Text string + func (t Todo) Owner() *User + type TodoInput struct + Done *bool + Text string + type User struct + ID int + Name string