@graphprotocol/graph-cli 0.47.1 → 0.48.0-alpha-20230425150650-f106dbf

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # @graphprotocol/graph-cli
2
2
 
3
+ ## 0.48.0-alpha-20230425150650-f106dbf
4
+
5
+ ### Minor Changes
6
+
7
+ - [#1306](https://github.com/graphprotocol/graph-tooling/pull/1306)
8
+ [`f106dbf`](https://github.com/graphprotocol/graph-tooling/commit/f106dbf7e39d9c430c255f3eaafb591080c69e86)
9
+ Thanks [@saihaj](https://github.com/saihaj)! - Add loadInBlock function for entities as part of
10
+ codegen
11
+
3
12
  ## 0.47.1
4
13
 
5
14
  ### Patch Changes
@@ -138,6 +138,9 @@ class SchemaCodeGenerator {
138
138
  \`Entities of type ${entityName} must have an ID of type ${idField.gqlTypeName()} but the id '\${id.displayData()}' is of type \${id.displayKind()}\`)
139
139
  store.set('${entityName}', ${idField.tsValueToString()}, this)
140
140
  }`),
141
+ tsCodegen.staticMethod('loadInBlock', [tsCodegen.param('id', tsCodegen.namedType(idField.typeName()))], tsCodegen.nullableType(tsCodegen.namedType(entityName)), `
142
+ return changetype<${entityName} | null>(store.get_in_block('${entityName}', ${idField.tsToString()}))
143
+ `),
141
144
  tsCodegen.staticMethod('load', [tsCodegen.param('id', tsCodegen.namedType(idField.typeName()))], tsCodegen.nullableType(tsCodegen.namedType(entityName)), `
142
145
  return changetype<${entityName} | null>(store.get('${entityName}', ${idField.tsToString()}))
143
146
  `),
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.47.1",
2
+ "version": "0.48.0-alpha-20230425150650-f106dbf",
3
3
  "commands": {
4
4
  "add": {
5
5
  "id": "add",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@graphprotocol/graph-cli",
3
- "version": "0.47.1",
3
+ "version": "0.48.0-alpha-20230425150650-f106dbf",
4
4
  "description": "CLI for building for and deploying to The Graph",
5
5
  "license": "(Apache-2.0 OR MIT)",
6
6
  "engines": {