graph-doc: automate subgraph documentation generation #2007
denverbaumgartner
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
graphdoc
graphdoc
, see repository here, is a system for automating the generation of subgraph documentation through the utilization of Large Language Models. A production server, running an instance ofgraphdoc
, can be found at the following endpoint: here. To receive a documented subgraph, one must simply provide a valid GraphQL schema to the/inference
endpoint. An example can be ran through theswagger
frontend linked above.Proposal
The current subgraph development flow, utilizing the
graph-cli
, is as follows:graph init
: Initializes the subgraph.subgraph.yaml
,schema.graphql
, and write yourmapping.ts
filesgraph codegen && graph build
: Generate types and other build artifacts.graph auth <DEPLOY_KEY>
: Authenticate through the Subgraph Studio.graph deploy <SUBGRAPH_SLUG>
: Deploy to the Subgraph Studio.It would be ideal if we could add an additional optional step, step 2.5:
2.5:
graph doc
: Theschema.graphql
is passed to the graphdoc server, and returned with documentation to the user.This would involve:
schema.graphql
to a string.schema.graphql
file with theprediction
field of the returned object:Internally,
graphdoc
does validation to ensure that the schema is not mutated, and solely supplemented with useful documentation. Quality checks are in place to attempt to mitigate hallucinations. It is recommended that users still validate returned documentation.Please do reach out with any questions, concerns, or suggestions. Thanks!
Beta Was this translation helpful? Give feedback.
All reactions