Support reading protobuf definitions contained within a Substreams package #1639
Closed
alex-pakalniskis
started this conversation in
Ideas
Replies: 1 comment
-
The say It would be neat that this be done in the right place, |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Problem
Even though Substreams packages contain relevant protobuf definitions, Substreams-powered subgraph developers are unable to reference those protobuf definitions when generating AssemblyScript types for their subgraph with
protoc
. See this exampleprotoc
command supporting wildcard matching of protobuf files.protoc --plugin=./node_modules/protobuf-as/bin/protoc-gen-as --as_out=src/pb/ ./proto/*.proto
protoc
does not natively parse Substreams packages, so users are left unable to proceed unless they source the required files. Furthermore, protobuf files are not easily found on the Substreams registry, so users must search GitHub and hope for the best. Locating the exactly correct protobuf definition files for a Substreams package adds unnecessary friction to the Substreams-powered subgraph developer experience.Potential solution
Enable Graph CLI to generate AssemblyScript types from the
*.proto
files contained in a Substreams package (perhaps its just a nice wrapper forprotoc
+protobuf-as
)Beta Was this translation helpful? Give feedback.
All reactions