npm package: @seneca/graph
Description: A Seneca plugin that provides basic graph operations.
Author: Richard Rodger richardrodger.com
Latest version: 0.5.0

# seneca-graph

[![Npm][BadgeNpm]][Npm]
[![Travis][BadgeTravis]][Travis]
[![Coveralls][BadgeCoveralls]][Coveralls]


A [Seneca](senecajs.org) plugin that provides basic graph operations.


## Install

```sh
$ npm install seneca-graph
```



<!--START:action-list-->


## Action Patterns

* [add:rel,role:graph](#-addrelrolegraph-)
* [list:rel,role:graph](#-listrelrolegraph-)
* [role:graph,tree:rel](#-rolegraphtreerel-)


<!--END:action-list-->

<!--START:action-desc-->


## Action Descriptions

### &laquo; `add:rel,role:graph` &raquo;

Add a directed relation between two nodes in a given graph.




#### Examples



* `add:rel,role:graph,graph:number,rel:lessthan,add:rel,from:<from-id>,to:<to-id>`
  * Idempotently add a pair of nodes to  _number_ graph connected by directed relation _lessthan_ with `from-id` and `to-id` referencing external entity identifiers as per graph definition in options.
#### Parameters


* _graph_ : { type: 'string',
  '$_root':
   { _types:
      Set {
        'alternatives',
        'any',
        'array',
        'boolean',
        'date',
        'function',
        'link',
        'number',
        'object',
        'string',
        'symbol',
        'binary' },
     alternatives: [Function],
     any: [Function],
     array: [Function],
     boolean: [Function],
     date: [Function],
     function: [Function],
     link: [Function],
     number: [Function],
     object: [Function],
     string: [Function],
     symbol: [Function],
     binary: [Function],
     allow: [Function],
     custom: [Function],
     disallow: [Function],
     equal: [Function],
     exist: [Function],
     forbidden: [Function],
     invalid: [Function],
     not: [Function],
     only: [Function],
     optional: [Function],
     options: [Function],
     prefs: [Function],
     preferences: [Function],
     required: [Function],
     strip: [Function],
     valid: [Function],
     when: [Function],
     ValidationError: [Function: Error],
     version: '17.1.0',
     cache: { provision: [Function: provision] },
     assert: [Function: assert],
     attempt: [Function: attempt],
     build: [Function: build],
     checkPreferences: [Function: checkPreferences],
     compile: [Function: compile],
     defaults: [Function: defaults],
     expression: [Function: expression],
     extend: [Function: extend],
     isError: [Function: isError],
     isExpression: [Function: isTemplate],
     isRef: [Function],
     isSchema: [Function],
     in: [Function: in],
     override: Symbol(override),
     ref: [Function: ref],
     types: [Function: types],
     alt: [Function],
     bool: [Function],
     func: [Function],
     x: [Function: expression],
     trace: [Function: trace],
     untrace: [Function],
     [Symbol(@hapi/lab/coverage/initialize)]: [Function: trace] },
  '$_temp': { ruleset: false, whens: {} },
  _ids: { _byId: Map {}, _byKey: Map {}, _schemaChain: false },
  _preferences: null,
  _valids: null,
  _invalids: null,
  _rules: [],
  _singleRules: Map {},
  _refs: { refs: [] },
  _flags:
   { presence: 'required', description: 'The name of the graph.' },
  _cache: null,
  '$_terms':
   { alterations: null,
     examples: null,
     externals: null,
     metas: [],
     notes: [],
     shared: null,
     tags: [],
     whens: null,
     replacements: null },
  '$_super': {} }
* _rel_ : { type: 'string',
  '$_root':
   { _types:
      Set {
        'alternatives',
        'any',
        'array',
        'boolean',
        'date',
        'function',
        'link',
        'number',
        'object',
        'string',
        'symbol',
        'binary' },
     alternatives: [Function],
     any: [Function],
     array: [Function],
     boolean: [Function],
     date: [Function],
     function: [Function],
     link: [Function],
     number: [Function],
     object: [Function],
     string: [Function],
     symbol: [Function],
     binary: [Function],
     allow: [Function],
     custom: [Function],
     disallow: [Function],
     equal: [Function],
     exist: [Function],
     forbidden: [Function],
     invalid: [Function],
     not: [Function],
     only: [Function],
     optional: [Function],
     options: [Function],
     prefs: [Function],
     preferences: [Function],
     required: [Function],
     strip: [Function],
     valid: [Function],
     when: [Function],
     ValidationError: [Function: Error],
     version: '17.1.0',
     cache: { provision: [Function: provision] },
     assert: [Function: assert],
     attempt: [Function: attempt],
     build: [Function: build],
     checkPreferences: [Function: checkPreferences],
     compile: [Function: compile],
     defaults: [Function: defaults],
     expression: [Function: expression],
     extend: [Function: extend],
     isError: [Function: isError],
     isExpression: [Function: isTemplate],
     isRef: [Function],
     isSchema: [Function],
     in: [Function: in],
     override: Symbol(override),
     ref: [Function: ref],
     types: [Function: types],
     alt: [Function],
     bool: [Function],
     func: [Function],
     x: [Function: expression],
     trace: [Function: trace],
     untrace: [Function],
     [Symbol(@hapi/lab/coverage/initialize)]: [Function: trace] },
  '$_temp': { ruleset: false, whens: {} },
  _ids: { _byId: Map {}, _byKey: Map {}, _schemaChain: false },
  _preferences: null,
  _valids: null,
  _invalids: null,
  _rules: [],
  _singleRules: Map {},
  _refs: { refs: [] },
  _flags:
   { presence: 'required',
     description: 'The name of the relation.' },
  _cache: null,
  '$_terms':
   { alterations: null,
     examples: null,
     externals: null,
     metas: [],
     notes: [],
     shared: null,
     tags: [],
     whens: null,
     replacements: null },
  '$_super': {} }
* _from_ : { type: 'string',
  '$_root':
   { _types:
      Set {
        'alternatives',
        'any',
        'array',
        'boolean',
        'date',
        'function',
        'link',
        'number',
        'object',
        'string',
        'symbol',
        'binary' },
     alternatives: [Function],
     any: [Function],
     array: [Function],
     boolean: [Function],
     date: [Function],
     function: [Function],
     link: [Function],
     number: [Function],
     object: [Function],
     string: [Function],
     symbol: [Function],
     binary: [Function],
     allow: [Function],
     custom: [Function],
     disallow: [Function],
     equal: [Function],
     exist: [Function],
     forbidden: [Function],
     invalid: [Function],
     not: [Function],
     only: [Function],
     optional: [Function],
     options: [Function],
     prefs: [Function],
     preferences: [Function],
     required: [Function],
     strip: [Function],
     valid: [Function],
     when: [Function],
     ValidationError: [Function: Error],
     version: '17.1.0',
     cache: { provision: [Function: provision] },
     assert: [Function: assert],
     attempt: [Function: attempt],
     build: [Function: build],
     checkPreferences: [Function: checkPreferences],
     compile: [Function: compile],
     defaults: [Function: defaults],
     expression: [Function: expression],
     extend: [Function: extend],
     isError: [Function: isError],
     isExpression: [Function: isTemplate],
     isRef: [Function],
     isSchema: [Function],
     in: [Function: in],
     override: Symbol(override),
     ref: [Function: ref],
     types: [Function: types],
     alt: [Function],
     bool: [Function],
     func: [Function],
     x: [Function: expression],
     trace: [Function: trace],
     untrace: [Function],
     [Symbol(@hapi/lab/coverage/initialize)]: [Function: trace] },
  '$_temp': { ruleset: false, whens: {} },
  _ids: { _byId: Map {}, _byKey: Map {}, _schemaChain: false },
  _preferences: null,
  _valids: null,
  _invalids: null,
  _rules: [],
  _singleRules: Map {},
  _refs: { refs: [] },
  _flags:
   { presence: 'required',
     description: 'From-side entity identifier.' },
  _cache: null,
  '$_terms':
   { alterations: null,
     examples: null,
     externals: null,
     metas: [],
     notes: [],
     shared: null,
     tags: [],
     whens: null,
     replacements: null },
  '$_super': {} }
* _to_ : { type: 'string',
  '$_root':
   { _types:
      Set {
        'alternatives',
        'any',
        'array',
        'boolean',
        'date',
        'function',
        'link',
        'number',
        'object',
        'string',
        'symbol',
        'binary' },
     alternatives: [Function],
     any: [Function],
     array: [Function],
     boolean: [Function],
     date: [Function],
     function: [Function],
     link: [Function],
     number: [Function],
     object: [Function],
     string: [Function],
     symbol: [Function],
     binary: [Function],
     allow: [Function],
     custom: [Function],
     disallow: [Function],
     equal: [Function],
     exist: [Function],
     forbidden: [Function],
     invalid: [Function],
     not: [Function],
     only: [Function],
     optional: [Function],
     options: [Function],
     prefs: [Function],
     preferences: [Function],
     required: [Function],
     strip: [Function],
     valid: [Function],
     when: [Function],
     ValidationError: [Function: Error],
     version: '17.1.0',
     cache: { provision: [Function: provision] },
     assert: [Function: assert],
     attempt: [Function: attempt],
     build: [Function: build],
     checkPreferences: [Function: checkPreferences],
     compile: [Function: compile],
     defaults: [Function: defaults],
     expression: [Function: expression],
     extend: [Function: extend],
     isError: [Function: isError],
     isExpression: [Function: isTemplate],
     isRef: [Function],
     isSchema: [Function],
     in: [Function: in],
     override: Symbol(override),
     ref: [Function: ref],
     types: [Function: types],
     alt: [Function],
     bool: [Function],
     func: [Function],
     x: [Function: expression],
     trace: [Function: trace],
     untrace: [Function],
     [Symbol(@hapi/lab/coverage/initialize)]: [Function: trace] },
  '$_temp': { ruleset: false, whens: {} },
  _ids: { _byId: Map {}, _byKey: Map {}, _schemaChain: false },
  _preferences: null,
  _valids: null,
  _invalids: null,
  _rules: [],
  _singleRules: Map {},
  _refs: { refs: [] },
  _flags:
   { presence: 'required',
     description: 'To-side entity identifier.' },
  _cache: null,
  '$_terms':
   { alterations: null,
     examples: null,
     externals: null,
     metas: [],
     notes: [],
     shared: null,
     tags: [],
     whens: null,
     replacements: null },
  '$_super': {} }




#### Replies With


```
{
  from: '_from_ parameter, as provided',
  to: '_to_ parameter, as provided',
  rel: '_rel_ parameter, as provided',
  graph: '_graph_ parameter, as provided',
  node: {
    f: 'from-side entity identifier',
    t: 'to-side entity identifier',
    r: 'relation name',
    id: 'internal graph node identifier'
  }
}
```


----------
### &laquo; `list:rel,role:graph` &raquo;

List nodes connected by a given relation.




#### Examples



* `list:rel,role:graph,graph:number,rel:lessthan,list:rel`
  * List all nodes in  _number_ graph connected by directed relation _lessthan_

* `list:rel,role:graph,graph:number,rel:lessthan,list:rel,from:<from-id>`
  * List all nodes in  _number_ graph connected by directed relation _lessthan_ with given `from-id`

* `list:rel,role:graph,graph:number,rel:lessthan,list:rel,to:<to-id>`
  * List all nodes in  _number_ graph connected by directed relation _lessthan_ with given `to-id`

* `list:rel,role:graph,graph:number,rel:lessthan,list:rel,to:<to-id>,entity:from`
  * List all nodes in  _number_ graph connected by directed relation _lessthan_ with given `to-id`, loading and including referenced from-side entities

* `list:rel,role:graph,graph:number,rel:lessthan,list:rel,entity:to`
  * List all nodes in  _number_ graph connected by directed relation _lessthan_, loading and including referenced to-side entities
#### Parameters


* _graph_ : { type: 'string',
  '$_root':
   { _types:
      Set {
        'alternatives',
        'any',
        'array',
        'boolean',
        'date',
        'function',
        'link',
        'number',
        'object',
        'string',
        'symbol',
        'binary' },
     alternatives: [Function],
     any: [Function],
     array: [Function],
     boolean: [Function],
     date: [Function],
     function: [Function],
     link: [Function],
     number: [Function],
     object: [Function],
     string: [Function],
     symbol: [Function],
     binary: [Function],
     allow: [Function],
     custom: [Function],
     disallow: [Function],
     equal: [Function],
     exist: [Function],
     forbidden: [Function],
     invalid: [Function],
     not: [Function],
     only: [Function],
     optional: [Function],
     options: [Function],
     prefs: [Function],
     preferences: [Function],
     required: [Function],
     strip: [Function],
     valid: [Function],
     when: [Function],
     ValidationError: [Function: Error],
     version: '17.1.0',
     cache: { provision: [Function: provision] },
     assert: [Function: assert],
     attempt: [Function: attempt],
     build: [Function: build],
     checkPreferences: [Function: checkPreferences],
     compile: [Function: compile],
     defaults: [Function: defaults],
     expression: [Function: expression],
     extend: [Function: extend],
     isError: [Function: isError],
     isExpression: [Function: isTemplate],
     isRef: [Function],
     isSchema: [Function],
     in: [Function: in],
     override: Symbol(override),
     ref: [Function: ref],
     types: [Function: types],
     alt: [Function],
     bool: [Function],
     func: [Function],
     x: [Function: expression],
     trace: [Function: trace],
     untrace: [Function],
     [Symbol(@hapi/lab/coverage/initialize)]: [Function: trace] },
  '$_temp': { ruleset: false, whens: {} },
  _ids: { _byId: Map {}, _byKey: Map {}, _schemaChain: false },
  _preferences: null,
  _valids: null,
  _invalids: null,
  _rules: [],
  _singleRules: Map {},
  _refs: { refs: [] },
  _flags:
   { presence: 'required', description: 'The name of the graph.' },
  _cache: null,
  '$_terms':
   { alterations: null,
     examples: null,
     externals: null,
     metas: [],
     notes: [],
     shared: null,
     tags: [],
     whens: null,
     replacements: null },
  '$_super': {} }
* _rel_ : { type: 'string',
  '$_root':
   { _types:
      Set {
        'alternatives',
        'any',
        'array',
        'boolean',
        'date',
        'function',
        'link',
        'number',
        'object',
        'string',
        'symbol',
        'binary' },
     alternatives: [Function],
     any: [Function],
     array: [Function],
     boolean: [Function],
     date: [Function],
     function: [Function],
     link: [Function],
     number: [Function],
     object: [Function],
     string: [Function],
     symbol: [Function],
     binary: [Function],
     allow: [Function],
     custom: [Function],
     disallow: [Function],
     equal: [Function],
     exist: [Function],
     forbidden: [Function],
     invalid: [Function],
     not: [Function],
     only: [Function],
     optional: [Function],
     options: [Function],
     prefs: [Function],
     preferences: [Function],
     required: [Function],
     strip: [Function],
     valid: [Function],
     when: [Function],
     ValidationError: [Function: Error],
     version: '17.1.0',
     cache: { provision: [Function: provision] },
     assert: [Function: assert],
     attempt: [Function: attempt],
     build: [Function: build],
     checkPreferences: [Function: checkPreferences],
     compile: [Function: compile],
     defaults: [Function: defaults],
     expression: [Function: expression],
     extend: [Function: extend],
     isError: [Function: isError],
     isExpression: [Function: isTemplate],
     isRef: [Function],
     isSchema: [Function],
     in: [Function: in],
     override: Symbol(override),
     ref: [Function: ref],
     types: [Function: types],
     alt: [Function],
     bool: [Function],
     func: [Function],
     x: [Function: expression],
     trace: [Function: trace],
     untrace: [Function],
     [Symbol(@hapi/lab/coverage/initialize)]: [Function: trace] },
  '$_temp': { ruleset: false, whens: {} },
  _ids: { _byId: Map {}, _byKey: Map {}, _schemaChain: false },
  _preferences: null,
  _valids: null,
  _invalids: null,
  _rules: [],
  _singleRules: Map {},
  _refs: { refs: [] },
  _flags:
   { presence: 'required',
     description: 'The name of the relation.' },
  _cache: null,
  '$_terms':
   { alterations: null,
     examples: null,
     externals: null,
     metas: [],
     notes: [],
     shared: null,
     tags: [],
     whens: null,
     replacements: null },
  '$_super': {} }
* _from_ : { type: 'string',
  '$_root':
   { _types:
      Set {
        'alternatives',
        'any',
        'array',
        'boolean',
        'date',
        'function',
        'link',
        'number',
        'object',
        'string',
        'symbol',
        'binary' },
     alternatives: [Function],
     any: [Function],
     array: [Function],
     boolean: [Function],
     date: [Function],
     function: [Function],
     link: [Function],
     number: [Function],
     object: [Function],
     string: [Function],
     symbol: [Function],
     binary: [Function],
     allow: [Function],
     custom: [Function],
     disallow: [Function],
     equal: [Function],
     exist: [Function],
     forbidden: [Function],
     invalid: [Function],
     not: [Function],
     only: [Function],
     optional: [Function],
     options: [Function],
     prefs: [Function],
     preferences: [Function],
     required: [Function],
     strip: [Function],
     valid: [Function],
     when: [Function],
     ValidationError: [Function: Error],
     version: '17.1.0',
     cache: { provision: [Function: provision] },
     assert: [Function: assert],
     attempt: [Function: attempt],
     build: [Function: build],
     checkPreferences: [Function: checkPreferences],
     compile: [Function: compile],
     defaults: [Function: defaults],
     expression: [Function: expression],
     extend: [Function: extend],
     isError: [Function: isError],
     isExpression: [Function: isTemplate],
     isRef: [Function],
     isSchema: [Function],
     in: [Function: in],
     override: Symbol(override),
     ref: [Function: ref],
     types: [Function: types],
     alt: [Function],
     bool: [Function],
     func: [Function],
     x: [Function: expression],
     trace: [Function: trace],
     untrace: [Function],
     [Symbol(@hapi/lab/coverage/initialize)]: [Function: trace] },
  '$_temp': { ruleset: false, whens: {} },
  _ids: { _byId: Map {}, _byKey: Map {}, _schemaChain: false },
  _preferences: null,
  _valids: null,
  _invalids: null,
  _rules: [],
  _singleRules: Map {},
  _refs: { refs: [] },
  _flags: { description: 'From-side entity identifier.' },
  _cache: null,
  '$_terms':
   { alterations: null,
     examples: null,
     externals: null,
     metas: [],
     notes: [],
     shared: null,
     tags: [],
     whens: null,
     replacements: null },
  '$_super': {} }
* _to_ : { type: 'string',
  '$_root':
   { _types:
      Set {
        'alternatives',
        'any',
        'array',
        'boolean',
        'date',
        'function',
        'link',
        'number',
        'object',
        'string',
        'symbol',
        'binary' },
     alternatives: [Function],
     any: [Function],
     array: [Function],
     boolean: [Function],
     date: [Function],
     function: [Function],
     link: [Function],
     number: [Function],
     object: [Function],
     string: [Function],
     symbol: [Function],
     binary: [Function],
     allow: [Function],
     custom: [Function],
     disallow: [Function],
     equal: [Function],
     exist: [Function],
     forbidden: [Function],
     invalid: [Function],
     not: [Function],
     only: [Function],
     optional: [Function],
     options: [Function],
     prefs: [Function],
     preferences: [Function],
     required: [Function],
     strip: [Function],
     valid: [Function],
     when: [Function],
     ValidationError: [Function: Error],
     version: '17.1.0',
     cache: { provision: [Function: provision] },
     assert: [Function: assert],
     attempt: [Function: attempt],
     build: [Function: build],
     checkPreferences: [Function: checkPreferences],
     compile: [Function: compile],
     defaults: [Function: defaults],
     expression: [Function: expression],
     extend: [Function: extend],
     isError: [Function: isError],
     isExpression: [Function: isTemplate],
     isRef: [Function],
     isSchema: [Function],
     in: [Function: in],
     override: Symbol(override),
     ref: [Function: ref],
     types: [Function: types],
     alt: [Function],
     bool: [Function],
     func: [Function],
     x: [Function: expression],
     trace: [Function: trace],
     untrace: [Function],
     [Symbol(@hapi/lab/coverage/initialize)]: [Function: trace] },
  '$_temp': { ruleset: false, whens: {} },
  _ids: { _byId: Map {}, _byKey: Map {}, _schemaChain: false },
  _preferences: null,
  _valids: null,
  _invalids: null,
  _rules: [],
  _singleRules: Map {},
  _refs: { refs: [] },
  _flags: { description: 'To-side entity identifier.' },
  _cache: null,
  '$_terms':
   { alterations: null,
     examples: null,
     externals: null,
     metas: [],
     notes: [],
     shared: null,
     tags: [],
     whens: null,
     replacements: null },
  '$_super': {} }
* _entity_ : { type: 'string',
  '$_root':
   { _types:
      Set {
        'alternatives',
        'any',
        'array',
        'boolean',
        'date',
        'function',
        'link',
        'number',
        'object',
        'string',
        'symbol',
        'binary' },
     alternatives: [Function],
     any: [Function],
     array: [Function],
     boolean: [Function],
     date: [Function],
     function: [Function],
     link: [Function],
     number: [Function],
     object: [Function],
     string: [Function],
     symbol: [Function],
     binary: [Function],
     allow: [Function],
     custom: [Function],
     disallow: [Function],
     equal: [Function],
     exist: [Function],
     forbidden: [Function],
     invalid: [Function],
     not: [Function],
     only: [Function],
     optional: [Function],
     options: [Function],
     prefs: [Function],
     preferences: [Function],
     required: [Function],
     strip: [Function],
     valid: [Function],
     when: [Function],
     ValidationError: [Function: Error],
     version: '17.1.0',
     cache: { provision: [Function: provision] },
     assert: [Function: assert],
     attempt: [Function: attempt],
     build: [Function: build],
     checkPreferences: [Function: checkPreferences],
     compile: [Function: compile],
     defaults: [Function: defaults],
     expression: [Function: expression],
     extend: [Function: extend],
     isError: [Function: isError],
     isExpression: [Function: isTemplate],
     isRef: [Function],
     isSchema: [Function],
     in: [Function: in],
     override: Symbol(override),
     ref: [Function: ref],
     types: [Function: types],
     alt: [Function],
     bool: [Function],
     func: [Function],
     x: [Function: expression],
     trace: [Function: trace],
     untrace: [Function],
     [Symbol(@hapi/lab/coverage/initialize)]: [Function: trace] },
  '$_temp': { ruleset: false, whens: {} },
  _ids: { _byId: Map {}, _byKey: Map {}, _schemaChain: false },
  _preferences: null,
  _valids:
   { _values: Set { 'from', 'to', 'both' },
     _refs: Set {},
     _lowercase: Map { 'from' => 'from', 'to' => 'to', 'both' => 'both' },
     _override: false },
  _invalids: null,
  _rules: [],
  _singleRules: Map {},
  _refs: { refs: [] },
  _flags:
   { only: true,
     description: 'Entity side to load. Values: _from_, _to_, _both_.' },
  _cache: null,
  '$_terms':
   { alterations: null,
     examples: null,
     externals: null,
     metas: [],
     notes: [],
     shared: null,
     tags: [],
     whens: null,
     replacements: null },
  '$_super': {} }




#### Replies With


```
{
  from: '_from_ parameter, as provided',
  to: '_to_ parameter, as provided',
  rel: '_rel_ parameter, as provided',
  graph: '_graph_ parameter, as provided',
  list: [
    {
      f: 'from-side entity identifier',
      t: 'to-side entity identifier',
      r: 'relation name',
      id: 'internal graph node identifier',
      fe: 'from-side entity',
      te: 'to-side entity'
    },
    '...'
  ]
}
```


----------
### &laquo; `role:graph,tree:rel` &raquo;

Load tree of nodes connected by given relation.




#### Examples



* `role:graph,tree:rel,graph:number,rel:lessthan,from:<from-id>`
  * Load tree of nodes from _number_ graph connected by directed relation _lessthan_ with `from-id` nodes at first level, to default depth of 1.

* `role:graph,tree:rel,graph:number,rel:lessthan,from:<from-id>,depth:2,entity:to`
  * Load tree of nodes from _number_ graph connected by directed relation _lessthan_ with `from-id` nodes at first level, to depth 2, loading and returning referenced to-side entities.
#### Parameters


* _graph_ : { type: 'string',
  '$_root':
   { _types:
      Set {
        'alternatives',
        'any',
        'array',
        'boolean',
        'date',
        'function',
        'link',
        'number',
        'object',
        'string',
        'symbol',
        'binary' },
     alternatives: [Function],
     any: [Function],
     array: [Function],
     boolean: [Function],
     date: [Function],
     function: [Function],
     link: [Function],
     number: [Function],
     object: [Function],
     string: [Function],
     symbol: [Function],
     binary: [Function],
     allow: [Function],
     custom: [Function],
     disallow: [Function],
     equal: [Function],
     exist: [Function],
     forbidden: [Function],
     invalid: [Function],
     not: [Function],
     only: [Function],
     optional: [Function],
     options: [Function],
     prefs: [Function],
     preferences: [Function],
     required: [Function],
     strip: [Function],
     valid: [Function],
     when: [Function],
     ValidationError: [Function: Error],
     version: '17.1.0',
     cache: { provision: [Function: provision] },
     assert: [Function: assert],
     attempt: [Function: attempt],
     build: [Function: build],
     checkPreferences: [Function: checkPreferences],
     compile: [Function: compile],
     defaults: [Function: defaults],
     expression: [Function: expression],
     extend: [Function: extend],
     isError: [Function: isError],
     isExpression: [Function: isTemplate],
     isRef: [Function],
     isSchema: [Function],
     in: [Function: in],
     override: Symbol(override),
     ref: [Function: ref],
     types: [Function: types],
     alt: [Function],
     bool: [Function],
     func: [Function],
     x: [Function: expression],
     trace: [Function: trace],
     untrace: [Function],
     [Symbol(@hapi/lab/coverage/initialize)]: [Function: trace] },
  '$_temp': { ruleset: false, whens: {} },
  _ids: { _byId: Map {}, _byKey: Map {}, _schemaChain: false },
  _preferences: null,
  _valids: null,
  _invalids: null,
  _rules: [],
  _singleRules: Map {},
  _refs: { refs: [] },
  _flags:
   { presence: 'required', description: 'The name of the graph.' },
  _cache: null,
  '$_terms':
   { alterations: null,
     examples: null,
     externals: null,
     metas: [],
     notes: [],
     shared: null,
     tags: [],
     whens: null,
     replacements: null },
  '$_super': {} }
* _rel_ : { type: 'string',
  '$_root':
   { _types:
      Set {
        'alternatives',
        'any',
        'array',
        'boolean',
        'date',
        'function',
        'link',
        'number',
        'object',
        'string',
        'symbol',
        'binary' },
     alternatives: [Function],
     any: [Function],
     array: [Function],
     boolean: [Function],
     date: [Function],
     function: [Function],
     link: [Function],
     number: [Function],
     object: [Function],
     string: [Function],
     symbol: [Function],
     binary: [Function],
     allow: [Function],
     custom: [Function],
     disallow: [Function],
     equal: [Function],
     exist: [Function],
     forbidden: [Function],
     invalid: [Function],
     not: [Function],
     only: [Function],
     optional: [Function],
     options: [Function],
     prefs: [Function],
     preferences: [Function],
     required: [Function],
     strip: [Function],
     valid: [Function],
     when: [Function],
     ValidationError: [Function: Error],
     version: '17.1.0',
     cache: { provision: [Function: provision] },
     assert: [Function: assert],
     attempt: [Function: attempt],
     build: [Function: build],
     checkPreferences: [Function: checkPreferences],
     compile: [Function: compile],
     defaults: [Function: defaults],
     expression: [Function: expression],
     extend: [Function: extend],
     isError: [Function: isError],
     isExpression: [Function: isTemplate],
     isRef: [Function],
     isSchema: [Function],
     in: [Function: in],
     override: Symbol(override),
     ref: [Function: ref],
     types: [Function: types],
     alt: [Function],
     bool: [Function],
     func: [Function],
     x: [Function: expression],
     trace: [Function: trace],
     untrace: [Function],
     [Symbol(@hapi/lab/coverage/initialize)]: [Function: trace] },
  '$_temp': { ruleset: false, whens: {} },
  _ids: { _byId: Map {}, _byKey: Map {}, _schemaChain: false },
  _preferences: null,
  _valids: null,
  _invalids: null,
  _rules: [],
  _singleRules: Map {},
  _refs: { refs: [] },
  _flags:
   { presence: 'required',
     description: 'The name of the relation.' },
  _cache: null,
  '$_terms':
   { alterations: null,
     examples: null,
     externals: null,
     metas: [],
     notes: [],
     shared: null,
     tags: [],
     whens: null,
     replacements: null },
  '$_super': {} }
* _from_ : { type: 'string',
  '$_root':
   { _types:
      Set {
        'alternatives',
        'any',
        'array',
        'boolean',
        'date',
        'function',
        'link',
        'number',
        'object',
        'string',
        'symbol',
        'binary' },
     alternatives: [Function],
     any: [Function],
     array: [Function],
     boolean: [Function],
     date: [Function],
     function: [Function],
     link: [Function],
     number: [Function],
     object: [Function],
     string: [Function],
     symbol: [Function],
     binary: [Function],
     allow: [Function],
     custom: [Function],
     disallow: [Function],
     equal: [Function],
     exist: [Function],
     forbidden: [Function],
     invalid: [Function],
     not: [Function],
     only: [Function],
     optional: [Function],
     options: [Function],
     prefs: [Function],
     preferences: [Function],
     required: [Function],
     strip: [Function],
     valid: [Function],
     when: [Function],
     ValidationError: [Function: Error],
     version: '17.1.0',
     cache: { provision: [Function: provision] },
     assert: [Function: assert],
     attempt: [Function: attempt],
     build: [Function: build],
     checkPreferences: [Function: checkPreferences],
     compile: [Function: compile],
     defaults: [Function: defaults],
     expression: [Function: expression],
     extend: [Function: extend],
     isError: [Function: isError],
     isExpression: [Function: isTemplate],
     isRef: [Function],
     isSchema: [Function],
     in: [Function: in],
     override: Symbol(override),
     ref: [Function: ref],
     types: [Function: types],
     alt: [Function],
     bool: [Function],
     func: [Function],
     x: [Function: expression],
     trace: [Function: trace],
     untrace: [Function],
     [Symbol(@hapi/lab/coverage/initialize)]: [Function: trace] },
  '$_temp': { ruleset: false, whens: {} },
  _ids: { _byId: Map {}, _byKey: Map {}, _schemaChain: false },
  _preferences: null,
  _valids: null,
  _invalids: null,
  _rules: [],
  _singleRules: Map {},
  _refs: { refs: [] },
  _flags: { description: 'From-side entity identifier.' },
  _cache: null,
  '$_terms':
   { alterations: null,
     examples: null,
     externals: null,
     metas: [],
     notes: [],
     shared: null,
     tags: [],
     whens: null,
     replacements: null },
  '$_super': {} }
* _to_ : { type: 'string',
  '$_root':
   { _types:
      Set {
        'alternatives',
        'any',
        'array',
        'boolean',
        'date',
        'function',
        'link',
        'number',
        'object',
        'string',
        'symbol',
        'binary' },
     alternatives: [Function],
     any: [Function],
     array: [Function],
     boolean: [Function],
     date: [Function],
     function: [Function],
     link: [Function],
     number: [Function],
     object: [Function],
     string: [Function],
     symbol: [Function],
     binary: [Function],
     allow: [Function],
     custom: [Function],
     disallow: [Function],
     equal: [Function],
     exist: [Function],
     forbidden: [Function],
     invalid: [Function],
     not: [Function],
     only: [Function],
     optional: [Function],
     options: [Function],
     prefs: [Function],
     preferences: [Function],
     required: [Function],
     strip: [Function],
     valid: [Function],
     when: [Function],
     ValidationError: [Function: Error],
     version: '17.1.0',
     cache: { provision: [Function: provision] },
     assert: [Function: assert],
     attempt: [Function: attempt],
     build: [Function: build],
     checkPreferences: [Function: checkPreferences],
     compile: [Function: compile],
     defaults: [Function: defaults],
     expression: [Function: expression],
     extend: [Function: extend],
     isError: [Function: isError],
     isExpression: [Function: isTemplate],
     isRef: [Function],
     isSchema: [Function],
     in: [Function: in],
     override: Symbol(override),
     ref: [Function: ref],
     types: [Function: types],
     alt: [Function],
     bool: [Function],
     func: [Function],
     x: [Function: expression],
     trace: [Function: trace],
     untrace: [Function],
     [Symbol(@hapi/lab/coverage/initialize)]: [Function: trace] },
  '$_temp': { ruleset: false, whens: {} },
  _ids: { _byId: Map {}, _byKey: Map {}, _schemaChain: false },
  _preferences: null,
  _valids: null,
  _invalids: null,
  _rules: [],
  _singleRules: Map {},
  _refs: { refs: [] },
  _flags: { description: 'To-side entity identifier.' },
  _cache: null,
  '$_terms':
   { alterations: null,
     examples: null,
     externals: null,
     metas: [],
     notes: [],
     shared: null,
     tags: [],
     whens: null,
     replacements: null },
  '$_super': {} }
* _depth_ : { type: 'number',
  '$_root':
   { _types:
      Set {
        'alternatives',
        'any',
        'array',
        'boolean',
        'date',
        'function',
        'link',
        'number',
        'object',
        'string',
        'symbol',
        'binary' },
     alternatives: [Function],
     any: [Function],
     array: [Function],
     boolean: [Function],
     date: [Function],
     function: [Function],
     link: [Function],
     number: [Function],
     object: [Function],
     string: [Function],
     symbol: [Function],
     binary: [Function],
     allow: [Function],
     custom: [Function],
     disallow: [Function],
     equal: [Function],
     exist: [Function],
     forbidden: [Function],
     invalid: [Function],
     not: [Function],
     only: [Function],
     optional: [Function],
     options: [Function],
     prefs: [Function],
     preferences: [Function],
     required: [Function],
     strip: [Function],
     valid: [Function],
     when: [Function],
     ValidationError: [Function: Error],
     version: '17.1.0',
     cache: { provision: [Function: provision] },
     assert: [Function: assert],
     attempt: [Function: attempt],
     build: [Function: build],
     checkPreferences: [Function: checkPreferences],
     compile: [Function: compile],
     defaults: [Function: defaults],
     expression: [Function: expression],
     extend: [Function: extend],
     isError: [Function: isError],
     isExpression: [Function: isTemplate],
     isRef: [Function],
     isSchema: [Function],
     in: [Function: in],
     override: Symbol(override),
     ref: [Function: ref],
     types: [Function: types],
     alt: [Function],
     bool: [Function],
     func: [Function],
     x: [Function: expression],
     trace: [Function: trace],
     untrace: [Function],
     [Symbol(@hapi/lab/coverage/initialize)]: [Function: trace] },
  '$_temp': { ruleset: false, whens: {} },
  _ids: { _byId: Map {}, _byKey: Map {}, _schemaChain: false },
  _preferences: null,
  _valids: null,
  _invalids: null,
  _rules: [],
  _singleRules: Map {},
  _refs: { refs: [] },
  _flags: { default: 1, description: 'Depth of graph to traverse.' },
  _cache: null,
  '$_terms':
   { alterations: null,
     examples: null,
     externals: null,
     metas: [],
     notes: [],
     shared: null,
     tags: [],
     whens: null },
  '$_super': {} }
* _entity_ : { type: 'string',
  '$_root':
   { _types:
      Set {
        'alternatives',
        'any',
        'array',
        'boolean',
        'date',
        'function',
        'link',
        'number',
        'object',
        'string',
        'symbol',
        'binary' },
     alternatives: [Function],
     any: [Function],
     array: [Function],
     boolean: [Function],
     date: [Function],
     function: [Function],
     link: [Function],
     number: [Function],
     object: [Function],
     string: [Function],
     symbol: [Function],
     binary: [Function],
     allow: [Function],
     custom: [Function],
     disallow: [Function],
     equal: [Function],
     exist: [Function],
     forbidden: [Function],
     invalid: [Function],
     not: [Function],
     only: [Function],
     optional: [Function],
     options: [Function],
     prefs: [Function],
     preferences: [Function],
     required: [Function],
     strip: [Function],
     valid: [Function],
     when: [Function],
     ValidationError: [Function: Error],
     version: '17.1.0',
     cache: { provision: [Function: provision] },
     assert: [Function: assert],
     attempt: [Function: attempt],
     build: [Function: build],
     checkPreferences: [Function: checkPreferences],
     compile: [Function: compile],
     defaults: [Function: defaults],
     expression: [Function: expression],
     extend: [Function: extend],
     isError: [Function: isError],
     isExpression: [Function: isTemplate],
     isRef: [Function],
     isSchema: [Function],
     in: [Function: in],
     override: Symbol(override),
     ref: [Function: ref],
     types: [Function: types],
     alt: [Function],
     bool: [Function],
     func: [Function],
     x: [Function: expression],
     trace: [Function: trace],
     untrace: [Function],
     [Symbol(@hapi/lab/coverage/initialize)]: [Function: trace] },
  '$_temp': { ruleset: false, whens: {} },
  _ids: { _byId: Map {}, _byKey: Map {}, _schemaChain: false },
  _preferences: null,
  _valids:
   { _values: Set { 'from', 'to', 'both' },
     _refs: Set {},
     _lowercase: Map { 'from' => 'from', 'to' => 'to', 'both' => 'both' },
     _override: false },
  _invalids: null,
  _rules: [],
  _singleRules: Map {},
  _refs: { refs: [] },
  _flags:
   { only: true,
     description: 'Entity side to load. Values: _from_, _to_, _both_.' },
  _cache: null,
  '$_terms':
   { alterations: null,
     examples: null,
     externals: null,
     metas: [],
     notes: [],
     shared: null,
     tags: [],
     whens: null,
     replacements: null },
  '$_super': {} }




#### Replies With


```
{
  from: '_from_ parameter, as provided',
  to: '_to_ parameter, as provided',
  rel: '_rel_ parameter, as provided',
  graph: '_graph_ parameter, as provided',
  c: [
    {
      f: 'from-side entity identifier',
      t: 'to-side entity identifier',
      r: 'relation name',
      id: 'internal graph node identifier',
      fe: 'from-side entity',
      te: 'to-side entity',
      c: [
        '{ ...connected-nodes... }'
      ]
    },
    '...connected-nodes...'
  ]
}
```


----------


<!--END:action-desc-->


[BadgeCoveralls]: https://coveralls.io/repos/senecajs/seneca-graph/badge.svg?branch=master&service=github
[BadgeNpm]: https://badge.fury.io/js/%40seneca%2Fgraph.svg
[BadgeTravis]: https://travis-ci.org/senecajs/seneca-graph.svg?branch=master
[Coveralls]: https://coveralls.io/github/senecajs/seneca-graph?branch=master
[Npm]: https://www.npmjs.com/package/@seneca/graph
[Travis]: https://travis-ci.org/senecajs/seneca-graph?branch=master