Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LocalTypeFieldExtractor ¶
type LocalTypeFieldExtractor struct {
// contains filtered or unexported fields
}
LocalTypeFieldExtractor takes an ast.Document as input and generates the TypeField configuration for both root and child nodes. Root nodes are the root operation types (usually Query, Mutation and Schema--though these types can be configured via the schema keyword) plus "entities" as defined by the Apollo federation specification. In short, entities are types with a @key directive. Child nodes are field types recursively accessible via a root node. Nodes are either object or interface definitions or extensions. Root nodes only include "local" fields; they don't include fields that have the @external directive.
func NewLocalTypeFieldExtractor ¶
func NewLocalTypeFieldExtractor(document *ast.Document) *LocalTypeFieldExtractor
func (*LocalTypeFieldExtractor) GetAllNodes ¶
func (e *LocalTypeFieldExtractor) GetAllNodes() (rootNodes []plan.TypeField, childNodes []plan.TypeField)
GetAllNodes returns all root and child nodes in the document associated with the LocalTypeFieldExtractor. See LocalTypeFieldExtractor for a detailed explanation of what root and child nodes are.
type RequiredFieldExtractor ¶
type RequiredFieldExtractor struct {
// contains filtered or unexported fields
}
RequiredFieldExtractor extracts all required fields from an ast.Document containing a parsed federation subgraph SDL by visiting the directives specified in the federation specification and extracting the required metadata
func NewRequiredFieldExtractor ¶
func NewRequiredFieldExtractor(document *ast.Document) *RequiredFieldExtractor
func (*RequiredFieldExtractor) GetAllRequiredFields ¶
func (f *RequiredFieldExtractor) GetAllRequiredFields() plan.FieldConfigurations