gqlgen: github.com/99designs/gqlgen/integration Index | Files | Directories

package integration

import "github.com/99designs/gqlgen/integration"

Index

Package Files

generated.go resolver.go

func NewExecutableSchema Uses

func NewExecutableSchema(cfg Config) graphql.ExecutableSchema

NewExecutableSchema creates an ExecutableSchema from the ResolverRoot interface.

type ComplexityRoot Uses

type ComplexityRoot struct {
    Element struct {
        Child      func(childComplexity int) int
        Error      func(childComplexity int) int
        Mismatched func(childComplexity int) int
    }

    Query struct {
        Complexity   func(childComplexity int, value int) int
        Date         func(childComplexity int, filter models.DateFilter) int
        Error        func(childComplexity int, typeArg *models.ErrorType) int
        JSONEncoding func(childComplexity int) int
        Path         func(childComplexity int) int
        Viewer       func(childComplexity int) int
    }

    User struct {
        Likes func(childComplexity int) int
        Name  func(childComplexity int) int
    }

    Viewer struct {
        User func(childComplexity int) int
    }
}

type Config Uses

type Config struct {
    Resolvers  ResolverRoot
    Directives DirectiveRoot
    Complexity ComplexityRoot
}

type CustomError Uses

type CustomError struct {
    UserMessage   string
    InternalError string
}

func (*CustomError) Error Uses

func (e *CustomError) Error() string

type DirectiveRoot Uses

type DirectiveRoot struct {
    Magic func(ctx context.Context, obj interface{}, next graphql.Resolver, kind *int) (res interface{}, err error)
}

type ElementResolver Uses

type ElementResolver interface {
    Child(ctx context.Context, obj *models.Element) (*models.Element, error)
    Error(ctx context.Context, obj *models.Element) (bool, error)
    Mismatched(ctx context.Context, obj *models.Element) ([]bool, error)
}

type QueryResolver Uses

type QueryResolver interface {
    Path(ctx context.Context) ([]*models.Element, error)
    Date(ctx context.Context, filter models.DateFilter) (bool, error)
    Viewer(ctx context.Context) (*models.Viewer, error)
    JSONEncoding(ctx context.Context) (string, error)
    Error(ctx context.Context, typeArg *models.ErrorType) (bool, error)
    Complexity(ctx context.Context, value int) (bool, error)
}

type Resolver Uses

type Resolver struct{}

func (*Resolver) Element Uses

func (r *Resolver) Element() ElementResolver

func (*Resolver) Query Uses

func (r *Resolver) Query() QueryResolver

func (*Resolver) User Uses

func (r *Resolver) User() UserResolver

type ResolverRoot Uses

type ResolverRoot interface {
    Element() ElementResolver
    Query() QueryResolver
    User() UserResolver
}

type UserResolver Uses

type UserResolver interface {
    Likes(ctx context.Context, obj *remote_api.User) ([]string, error)
}

Directories

PathSynopsis
models-go
remote_api
server

Package integration imports 14 packages (graph) and is imported by 4 packages. Updated 2020-05-30. Refresh now. Tools for package owners.