Type alias CreateGraphOptions

CreateGraphOptions: {
    isDisjoint?: boolean;
    isSmart?: boolean;
    numberOfShards?: number;
    orphanCollections?: (string | ArangoCollection)[] | string | ArangoCollection;
    replicationFactor?: number | "satellite";
    satellites?: (string | ArangoCollection)[];
    smartGraphAttribute?: string;
    waitForSync?: boolean;
    writeConcern?: number;
}

Options for creating a graph.

SmartGraphs, EnterpriseGraphs, and SatelliteGraphs require a cluster and, before ArangoDB 3.12.5, Enterprise Edition.

Type declaration

  • Optional isDisjoint?: boolean

    (Cluster only.) If set to true, the graph will be created as a Disjoint SmartGraph. Only has an effect in combination with smartGraphAttribute or isSmart.

    Default: false

  • Optional isSmart?: boolean

    (Cluster only.) If set to true without a smartGraphAttribute, the graph will be created as an EnterpriseGraph. Setting smartGraphAttribute creates a SmartGraph and automatically enables isSmart.

    Has no effect when replicationFactor is set to "satellite", which creates a SatelliteGraph.

    Default: false

  • Optional numberOfShards?: number

    (Cluster only.) Number of shards that is used for every collection within this graph.

    Has no effect when replicationFactor is set to "satellite".

  • Optional orphanCollections?: (string | ArangoCollection)[] | string | ArangoCollection

    Additional vertex collections. Documents within these collections do not have edges within this graph.

  • Optional replicationFactor?: number | "satellite"

    (Cluster only.) Replication factor used when initially creating collections for this graph.

    Default: 1

  • Optional satellites?: (string | ArangoCollection)[]

    (Cluster only.) Collections to be included in a Hybrid SmartGraph.

  • Optional smartGraphAttribute?: string

    (Cluster only.) Attribute containing the shard key value to use for smart sharding. Setting this option creates a SmartGraph, even if isSmart is omitted. Every vertex must have this attribute. Cannot be modified later.

  • Optional waitForSync?: boolean

    If set to true, the request will wait until all modifications have been synchronized to disk before returning successfully.

    Default: false

  • Optional writeConcern?: number

    (Cluster only.) Write concern for new collections in the graph.

    Has no effect when replicationFactor is set to "satellite".