gqlgen: github.com/99designs/gqlgen/example/type-system-extension Index | Files | Directories

package type_system_extension

import "github.com/99designs/gqlgen/example/type-system-extension"

Index

Package Files

directive.go generated.go models_gen.go resolver.go

Variables

var AllState = []State{
    StateNotYet,
    StateDone,
}

func EnumLogging Uses

func EnumLogging(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error)

func FieldLogging Uses

func FieldLogging(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error)

func InputLogging Uses

func InputLogging(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error)

func NewExecutableSchema Uses

func NewExecutableSchema(cfg Config) graphql.ExecutableSchema

NewExecutableSchema creates an ExecutableSchema from the ResolverRoot interface.

func ObjectLogging Uses

func ObjectLogging(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error)

func ScalarLogging Uses

func ScalarLogging(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error)

func UnionLogging Uses

func UnionLogging(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error)

type ComplexityRoot Uses

type ComplexityRoot struct {
    MyMutation struct {
        CreateTodo func(childComplexity int, todo TodoInput) int
    }

    MyQuery struct {
        Todo  func(childComplexity int, id string) int
        Todos func(childComplexity int) int
    }

    Todo struct {
        ID       func(childComplexity int) int
        State    func(childComplexity int) int
        Text     func(childComplexity int) int
        Verified func(childComplexity int) int
    }
}

type Config Uses

type Config struct {
    Resolvers  ResolverRoot
    Directives DirectiveRoot
    Complexity ComplexityRoot
}

type Data Uses

type Data interface {
    IsData()
}

type DirectiveRoot Uses

type DirectiveRoot struct {
    EnumLogging      func(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error)
    FieldLogging     func(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error)
    InputLogging     func(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error)
    InterfaceLogging func(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error)
    ObjectLogging    func(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error)
    ScalarLogging    func(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error)
    UnionLogging     func(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error)
}

type MyMutationResolver Uses

type MyMutationResolver interface {
    CreateTodo(ctx context.Context, todo TodoInput) (*Todo, error)
}

type MyQueryResolver Uses

type MyQueryResolver interface {
    Todos(ctx context.Context) ([]*Todo, error)
    Todo(ctx context.Context, id string) (*Todo, error)
}

type Node Uses

type Node interface {
    IsNode()
}

type ResolverRoot Uses

type ResolverRoot interface {
    MyMutation() MyMutationResolver
    MyQuery() MyQueryResolver
}

func NewRootResolver Uses

func NewRootResolver() ResolverRoot

type State Uses

type State string
const (
    StateNotYet State = "NOT_YET"
    StateDone   State = "DONE"
)

func (State) IsValid Uses

func (e State) IsValid() bool

func (State) MarshalGQL Uses

func (e State) MarshalGQL(w io.Writer)

func (State) String Uses

func (e State) String() string

func (*State) UnmarshalGQL Uses

func (e *State) UnmarshalGQL(v interface{}) error

type Todo Uses

type Todo struct {
    ID       string `json:"id"`
    Text     string `json:"text"`
    State    State  `json:"state"`
    Verified bool   `json:"verified"`
}

func (Todo) IsData Uses

func (Todo) IsData()

func (Todo) IsNode Uses

func (Todo) IsNode()

type TodoInput Uses

type TodoInput struct {
    Text string `json:"text"`
}

Directories

PathSynopsis
server

Package type_system_extension imports 13 packages (graph) and is imported by 2 packages. Updated 2020-05-30. Refresh now. Tools for package owners.