Skip to content

@graphty/graphty-element / session / LoadChoices

Interface: LoadChoices ​

Defined in: graphty-element/src/session/types.ts:1170

What import and LoadDraft.load take.

Extends ​

Properties ​

directed? ​

readonly optional directed?: boolean | "auto"

Defined in: graphty-element/src/session/types.ts:1190

Writes data.directed in the same step.


duplicateIds? ​

readonly optional duplicateIds?: "first" | "refuse" | "merge"

Defined in: graphty-element/src/session/types.ts:1188

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.


layout? ​

readonly optional layout?: "keep" | "recommended"

Defined in: graphty-element/src/session/types.ts:1233

"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 ​

ImportOptions.layout


mapping? ​

readonly optional mapping?: LoadMapping

Defined in: graphty-element/src/session/types.ts:1172

The column roles; a role left out is the element's own reading.


mode? ​

readonly optional mode?: "replace" | "merge"

Defined in: graphty-element/src/session/types.ts:1228

"replace" (the default) empties the graph first, in the same step; "merge" adds to it.

Inherited from ​

ImportOptions.mode


unmatched? ​

readonly optional unmatched?: "add" | "leave-out"

Defined in: graphty-element/src/session/types.ts:1177

An edge naming a node no node row holds: "add" (the default) makes the node, "leave-out" drops the edge.