graph-tooling
graph-tooling copied to clipboard
`graph init`: revisit parameters and flow
There is quite a bit of technical debt with parameter validation. Multiple checks for required/incompatible flags result in spaghetti code and bugs.
Confusing flag combinations result in bad DX, there are a few that no longer needed and can be removed.
Need to streamline and simplify validation and re-evaluate some flags prior to v1 release.
There are 4 ways to init subgraph from command line in non-interactive way:
--from-contract--from-example--from-subgraph--spkg
- If one of the
--from-*flags is specified then all required flags need to accompany it or command should fail. - If
--from-*is not specified we follow interactive flow. - Why
--spkg? Change to--from-substreamsfor uniformity - Each
--from-*should have its own method with required/incompatible flag checks - Leverage oclif flag validation where possible
- Remove
--skip-gitflag as planned - Remove
--protocolflag, since we have that information in the registry.