Commit 44ca8f6
committed
gnd: Replace custom manifest parsing with graph-node types
Replace gnd's lenient manual JSON/YAML parsing with graph-node's
`UnresolvedSubgraphManifest<Chain>::parse()`. This uses the same serde
types as graph-node itself, so required fields like `source.abi` and
`mapping.abis` are now enforced at parse time.
Changes:
- Add `graph-chain-ethereum` as a direct gnd dependency
- Rewrite `load_manifest()` to use `UnresolvedSubgraphManifest::parse()`
- Convert parsed graph-node types into gnd's existing Manifest/DataSource
/Template/Abi types to minimize caller changes
- Re-export unresolved Ethereum types from graph-chain-ethereum for future
validation steps
- Add `UnresolvedSource::address()` accessor on subgraph data sources
- Add tests for missing `source.abi` and missing `mapping.abis` rejection
- Update test manifests to include all required fields1 parent 980d9ac commit 44ca8f6
6 files changed
Lines changed: 279 additions & 137 deletions
File tree
- chain/ethereum/src
- gnd
- src
- commands
- graph/src/data_source
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
27 | 29 | | |
28 | 30 | | |
29 | 31 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
612 | 612 | | |
613 | 613 | | |
614 | 614 | | |
| 615 | + | |
| 616 | + | |
615 | 617 | | |
616 | 618 | | |
617 | 619 | | |
| |||
727 | 729 | | |
728 | 730 | | |
729 | 731 | | |
| 732 | + | |
| 733 | + | |
730 | 734 | | |
731 | 735 | | |
732 | 736 | | |
| |||
0 commit comments