Skip to content

[Feature] Graph Node Dev Mode: Minimal Setup Local Subgraph Deployment with --watch Support #5977

@incrypto32

Description

@incrypto32
Member

Description

Graph Node Dev Mode will make local subgraph development way easier. This mode will let devs iterate fast by watching file changes and auto-redeploying subgraphs no more messing around with IPFS or PostgreSQL config.

Goal

Let developers develop and deploy subgraphs locally with:

  • No IPFS dependency
  • No manual PostgreSQL setup ( Still need to install postgres )
  • Super minimal configuration

Current Scope

  • Add --watch flag to gnd
  • When used:
    • Watches the build/ directory for any chanes
    • Auto redeploys the subgraph to local graph-node whenever files change
    • Shows the subgraph and GraphiQL URLs for immediate testing
  • Subgraphs deploy straight from filesystem (no IPFS)
  • Rebuilds still require manual triggering via gnd build
  • Use pg_temp to:
    • Make a temporary Postgres instance inside build folder
    • Eliminate user database configuration

Tasks

  • Create seperate graphnode-dev binary
    Refactor existing main function for reuse in new binary
    Make filesystem-based IPFS link resolver for subgraph deployment
    Add file watching code to trigger redeploys when files change
    Add logic to kill/restart node cleanly when files update
    Plug in pg_temp to auto provision temporary databases
    Support for Grafting
    Support for subgraph composition locally
    Implement build pipeline to build the new binary
    Graph CLI to install this binary
    Build filesystem-based IPFS client (for file data sources)

This will significantly improve the local development experience by removing configuration barriers.

Are you aware of any blockers that must be resolved before implementing this feature? If so, which? Link to any relevant GitHub issues.

No response

Some information to help us out

  • Tick this box if you plan on implementing this feature yourself.
    I have searched the issue tracker to make sure this issue is not a duplicate.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Development

    Participants

    @fordN@incrypto32

    Issue actions

      [Feature] Graph Node Dev Mode: Minimal Setup Local Subgraph Deployment with --watch Support · Issue #5977 · graphprotocol/graph-node