@graphty/graphty-element / index / SourceLoadOptions
Interface: SourceLoadOptions ​
Defined in: graphty-element/src/session/sources/types.ts:23
How a load from a network source runs. The credential is used for this call only: it is never recorded, journaled, saved or sent in an event. Experimental.
Extends ​
Properties ​
credential? ​
readonlyoptionalcredential?:Credential
Defined in: graphty-element/src/session/sources/types.ts:27
The credential; looked up in the element's credential store by source and origin when absent.
cursor? ​
readonlyoptionalcursor?:Readonly<Record<string,string|number|boolean|null>>
Defined in: graphty-element/src/session/sources/types.ts:37
Where to resume a capped load.
directed? ​
readonlyoptionaldirected?:boolean|"auto"
Defined in: graphty-element/src/session/types.ts:1614
Writes data.directed in the same step.
Inherited from ​
duplicateIds? ​
readonlyoptionalduplicateIds?:"first"|"refuse"|"merge"
Defined in: graphty-element/src/session/types.ts:1612
A node row repeating an id an earlier node row of the same load gave: "first" (the default) keeps the first row's node and leaves the later row out; "merge" also writes the later row's values onto that node, later rows winning; "refuse" refuses the load with E_DUPLICATE_ID (details.id). Every case is counted in LoadReport.duplicates, which a report() fills under "refuse" instead of refusing. A row with no usable id is never a duplicate: it is rejected and counted in counts.rejected.
OPEN UNION: later releases may add policies.
Inherited from ​
endpoint? ​
readonlyoptionalendpoint?:string
Defined in: graphty-element/src/session/sources/types.ts:29
The service's address; the source's default when absent.
existing? ​
readonlyoptionalexisting?:"keep"|"update"
Defined in: graphty-element/src/session/sources/types.ts:25
For mode: "merge": keep (the default) or update the attributes of a node already there.
fetch? ​
readonlyoptionalfetch?: {(input,init?):Promise<Response>; (input,init?):Promise<Response>; }
Defined in: graphty-element/src/session/sources/types.ts:41
The fetch to use instead of the global one: recorded responses in a test or a story.
Call Signature ​
(
input,init?):Promise<Response>
Parameters ​
input ​
URL | RequestInfo
init? ​
RequestInit
Returns ​
Promise<Response>
Call Signature ​
(
input,init?):Promise<Response>
Parameters ​
input ​
string | URL | Request
init? ​
RequestInit
Returns ​
Promise<Response>
layout? ​
readonlyoptionallayout?:"keep"|"recommended"
Defined in: graphty-element/src/session/types.ts:1730
"recommended" also chooses a layout for what was loaded, from its shape and its coordinates, in the same step; "keep" (the default) leaves the layout as it is.
Inherited from ​
limits? ​
readonlyoptionallimits?:SourceLimitOptions
Defined in: graphty-element/src/session/sources/types.ts:33
The caps; every default is "no limit".
mapping? ​
readonlyoptionalmapping?:LoadMapping
Defined in: graphty-element/src/session/types.ts:1596
The column roles; a role left out is the element's own reading.
Inherited from ​
mode? ​
readonlyoptionalmode?:"replace"|"merge"
Defined in: graphty-element/src/session/types.ts:1725
"replace" (the default) empties the graph first, in the same step; "merge" adds to it.
Inherited from ​
retry? ​
readonlyoptionalretry?:false|RetryOptions
Defined in: graphty-element/src/session/sources/types.ts:35
How to retry, or false never to.
signal? ​
readonlyoptionalsignal?:AbortSignal
Defined in: graphty-element/src/session/sources/types.ts:39
Cancels the load.
styleOptions? ​
readonlyoptionalstyleOptions?:FileStyleOptions
Defined in: graphty-element/src/session/types.ts:1626
How a file's styles are turned into layers, when styles is "file".
Inherited from ​
styles? ​
readonlyoptionalstyles?:"file"|"none"
Defined in: graphty-element/src/session/types.ts:1624
"file" draws the file's own styles -- its colors, sizes, shapes, labels and the rest -- as style layers above the element's base layers, in the same step, so the graph looks as it does in the program that wrote the file. "none" (the default) loads the data alone. lastImport().styles says which layers the file made and what could not be drawn. catalog.formats() says which formats can carry styles (styles.read).
OPEN UNION: later releases may add choices.
Inherited from ​
unmatched? ​
readonlyoptionalunmatched?:"add"|"leave-out"
Defined in: graphty-element/src/session/types.ts:1601
An edge naming a node no node row holds: "add" (the default) makes the node, "leave-out" drops the edge.
Inherited from ​
write? ​
readonlyoptionalwrite?:boolean
Defined in: graphty-element/src/session/sources/types.ts:31
Allow a query that writes. Never recorded.