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

The graph #25

Closed
wants to merge 20 commits into from
Closed

The graph #25

wants to merge 20 commits into from

Conversation

technophile-04
Copy link
Collaborator

@technophile-04 technophile-04 commented May 3, 2024

Description :

To test

  1. clone repo
  2. go to the the-graph branch
  3. yarn install

Then run:

In first terminal :

yarn install && yarn dev

In Second terminal :

yarn cli 

You could choose solidity framework of your choice :), tweaked it a bit to work with both hardhat and foundry

The third question will prompt for whether to select the-graph extension or not. Use space to select / unselect and hit enter.

TIP: for project name use ../{anyName} this will create project outside of this working directory

You could check out generated README.md for instruction's to deploy subgraph locally

^ You will be needing Docker

I think we could maybe do better on generated README.md's but didn't go too crazy and we can iterate later. (Like accepting requirements, readme heading (eg. SE-2 with Subgraph) etc as args)

@rin-st
Copy link
Member

rin-st commented May 4, 2024

Thank you Shiv! This is awesome! 🔥

Tested it and everything works great! (MacOS, m1) Hopefully will play with graph extension next week

Copy link
Collaborator

@Pabl0cks Pabl0cks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome job @technophile-04!!

All cli combinations installed OK on Windows 10 👌.

Testing the different outputs, so far Graph working fine with hardhat after first tests, will continue testing and report back when finish 🙌

This message on graph yarn local-ship, is port 8020 from first message OK?

- Deploying to Graph node http://localhost:8020/
Deployed to http://localhost:8000/subgraphs/name/scaffold-eth/your-contract/graphql

@carletex
Copy link
Member

carletex commented May 6, 2024

Great stuff!! Thanks all.

I'm gonna send this PR to the graph people so they can also test before merging.

src/config.ts Outdated Show resolved Hide resolved
@carletex
Copy link
Member

carletex commented May 6, 2024

Not sure if it should go in this PR, but a one-liner for installing would be great:

npx create-eth@latest --extension the-graph
// or
npx create-eth@latest --e the-graph
// or with the defaults an no questions asked
npx create-eth@latest --e the-graph -y

What do you all think?

Happy to move this to a different issue/PR

@rin-st
Copy link
Member

rin-st commented May 6, 2024

Not sure if it should go in this PR, but a one-liner for installing would be great

I think it's better to create a separate issue for it, since it's not clear what should be under --extension flag. Some context scaffold-eth#801 (comment)

@damianmarti
Copy link
Member

Great job @technophile-04 !!!

Tested on Ubuntu 20.04 and everything worked great, except yarn subgraph:test (getting a 404 error when trying to download the package).

Added a small comment to README for Linux users.

Thanks!!

@JulioMCruz
Copy link

JulioMCruz commented May 6, 2024

@technophile-04 In the instructions, these steps work for me:

  1. yarn install
  2. yarn build
  3. yarn cli

Copy link
Collaborator

@Pabl0cks Pabl0cks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only added a few nitpick comments, it's looking good to me 🙌

GJ!!

templates/extensions/the-graph/README.md.args.mjs Outdated Show resolved Hide resolved
@technophile-04
Copy link
Collaborator Author

technophile-04 commented May 12, 2024

Update README on shipping subgraph to the graph studio. For this PR we pushing people to use do it via graph init command it was also used in this SE-2 X The Graph article.

Created #28 which will allow people to ship the existing subgraph to the graph studio, it needs a bit testing and review 🙌

@positonic
Copy link

Great work @technophile-04 I'm excited to see this merged, as I already started on these changes myself. 🙌

I've tried to message @rin-st to resolve the open comments.

Copy link

@schmidsi schmidsi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some small stylistic inputs. Otherwise, this is amazing!

templates/extensions/the-graph/README.md.args.mjs Outdated Show resolved Hide resolved
templates/extensions/the-graph/README.md.args.mjs Outdated Show resolved Hide resolved
templates/extensions/the-graph/README.md.args.mjs Outdated Show resolved Hide resolved
templates/extensions/the-graph/README.md.args.mjs Outdated Show resolved Hide resolved
src/config.ts Outdated Show resolved Hide resolved
@technophile-04
Copy link
Collaborator Author

Thanks @schmidsi for the great suggestions! , resolved them all.

Also created #28 for easy deployment to sugraph studio but we can iterate on it later 🙌

@carletex
Copy link
Member

Thanks all!

We moved this to https://github.com/scaffold-eth/create-eth-extensions repo (which holds the [curated extensions](

const CURATED_EXTENSIONS: { [key: string]: ExternalExtension } = {
)

To try out you could do :

npx create-eth@latest -e subgraph
  • Notice since subgraph is curated extension / main extension you don't need to mention githubUserName/repoName you could just mention extension name.
  • Also you don't get any warning unlike if you use 3rd party extension:

e

we are also still figuring / smoothing the rough edges on how to integrate extensions (curated vs external) More info in #32 (comment) for more details

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

Successfully merging this pull request may close these issues.

8 participants