Skip to content

graphprotocol/example-composable-subgraph

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Apr 2, 2025
1f8bfd6 · Apr 2, 2025

History

11 Commits
Apr 2, 2025
Apr 2, 2025
Apr 2, 2025
Apr 2, 2025
Apr 1, 2025
Feb 10, 2025
Apr 1, 2025
Apr 1, 2025
Apr 1, 2025

Repository files navigation

Subgraph Composition Example

This repository provides a minimal example of how to use the new subgraph composition feature of The Graph.

What is The Graph?

The Graph is a powerful, decentralized protocol that enables seamless querying and indexing of blockchain data. It simplifies the complex process of querying blockchain data, making DApp development faster and easier.

What is subgraph composition?

Subgraph composition allows a subgraph to depend on another subgraph as a data source, allowing one subgraph to consume and react to the data or entity changes of another subgraph. This feature enables modular subgraph architectures.

Instead of interacting directly with on-chain data, a subgraph can be set up to listen to updates from another subgraph and react to entity changes. This can be used for a variety of use cases, such as aggregating data from multiple subgraphs or triggering actions based on changes in external subgraph entities.

How to use subgraph composition?

The example defines 3 source subgraphs:

and a composed subgraph that combines and aggregates the information from the 3 source subgraphs:

About

An example composable subgraph

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published