Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NodeRegister ¶
type NodeRegister map[string][]NodeResolver
NodeRegister stores list of node resolvers
func (NodeRegister) Lookup ¶
func (register NodeRegister) Lookup(components globalid.Components) *NodeResolver
Lookup given parsed globalid return valid resolver.
func (NodeRegister) RegisterResolver ¶
func (register NodeRegister) RegisterResolver(resolver NodeResolver)
RegisterResolver registers a new node resolver and adds it to the register
type NodeResolver ¶
type NodeResolver struct { ObjectType graphql.Type Translator globalid.Translator Resolve func(NodeResolverParams) (interface{}, error) IsKindOf func(globalid.Components) bool }
A NodeResolver describes an object that contains a globally unique ID.
type NodeResolverParams ¶
type NodeResolverParams struct { // Context ... Context context.Context // IDComponents is the individual components of the given global ID IDComponents globalid.Components // Info is a collection of information about the current execution state. Info graphql.ResolveInfo }
NodeResolverParams parameters to given to resolve method
Click to show internal directories.
Click to hide internal directories.