Does one typically use the graph-cli to generate your schema.graphql #255
-
Hi, question is essentially in the title. Curious about what tools people use to autogenerate their Follow up question would be, when does it make sense to build that schema from scratch? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
The Ponder Another, related, question is how to make these schema types available in your frontend codebase - is that what you're asking about? If so, graphql-codegen is a good option. We should add an explicit recommendation in the docs, and an repo in Thanks for asking this question @salieflewis! |
Beta Was this translation helpful? Give feedback.
Are you suggesting that Ponder should have an equivalent for the
graph init
and/orgraph add
commands? In other words, a helper/tool that "guesses" what the app'sschema.graphql
should look like based on the ABIs of the contracts that are added? Here's the relevant code fromgraph-cli
.If yes, I haven't given this much thought but agree that it's a problem. FWIW, I'm generally not a fan of CLI commands that modify version controlled files, so I'm wary of going down the same exact path as
graph-cli
. One idea would be a tiny web tool where you can paste an ABI and it spits out a recommendedschema.graphql
.It's also worth noting that Ponder shines most in scenarios where it's actually not u…