Open pi0neerpat opened 3 years ago
Seems like this was the original intention (https://github.com/graphprotocol/graph-cli/issues/79#issue-346711442) but for some reason only changes to the subgraph.yaml trigger deployment
Theoretically it should recompile if you change a mapping file:
https://github.com/graphprotocol/graph-cli/blob/master/src/compiler.js#L131-L137
As I understand that code snipped, it does not recompile if you change a file that is not directly referenced in subgraph.yaml
but imported. Can you confirm this?
Well it actually doesn't recompile for any files referenced in subgraph.yaml
. Only directly changing subgraph.yaml
triggers re-compile. Maybe this is a bug?
@graphprotocol/graph-cli
v0.18.0
Working here currently: https://github.com/superfluid-finance/protocol-monorepo/tree/subgraph-token-tracking-improvements/packages/subgraph.
"watch": "graph deploy superfluid-test --node http://localhost:8020/ --ipfs http://localhost:5001 --watch"
What I would like is for all relevant files in /mappings/
to trigger recompile.
What I would like is for all relevant files in /mappings/ to trigger recompile.
I agree. Added it to our backlog.
Feature
Changes to mapping files should trigger a re-deploy when using
graph deploy --watch
Potential solution
Add the mappings folder here: https://github.com/graphprotocol/graph-cli/blob/67fcc903cf2ce00463812a94ce81e6262e37371f/src/compiler.js#L130