Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

graph init: revisit parameters and flow #1952

Open
YaroShkvorets opened this issue Feb 6, 2025 · 0 comments
Open

graph init: revisit parameters and flow #1952

YaroShkvorets opened this issue Feb 6, 2025 · 0 comments
Assignees

Comments

@YaroShkvorets
Copy link
Collaborator

YaroShkvorets commented Feb 6, 2025

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
  1. If one of the --from-* flags is specified then all required flags need to accompany it or command should fail.
  2. If --from-* is not specified we follow interactive flow.
  3. Why --spkg? Change to --from-substreams for uniformity
  4. Each --from-* should have its own method with required/incompatible flag checks
  5. Leverage oclif flag validation where possible
  6. Remove --skip-git flag as planned
  7. Remove --protocol flag, since we have that information in the registry.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant