Skip to content

@graphty/graphty-element / index / SourceLimitOptions

Interface: SourceLimitOptions ​

Defined in: graph-io/dist/src/sources/types.d.ts:150

The caps of a load. Every default is "no limit". Experimental.

Properties ​

maxBytes? ​

readonly optional maxBytes?: number

Defined in: graph-io/dist/src/sources/types.d.ts:160

Stop once this many decoded response bytes were read.


maxEdges? ​

readonly optional maxEdges?: number

Defined in: graph-io/dist/src/sources/types.d.ts:158

Stop once this many edges were written. Checked after each page, as maxNodes is.


maxNodes? ​

readonly optional maxNodes?: number

Defined in: graph-io/dist/src/sources/types.d.ts:156

Stop once this many nodes were written. Checked after each page a source returns, so a load can end one page past it (a page of works whose references become stub nodes can be thousands); a database source also sends it to the server as a LIMIT.


maxRequests? ​

readonly optional maxRequests?: number

Defined in: graph-io/dist/src/sources/types.d.ts:162

Stop before sending more requests than this.


onLimit? ​

readonly optional onLimit?: "error" | "stop"

Defined in: graph-io/dist/src/sources/types.d.ts:170

"stop" (default): keep what came first, warn W_SOURCE_LIMIT and record where to resume. "error": fail with E_SOURCE_LIMIT.

Default Value ​

ts
"stop"

timeoutMs? ​

readonly optional timeoutMs?: number

Defined in: graph-io/dist/src/sources/types.d.ts:164

Fail with E_SOURCE_TIMEOUT once the load has run this long.