Releases: graphprotocol/graph-tooling
Releases · graphprotocol/graph-tooling
0.3.0
Changes
- Fixes the
entity.getArray
method declaration - Generates exported TypeScript classes from ABIs
- Switches to
@graphprotocol/graph-ts
for runtime sources - Switches to explicit imports instead of injecting globals into mappings
graph build
andgraph deploy
no longer includegraph codegen
— it's a separate step now
Explicit imports
Every subgraph project now has to add a separate dependency:
npm install --dev @graphprotocol/graph-ts # NPM
yarn add --dev @graphprotocol/graph-ts # Yarn
Types and APIs like Entity
, store
, ipfs
etc. are no longer automatically injected into subgraph mappings as globals. The same goes for types generated from ABIs. They now have to be imported explicitly:
import { Entity, store, ipfs } from '@graphprotocol/graph-ts'
import { SomeContract, SomeEvent } from './types/abis/SomeDataSource/SomeContract'
function handleSomeEvent(event: SomeEvent) {
...
}
Note: The behavior of the provided types and ABIs has not changed.
0.2.4
Developer Preview
This developer preview includes:
- AssemblyScript mappings type and code generation
- AssemblyScript mappings compilation
- Compiling subgraph manifests
- Deploying subgraph manifests to IPFS
- Published as npm package