Comments (4)
@saihaj can I pick this to work on next?
from graph-tooling.
go for it @joshuanazareth97
from graph-tooling.
@saihaj Notes on my understanding / the implementation I am planning:
- As I understand it, there are 2 locations from which we could receive spkgPath: (1) flag (2) interactive prompt
- The value received from either of these is passed into the same
initSubgraphFromContract
method, which then adds this to the manifest file undersource
- Currently, the file must exist in the path relative to the directory that
graph init
is called in
Approach:
- Change the validation for the spkg file to also pass for the URL format above (spkg.io.../.../)
- If we receive a URL, download the file into the current directory
- In this case spkgPath becomes the name of the spkg file, since it is in the root of the current directory
- Continue as before, passing spkgPath into the manifest, just like with local files
Bonus:
- Potential UX improvement: If a URL is passed, we can further ask the user which directory they want to download the spkg file into, defaulting to the current dir. This would give more control to the user, but would require additional logic for creating non-existent folders etc.
Interested to know your thoughts around this approach.
from graph-tooling.
Hey @saihaj, have implemented this using a slight variation of the approach above. have not yet implemented the bonus feature I mentioned, do let me know if there's anything you'd like me to change?
from graph-tooling.
Related Issues (20)
- graphCLI using the wrong endpoint for etherscan ethereum HOT 1
- outdated assemblyscript dependency
- handle the tuple returned this error: "LendAsLimitOrder(indexed ..." not found in contract "Contract" of data source
- `graph protogen` command HOT 5
- Order list of evm chains in `graph init` HOT 7
- fix `etherlink-testnet` url HOT 1
- Project Roadmap HOT 1
- Project Roadmap HOT 1
- Project Roadmap HOT 1
- Project Roadmap HOT 1
- Project Roadmap HOT 1
- add `graph publish` command
- allow subgraph manifest to refer to `spkg.io`
- allow passing private key and bypassing web ui for `graph publish` HOT 3
- Build step validation for network names
- Allow passing `--subgraph XXX` to `graph publish` to publish a new version of an existing subgraph
- 'publish' command should allow upgrading an existing subgraph HOT 1
- show warning if user is using unsupported node.js version
- [BUG] camelCase to snake-case conversion issue during `graph init`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from graph-tooling.