> ## 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.

# modify_graph

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/generated/modify_graph.rs#L73-L90)
pub async fn [modify\_graph](https://docs.kinetica.com/content/api/rust/gpudb/struct.Kinetica/modify-graph.md#method.modify_graph)( \&self, graph\_name: [String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html), nodes: [Vec](https://doc.rust-lang.org/1.98.1/alloc/vec/struct.Vec.html)\<[String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html)>, edges: [Vec](https://doc.rust-lang.org/1.98.1/alloc/vec/struct.Vec.html)\<[String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html)>, weights: [Vec](https://doc.rust-lang.org/1.98.1/alloc/vec/struct.Vec.html)\<[String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html)>, restrictions: [Vec](https://doc.rust-lang.org/1.98.1/alloc/vec/struct.Vec.html)\<[String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html)>, ) -> [Result](https://doc.rust-lang.org/1.98.1/core/result/enum.Result.html)\<[ModifyGraphResponse](https://docs.kinetica.com/content/api/rust/generated/api/struct.ModifyGraphResponse.md), [KineticaError](https://docs.kinetica.com/content/api/rust/errors/enum.KineticaError.md)>

Update an existing graph network.Update an existing graph network using given nodes, edges, weights, restrictions, and options.IMPORTANT: It’s highly recommended that you review the Graphs and Solvers concepts documentation, and Graph REST Tutorial before using this endpoint.

##### Arguments

<ul>
  <li>`graph_name` - Name of the graph resource to modify.</li>
  <li>`nodes` - Nodes with which to update existing `nodes` in graph specified by `graph_name`. Review Nodes for more information. 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 raw values, e.g., ‘\{9, 10, 11} AS NODE\_ID’. If using raw values in an identifier combination, the number of values specified must match across the combination. Identifier combination(s) do not have to match the method used to create the graph, e.g., if column names were specified to create the graph, expressions or raw values could also be used to modify the graph.</li>
  <li>`edges` - Edges with which to update existing `edges` in graph specified by `graph_name`. Review Edges for more information. 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 raw values, e.g., “\{‘family’, ‘coworker’} AS EDGE\_LABEL”. If using raw values in an identifier combination, the number of values specified must match across the combination. Identifier combination(s) do not have to match the method used to create the graph, e.g., if column names were specified to create the graph, expressions or raw values could also be used to modify the graph.</li>
  <li>`weights` - Weights with which to update existing `weights` in graph specified by `graph_name`. Review Weights for more information. 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 raw values, e.g., ‘\{4, 15} AS WEIGHTS\_VALUESPECIFIED’. If using raw values in an identifier combination, the number of values specified must match across the combination. Identifier combination(s) do not have to match the method used to create the graph, e.g., if column names were specified to create the graph, expressions or raw values could also be used to modify the graph.</li>
  <li>`restrictions` - Restrictions with which to update existing `restrictions` in graph specified by `graph_name`. Review Restrictions for more information. 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 raw values, e.g., ‘\{0, 0, 0, 1} AS RESTRICTIONS\_ONOFFCOMPARED’. If using raw values in an identifier combination, the number of values specified must match across the combination. Identifier combination(s) do not have to match the method used to create the graph, e.g., if column names were specified to create the graph, expressions or raw values could also be used to modify the graph.</li>
</ul>

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/generated/modify_graph.rs#L155-L179)
pub async fn [modify\_graph\_with\_opts](https://docs.kinetica.com/content/api/rust/gpudb/struct.Kinetica/modify-graph.md#method.modify_graph_with_opts)( \&self, graph\_name: [String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html), nodes: [Vec](https://doc.rust-lang.org/1.98.1/alloc/vec/struct.Vec.html)\<[String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html)>, edges: [Vec](https://doc.rust-lang.org/1.98.1/alloc/vec/struct.Vec.html)\<[String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html)>, weights: [Vec](https://doc.rust-lang.org/1.98.1/alloc/vec/struct.Vec.html)\<[String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html)>, restrictions: [Vec](https://doc.rust-lang.org/1.98.1/alloc/vec/struct.Vec.html)\<[String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html)>, options: [ModifyGraphRequestOptions](https://docs.kinetica.com/content/api/rust/generated/api/struct.ModifyGraphRequestOptions.md), ) -> [Result](https://doc.rust-lang.org/1.98.1/core/result/enum.Result.html)\<[ModifyGraphResponse](https://docs.kinetica.com/content/api/rust/generated/api/struct.ModifyGraphResponse.md), [KineticaError](https://docs.kinetica.com/content/api/rust/errors/enum.KineticaError.md)>

Update an existing graph network.Update an existing graph network using given nodes, edges, weights, restrictions, and options.IMPORTANT: It’s highly recommended that you review the Graphs and Solvers concepts documentation, and Graph REST Tutorial before using this endpoint.

##### Arguments

<ul>
  <li>`graph_name` - Name of the graph resource to modify.</li>
  <li>`nodes` - Nodes with which to update existing `nodes` in graph specified by `graph_name`. Review Nodes for more information. 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 raw values, e.g., ‘\{9, 10, 11} AS NODE\_ID’. If using raw values in an identifier combination, the number of values specified must match across the combination. Identifier combination(s) do not have to match the method used to create the graph, e.g., if column names were specified to create the graph, expressions or raw values could also be used to modify the graph.</li>
  <li>`edges` - Edges with which to update existing `edges` in graph specified by `graph_name`. Review Edges for more information. 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 raw values, e.g., “\{‘family’, ‘coworker’} AS EDGE\_LABEL”. If using raw values in an identifier combination, the number of values specified must match across the combination. Identifier combination(s) do not have to match the method used to create the graph, e.g., if column names were specified to create the graph, expressions or raw values could also be used to modify the graph.</li>
  <li>`weights` - Weights with which to update existing `weights` in graph specified by `graph_name`. Review Weights for more information. 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 raw values, e.g., ‘\{4, 15} AS WEIGHTS\_VALUESPECIFIED’. If using raw values in an identifier combination, the number of values specified must match across the combination. Identifier combination(s) do not have to match the method used to create the graph, e.g., if column names were specified to create the graph, expressions or raw values could also be used to modify the graph.</li>
  <li>`restrictions` - Restrictions with which to update existing `restrictions` in graph specified by `graph_name`. Review Restrictions for more information. 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 raw values, e.g., ‘\{0, 0, 0, 1} AS RESTRICTIONS\_ONOFFCOMPARED’. If using raw values in an identifier combination, the number of values specified must match across the combination. Identifier combination(s) do not have to match the method used to create the graph, e.g., if column names were specified to create the graph, expressions or raw values could also be used to modify the graph.</li>
  <li>`options` - The optional parameters; any left unset take the server’s defaults.</li>
</ul>

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/generated/modify_graph.rs#L182-L193)
pub async fn [modify\_graph\_raw](https://docs.kinetica.com/content/api/rust/gpudb/struct.Kinetica/modify-graph.md#method.modify_graph_raw)( \&self, request: &[ModifyGraphRequest](https://docs.kinetica.com/content/api/rust/generated/api/struct.ModifyGraphRequest.md), ) -> [Result](https://doc.rust-lang.org/1.98.1/core/result/enum.Result.html)\<[ModifyGraphResponse](https://docs.kinetica.com/content/api/rust/generated/api/struct.ModifyGraphResponse.md), [KineticaError](https://docs.kinetica.com/content/api/rust/errors/enum.KineticaError.md)>

Sends a pre-built [`ModifyGraphRequest`](https://docs.kinetica.com/content/api/rust/generated/api/struct.ModifyGraphRequest) to the `/modify/graph` endpoint.

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/generated/modify_graph.rs#L197-L209)
pub async fn [modify\_graph\_from\_url](https://docs.kinetica.com/content/api/rust/gpudb/struct.Kinetica/modify-graph.md#method.modify_graph_from_url)( \&self, url: &[str](https://doc.rust-lang.org/1.98.1/std/primitive.str.html), request: &[ModifyGraphRequest](https://docs.kinetica.com/content/api/rust/generated/api/struct.ModifyGraphRequest.md), ) -> [Result](https://doc.rust-lang.org/1.98.1/core/result/enum.Result.html)\<[ModifyGraphResponse](https://docs.kinetica.com/content/api/rust/generated/api/struct.ModifyGraphResponse.md), [KineticaError](https://docs.kinetica.com/content/api/rust/errors/enum.KineticaError.md)>

Sends a pre-built [`ModifyGraphRequest`](https://docs.kinetica.com/content/api/rust/generated/api/struct.ModifyGraphRequest) to a specific worker URL, bypassing HA head-node selection. Used for multi-head access.


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