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

Allow network localhost durning graph init #1854

Open
schmidsi opened this issue Dec 18, 2024 · 4 comments
Open

Allow network localhost durning graph init #1854

schmidsi opened this issue Dec 18, 2024 · 4 comments

Comments

@schmidsi
Copy link
Member

When I try to initialize a subgraph, I'm forced to select a public chain from the registry. It's a pretty common use-case to start developing a subgraph against a local hardhat/anvil node.

$ graph init
 ›   Warning: In next major version, this flag will be removed. By default we will
 ›   stop initializing a Git repository.
? Network … localhost
Other · other network not on the list
< 112 more - type to filter >

Selecting other exits the wizard:

graph init
 ›   Warning: In next major version, this flag will be removed. By default we will
 ›   stop initializing a Git repository.
✔ Network · N/A

  The chain list is populated from the Networks Registry:

  https://github.com/graphprotocol/networks-registry

  To add a chain to the registry you can create an issue or submit a PR
@schmidsi
Copy link
Member Author

It should continue the flow but forcing to specify a path to an ABI file instead of trying to download the ABI from a blockexplorer in my opinion.

@YaroShkvorets
Copy link
Collaborator

YaroShkvorets commented Dec 18, 2024

Good point.
I like having "Other" option that gives you a way out if you can't find the chain you are looking for. From UX perspective.
Perhaps we can add "Local Node" as an option here.

@YaroShkvorets
Copy link
Collaborator

Just checked earlier versions of graph cli and not seeing "localhost" option. How was it handled before?

@schmidsi
Copy link
Member Author

It wasn't. It's a new feature request.

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

2 participants