> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kinetica.com/llms.txt
> Use this file to discover all available pages before exploring further.

# CreateGraphRequest

> CreateGraphRequest — Kinetica JavaScript API

interface CreateGraphRequest \{\
&#x20;[directed\_graph](#directed_graph)?: boolean;\
&#x20;[edges](#edges): string\[];\
&#x20;[graph\_name](#graph_name): string;\
&#x20;[nodes](#nodes): string\[];\
&#x20;[options](#options)?: Record\<string, string>;\
&#x20;[restrictions](#restrictions): string\[];\
&#x20;[weights](#weights): string\[];\
}

<ul>
  <li>Defined in [src/types.ts:1614](https://github.com/kineticadb/kinetica-api-typescript/blob/master/src/types.ts#L1614)</li>
</ul>

##### Index

### Properties

[directed\_graph?](#directed_graph) [edges](#edges) [graph\_name](#graph_name) [nodes](#nodes) [options?](#options) [restrictions](#restrictions) [weights](#weights)&#x20;

## Properties

### `Optional`directed\_graph

directed\_graph?: boolean

If set to true, the graph will be directed. If set to false, the graph will not be directed. Consult Directed Graphs for more details.

<ul>
  <li>Defined in [src/types.ts:1618](https://github.com/kineticadb/kinetica-api-typescript/blob/master/src/types.ts#L1618)</li>
</ul>

### edges

edges: string\[]

Edges represent the required fundamental topological unit of a graph that typically connect nodes. Edges must be specified using identifiers; identifiers are grouped as combinations. Identifiers can be used with existing column names, e.g., 'table.column AS EDGE\_ID', expressions, e.g., 'SUBSTR(column, 1, 6) AS EDGE\_NODE1\_NAME', or constant values, e.g., "\{'family', 'coworker'} AS EDGE\_LABEL". If using constant values in an identifier combination, the number of values specified must match across the combination.

<ul>
  <li>Defined in [src/types.ts:1639](https://github.com/kineticadb/kinetica-api-typescript/blob/master/src/types.ts#L1639)</li>
</ul>

### graph\_name

graph\_name: string

Name of the graph resource to generate.

<ul>
  <li>Defined in [src/types.ts:1616](https://github.com/kineticadb/kinetica-api-typescript/blob/master/src/types.ts#L1616)</li>
</ul>

### nodes

nodes: string\[]

Nodes represent fundamental topological units of a graph. Nodes must be specified using identifiers; identifiers are grouped as combinations. Identifiers can be used with existing column names, e.g., 'table.column AS NODE\_ID', expressions, e.g., 'ST\_MAKEPOINT(column1, column2) AS NODE\_WKTPOINT', or constant values, e.g., '\{9, 10, 11} AS NODE\_ID'. If using constant values in an identifier combination, the number of values specified must match across the combination.

<ul>
  <li>Defined in [src/types.ts:1628](https://github.com/kineticadb/kinetica-api-typescript/blob/master/src/types.ts#L1628)</li>
</ul>

### `Optional`options

options?: Record\<string, string>

Optional parameters.

<ul>
  <li>Defined in [src/types.ts:1665](https://github.com/kineticadb/kinetica-api-typescript/blob/master/src/types.ts#L1665)</li>
</ul>

### restrictions

restrictions: string\[]

Restrictions represent a method of informing the graph solver which edges and/or nodes should be ignored for the solution. Restrictions must be specified using identifiers; identifiers are grouped as combinations. Identifiers can be used with existing column names, e.g., 'table.column AS RESTRICTIONS\_EDGE\_ID', expressions, e.g., 'column/2 AS RESTRICTIONS\_VALUECOMPARED', or constant values, e.g., '\{0, 0, 0, 1} AS RESTRICTIONS\_ONOFFCOMPARED'. If using constant values in an identifier combination, the number of values specified must match across the combination.

<ul>
  <li>Defined in [src/types.ts:1663](https://github.com/kineticadb/kinetica-api-typescript/blob/master/src/types.ts#L1663)</li>
</ul>

### weights

weights: string\[]

Weights represent a method of informing the graph solver of the cost of including a given edge in a solution. Weights must be specified using identifiers; identifiers are grouped as combinations. Identifiers can be used with existing column names, e.g., 'table.column AS WEIGHTS\_EDGE\_ID', expressions, e.g., 'ST\_LENGTH(wkt) AS WEIGHTS\_VALUESPECIFIED', or constant values, e.g., '\{4, 15} AS WEIGHTS\_VALUESPECIFIED'. If using constant values in an identifier combination, the number of values specified must match across the combination.

<ul>
  <li>Defined in [src/types.ts:1651](https://github.com/kineticadb/kinetica-api-typescript/blob/master/src/types.ts#L1651)</li>
</ul>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.