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

package federation

import "github.com/99designs/gqlgen/plugin/federation"

Index

Package Files

federation.go

func New Uses

func New() plugin.Plugin

New returns a federation plugin that injects federated directives and types into the schema

type Entity Uses

type Entity struct {
    Name         string      // The same name as the type declaration
    KeyFields    []*KeyField // The fields declared in @key.
    ResolverName string      // The resolver name, such as FindUserByID
    Def          *ast.Definition
    Requires     []*Requires
}

Entity represents a federated type that was declared in the GQL schema.

type KeyField Uses

type KeyField struct {
    Field         *ast.FieldDefinition
    TypeReference *config.TypeReference // The Go representation of that field type
}

type RequireField Uses

type RequireField struct {
    Name          string                // The same name as the type declaration
    NameGo        string                // The Go struct field name
    TypeReference *config.TypeReference // The Go representation of that field type
}

RequireField is similar to an entity but it is a field not an object

type Requires Uses

type Requires struct {
    Name   string          // the name of the field
    Fields []*RequireField // the name of the sibling fields
}

Requires represents an @requires clause

Directories

PathSynopsis
fedruntime

Package federation imports 8 packages (graph) and is imported by 4 packages. Updated 2020-02-26. Refresh now. Tools for package owners.