November Development Update
Issue 04 / November 2018
We’ve spent the majority of November focused on the Hosted Service. We’ve knocked out several big features and are preparing to launch an internal alpha for testing in the coming weeks. In the meantime, we’ve been working closely with our community to improve the developer experience. Our Discord remains the best place to get in touch as we continue to help teams build their own subgraphs.
Query subgraphs via GraphQL
All subgraphs currently deployed can now be queried and subscribed to over GraphQL using the dedicated
/subgraphs route. A query like
will return the deployed subgraphs with their IDs, repositories, descriptions and the number of entities that have been indexed for them:
"description": "Dharma subgraph",
"description": "Decentraland subgraph",
We will add information such as subgraph status and progress reporting to this soon.
After aligning the different type systems at play last month, we have landed improvements to the
BigInt type. It is now possible to perform basic mathematical operations with
BigInt values (e.g. uint256) in your mappings, including
%. You can also use the methods
Improved subgraph validation
Last month, we introduced subgraph validation as part of
graph codegen and
graph deploy. We have since added more validations to this, including catching invalid contract addresses, invalid ABI references, invalid or unsupported ABI files, events that are not present in the ABI, invalid field types in the GraphQL schema and entity types with missing
id fields. Most of these validations will provide you with a list of possible solutions.
New subgraph manifest fields
Additional fields have been added to subgraph manifests: an optional
repository (e.g. the subgraph repository on GitHub), an optional
description and a
network field under each data source.
The ports used for serving the GraphQL API over HTTP and WebSockets can now be configured with
--http-port (defaulting to 8000) and
--ws-port (defaulting to 8001). The JSON-RPC admin port has been configurable already via
--admin-port (default: 8020).
When indexing multiple subgraphs at the same time, it can be a little hard to tell them apart in the terminal output. To improve this and to store the subgraph logs for further analysis, subgraph logs can now optionally be written to Elasticsearch in parallel to the terminal.
A number of fixes have landed over the past month. The GraphQL parameter
orderBy now works again. Non-derived entity relationships are resolved correctly. Contract addresses starting with
0x are now valid. A concurrency deadlock at Graph Node startup has been fixed.
Exceptions thrown in subgraph mappings are now logged with more detail in order to make debugging easier.
We have added a
graph auth command to permanently save access tokens associated with Graph Nodes in the system’s keychain. These will be looked up automatically when running
graph deploy against known nodes.
We plan to have an alpha version of the hosted service ready internally by Christmas. As we approach that, we are planning to add features like subgraph status and progress reporting, limiting query complexity, and additional GraphQL features like Interface Support.
Have questions or want to chat with the team? Come join our Discord!
If you’re excited about The Graph and would like to explore a position on the team, take a look at our careers page.
— Jannis & The Graph Protocol Team ✌