Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@ title: Aggregate Data Using Subgraph Composition
sidebarTitle: 'Build a Composable Subgraph with Multiple Subgraphs'
---

Optimize your Subgraph by merging data from three independent, source Subgraphs into a single composable Subgraph to enhance data aggregation.
Optimize your Subgraph by merging data from 3 independent, source Subgraphs into a single composable Subgraph to enhance data aggregation.

> Important Reminders:
>
> - Subgraph composition is built into the CLI, and you can deploy with [Subgraph Studio](https://thegraph.com/studio/).
> - This feature requires `specVersion` 1.3.0.
> - Source subgraphs cannot be using pruning.

## Overview

Expand All @@ -24,7 +25,7 @@ To deploy **all** Subgraphs locally, you must have the following:

## Get Started

The following guide provides examples for defining three source Subgraphs to create one powerful composed Subgraph.
The following guide provides examples for defining 3 source Subgraphs to create one powerful composed Subgraph.

### Specifics

Expand Down Expand Up @@ -72,7 +73,7 @@ This third source Subgraph indexes the size of each block. To deploy this Subgra

### Step 4. Combine Into Block Stats Subgraph

This composed Subgraph combines and aggregates the information from the three source Subgraphs above, providing a unified view of block statistics. To deploy this Subgraph locally, run the same commands as above.
This composed Subgraph combines and aggregates the information from the source Subgraphs above, providing a unified view of block statistics. To deploy this Subgraph locally, run the same commands as above.

> Note:
>
Expand All @@ -83,12 +84,12 @@ This composed Subgraph combines and aggregates the information from the three so
#### Key Functions

- It provides a consolidated data model that encompasses all relevant block metrics.
- It combines data from three source Subgraphs, and provides a comprehensive view of block statistics, enabling more complex queries and analyses.
- It combines data from 3 source Subgraphs, and provides a comprehensive view of block statistics, enabling more complex queries and analyses.

## Key Takeaways

- This powerful tool will scale your Subgraph development and allow you to combine multiple Subgraphs.
- The setup includes the deployment of three source Subgraphs and one final deployment of the composed Subgraph.
- The setup includes the deployment of 3 source Subgraphs and one final deployment of the composed Subgraph.
- This feature unlocks scalability, simplifying both development and maintenance efficiency.

## Additional Resources
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ Leverage Subgraph composition to speed up development time. Create a base Subgra
> Important Reminders:
>
> - Subgraph composition is built into the CLI, and you can deploy with [Subgraph Studio](https://thegraph.com/studio/).
> - You can use existing Subgraphs, but they must be redeployed with `specVersion` 1.3.0, which doesn't require you to write new code.
> - You may want to restructure your Subgraph to split out the logic as you move to a composable Subgraph world.
> - This feature requires `specVersion` 1.3.0.
> - Source subgraphs cannot be using pruning.

## Introduction

Expand Down Expand Up @@ -136,4 +136,4 @@ This approach unlocks composability and scalability, simplifying both developmen

To use other advanced features in your Subgraph, check out [Subgraph advanced features](/developing/creating/advanced/) and [this Subgraph composition example repo](https://github.com/incrypto32/subgraph-composition-sample-subgraph).

To learn how to define three source Subgraphs, check out [this Subgraph composition example repo](https://github.com/isum/subgraph-composition-example).
To learn how to define source Subgraphs, check out [this Subgraph composition example repo](https://github.com/isum/subgraph-composition-example).