Skip to content

Commit

Permalink
docs: Added new Q&A in Developer FAQ (#625)
Browse files Browse the repository at this point in the history
* docs: Added new Q&A in Developer FAQ

Added new Q&A in Developer FAQ regarding the order of handlers triggered for a data source.

* docs: added info about dynamic data sources on FAQ

* docs: note on ordering of handlers in dynamic data sources added
  • Loading branch information
shiyasmohd authored Apr 15, 2024
1 parent 9fef4dd commit ef21913
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions website/pages/en/developing/creating-a-subgraph.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,8 @@ The triggers for a data source within a block are ordered using the following pr

These ordering rules are subject to change.

> **Note:** When new [dynamic data source](#data-source-templates-for-dynamically-created-contracts) are created, the handlers defined for dynamic data sources will only start processing after all existing data source handlers are processed, and will repeat in the same sequence whenever triggered.

### Getting The ABIs

The ABI file(s) must match your contract(s). There are a few ways to obtain ABI files:
Expand Down
6 changes: 6 additions & 0 deletions website/pages/en/developing/developer-faqs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -136,3 +136,9 @@ The Graph will never charge for the hosted service. The Graph is a decentralized
## 27. How do I update a subgraph on mainnet?

If you’re a subgraph developer, you can deploy a new version of your subgraph to the Subgraph Studio using the CLI. It’ll be private at that point, but if you’re happy with it, you can publish to the decentralized Graph Explorer. This will create a new version of your subgraph that Curators can start signaling on.

## 28. In what order are the event, block, and call handlers triggered for a data source?

Event and call handlers are first ordered by transaction index within the block. Event and call handlers within the same transaction are ordered using a convention: event handlers first then call handlers, each type respecting the order they are defined in the manifest. Block handlers are run after event and call handlers, in the order they are defined in the manifest. Also these ordering rules are subject to change.

When new dynamic data source are created, the handlers defined for dynamic data sources will only start processing after all existing data source handlers are processed, and will repeat in the same sequence whenever triggered.

0 comments on commit ef21913

Please sign in to comment.