...

Package generated

import "github.com/99designs/gqlgen/plugin/federation/testdata/entityinterfaces/generated"
Overview
Index

Overview ▾

Variables

var (
    ErrUnknownType  = errors.New("unknown type")
    ErrTypeNotFound = errors.New("type not found")
)

func NewExecutableSchema

func NewExecutableSchema(cfg Config) graphql.ExecutableSchema

NewExecutableSchema creates an ExecutableSchema from the ResolverRoot interface.

type ComplexityRoot

type ComplexityRoot struct {
    Entity struct {
        FindHelloByID func(childComplexity int, id string) int
        FindWorldByID func(childComplexity int, id string) int
    }

    Query struct {
        // contains filtered or unexported fields
    }

    World struct {
        ID    func(childComplexity int) int
        Title func(childComplexity int) int
    }
    // contains filtered or unexported fields
}

type Config

type Config struct {
    Schema     *ast.Schema
    Resolvers  ResolverRoot
    Directives DirectiveRoot
    Complexity ComplexityRoot
}

type DirectiveRoot

type DirectiveRoot struct {
}

type EntityResolver

type EntityResolver interface {
    FindHelloByID(ctx context.Context, id string) (Hello, error)
    FindWorldByID(ctx context.Context, id string) (*World, error)
}

type Hello

type Hello interface {
    IsEntity()
    IsHello()
    GetID() string
    GetTitle() string
}

type Query

type Query struct {
}

type ResolverRoot

type ResolverRoot interface {
    Entity() EntityResolver
}

type World

type World struct {
    ID    string `json:"id"`
    Title string `json:"title"`
}

func (World) GetID

func (this World) GetID() string

func (World) GetTitle

func (this World) GetTitle() string

func (World) IsEntity

func (World) IsEntity()

func (World) IsHello

func (World) IsHello()