@graphty/graph-io / @graphty/graph-io / SourceBase
Interface: SourceBase<P> ​
Defined in: sources/types.ts:610
What every source has beside its one read method. Experimental.
Type Parameters ​
P ​
P
Properties ​
descriptor? ​
readonlyoptionaldescriptor?:SourceDescriptor
Defined in: sources/types.ts:614
What a form needs; optional for a source used only from code.
id ​
readonlyid:string
Defined in: sources/types.ts:612
Lowercase letters, digits and dashes. A separate name space from formats.
idKey? ​
readonlyoptionalidKey?:string
Defined in: sources/types.ts:616
The node record's id field, when not id.
sourceKey? ​
readonlyoptionalsourceKey?:string
Defined in: sources/types.ts:618
The edge record's source field, when not source.
targetKey? ​
readonlyoptionaltargetKey?:string
Defined in: sources/types.ts:620
The edge record's target field, when not target.
Methods ​
expand()? ​
optionalexpand(request,sink,ctx):Promise<ImportReport>
Defined in: sources/types.ts:628
Fetch the neighborhood of some nodes into the sink.
Parameters ​
request ​
the seeds and how far to go
sink ​
GraphSink
where to write
ctx ​
the context
Returns ​
Promise<ImportReport>
the report
list()? ​
optionallist(query,ctx):Promise<SourceListing>
Defined in: sources/types.ts:642
Search what the source holds.
Parameters ​
query ​
the search
ctx ​
the context
Returns ​
Promise<SourceListing>
one page of results
probe()? ​
optionalprobe(params,ctx):Promise<SourceProbe>
Defined in: sources/types.ts:635
Check the params and the credential without loading.
Parameters ​
params ​
P
the params
ctx ​
the context
Returns ​
Promise<SourceProbe>
what the service said
validate()? ​
optionalvalidate(params,seen,ctx):Promise<SourceFreshness>
Defined in: sources/types.ts:650
Tell whether data loaded earlier changed.
Parameters ​
params ​
P
the params it was loaded with
seen ​
the validators recorded then
ctx ​
the context
Returns ​
Promise<SourceFreshness>
whether it changed