github graphprotocol/graph-tooling v0.15.0

latest releases: @graphprotocol/graph-cli@0.71.1, @graphprotocol/graph-ts@0.35.1, @graphprotocol/graph-cli@0.71.0...
4 years ago

Fallible contract calls (#332)

Calls to contract functions can fail due to assertions in the contract. Until now there was no way to handle this in subgraphs gracefully. This release introduces new try_someContractFunction call variants that return a result object with reverted and value fields. These can then be used in mappings to handle call failures.

An example can be found in the documentation.

Top-level templates (#319)

Data source templates have been moved to a top-level templates field in the manifest. The data source templates documentation has been updated accordingly.

Top-level templates simplify creating new data sources at runtime: templates can now be referred to from all data sources and can create new data sources from other templates as well.

This also affects subgraph validation and code generation in a few ways. While Graph Node >= 0.15.0 still allows subgraphs with nested templates to run, Graph CLI now rejects such subgraphs. Code generation now puts all generated template classes into a single templates.ts file.

Other Changes

  • Only upload files to IPFS once if they are used in manifests multiple times (#337).
  • Fix subgraph migrations to replace all apiVersion occurrences in manifests (#337).
  • Add support for arrays of Ethereum tuples / Solidity structs (#320).
  • Update dependencies: graphql, ipfs-http-client, gluegun, eslint, jest, eslint-utils, mixin-deep, keytar, lodash.

Don't miss a new graph-tooling release

NewReleases is sending notifications on new releases.