-
Notifications
You must be signed in to change notification settings - Fork 215
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for indexerHints in manifest (#1561)
* Add support for indexerHints in manifest * add changeset * fix tests for indexer hints * add StringOrBigInt union type for prune field * default indexerHints.prune to auto * update snapshot * update snapshot * update snapshot --------- Co-authored-by: Saihajpreet Singh <[email protected]>
- Loading branch information
1 parent
5b05396
commit 39d5dbf
Showing
16 changed files
with
137 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@graphprotocol/graph-cli': minor | ||
--- | ||
|
||
Add support for indexerHints in manifest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[ | ||
{ | ||
"type": "event", | ||
"name": "ExampleEvent", | ||
"inputs": [{ "type": "string" }] | ||
} | ||
] |
Empty file.
4 changes: 4 additions & 0 deletions
4
packages/cli/tests/cli/validation/indexer-hints/schema.graphql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
type MyEntity @entity { | ||
id: ID! | ||
x: BigDecimal! | ||
} |
26 changes: 26 additions & 0 deletions
26
packages/cli/tests/cli/validation/indexer-hints/subgraph.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
specVersion: 0.0.1 | ||
repository: https://github.com/graphprotocol/test-subgraph | ||
description: Test subgraph | ||
schema: | ||
file: ./schema.graphql | ||
indexerHints: | ||
prune: 100 | ||
dataSources: | ||
- kind: ethereum/contract | ||
name: ExampleSubgraph | ||
source: | ||
abi: ExampleContract | ||
mapping: | ||
kind: ethereum/events | ||
apiVersion: 0.0.5 | ||
language: wasm/assemblyscript | ||
file: ./mapping.ts | ||
entities: | ||
- ExampleEntity | ||
abis: | ||
- name: ExampleContract | ||
file: ./Abi.json | ||
eventHandlers: | ||
- event: ExampleEvent(string) | ||
topic0: b74a38eb2ebca56512a2bb0283f335555a4a4dac46ab998d65fd76f9027dca70 | ||
handler: handleExampleEvent |