Versions in this module Expand all Collapse all v0 v0.4.4 Aug 17, 2018 Changes in this version + func NewExecutableSchema(cfg Config) graphql.ExecutableSchema + type Config struct + Directives DirectiveRoot + Resolvers ResolverRoot + func New() Config + type DirectiveRoot struct + HasRole func(ctx context.Context, next graphql.Resolver, role Role) (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 + AuthenticatedTodo func(ctx context.Context, id int) (*Todo, error) + LastTodo func(ctx context.Context) (*Todo, error) + Todo func(ctx context.Context, id int) (*Todo, error) + Todos func(ctx context.Context) ([]Todo, error) + type QueryResolver resolvers + func (r *QueryResolver) AuthenticatedTodo(ctx context.Context, id int) (*Todo, error) + 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 RoleUser + 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 + type TodoInput struct + Done *bool + Text string + func UnmarshalTodoInput(v interface{}) (TodoInput, error)