Skip to content

Commit

Permalink
Update subgraph.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Giuliano-1 authored Dec 19, 2024
1 parent 1b60337 commit 6008e3b
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions docs/new/how-to-guides/sinks/subgraph/subgraph.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
It is possible to the send data the of a Substreams to a subgraph, thus creating a Substreams-powered Subgraph.

There are two ways of making Substreams sink to a subgraph:
- Create a special [graph_out module](./graph-out.md) that emits an [EntityChanges](https://github.com/streamingfast/substreams-sink-entity-changes/blob/develop/proto/sf/substreams/sink/entity/v1/entity.proto#L11) Protobuf.
The subgraph will read the `EntityChanges` object and consume the data.
- Use the [**Substreams triggers**](./triggers.md) to consume Substreams Protobuf directly inside your subgraph.

## Which Option To Use
It is really a matter of where you put your logic, in the subgraph or the Substreams.
There are two ways of making Substreams sink to a subgraph, it is really a matter of where you put your logic, in the subgraph or the Substreams.

- [Substreams Triggers](./triggers.md): Consume from any Substreams module by importing the Protobuf model through a subgraph handler and write all your transformations using AssemblyScript. This method creates the subgraph entities directly in the subgraph.
- [Substreams Graph-Out](./graph-out.md): By writing the subgraph entities into Substreams, you can consume the module's output directly into `graph-node`. You will create a [graph_out module](./graph-out.md) that emits an [EntityChanges](https://github.com/streamingfast/substreams-sink-entity-changes/blob/develop/proto/sf/substreams/sink/entity/v1/entity.proto#L11) Protobuf.
Expand Down

0 comments on commit 6008e3b

Please sign in to comment.