Compare the two types of nested graphs, or subgraphs, in Graph Toolkit.
You can use subgraphs to organize and simplify a graph. Two types of subgraphs exist in Graph Toolkit: local subgraphs and asset subgraphs. Learn about the differences and use cases of each.
This information covers the types of subgraphs only. For information on how to create a subgraph, refer to Organize with nested graphs.
A local subgraph is a subgraph that exists within another graph, and it is saved to the same graph asset that contains it. Each local subgraph is unique. Changes to one local subgraph don’t affect other local subgraphs. Even if you duplicate a local subgraph node, the duplicate node has a reference to an entirely new local subgraph. Changes to the first subgraph don’t affect the duplicate subgraph.
The recommended use cases for a local subgraph is to use it as a first step to organize a graph or when you need a subgraph but don’t need to reuse its contents.
An asset subgraph is a subgraph that exists as a standalone asset file. Each asset subgraph is reusable across multiple graphs. If you duplicate an asset subgraph node, the duplicate node has a reference to that same asset subgraph. A change made to the asset subgraph propagates to all subgraph nodes that reference it.
The benefit of an asset subgraph is its reuse capability. The recommended use case for an asset subgraph is in a scenario where you need to reuse a subgraph in the same graph or across multiple graphs.