@graphprotocol/graph-cli 0.47.0 → 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,23 @@
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
+
12
+ ## 0.47.1
13
+
14
+ ### Patch Changes
15
+
16
+ - [#1303](https://github.com/graphprotocol/graph-tooling/pull/1303)
17
+ [`327784f`](https://github.com/graphprotocol/graph-tooling/commit/327784ff79c458c603dbac4b9dfd1f4e5aab6c8c)
18
+ Thanks [@dimitrovmaksim](https://github.com/dimitrovmaksim)! - Fixes 403 Forbidden response when
19
+ fetching the latest matchstick tag
20
+
3
21
  ## 0.47.0
4
22
 
5
23
  ### Minor 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
  `),
@@ -48,7 +48,11 @@ class TestCommand extends core_1.Command {
48
48
  // Fetch the latest version tag if version is not specified with -v/--version or if the version is not cached
49
49
  if (opts.force || (!opts.version && !opts.latestVersion)) {
50
50
  this.log('Fetching latest version tag...');
51
- const result = await (0, fetch_1.fetch)('https://api.github.com/repos/LimeChain/matchstick/releases/latest');
51
+ const result = await (0, fetch_1.fetch)('https://api.github.com/repos/LimeChain/matchstick/releases/latest', {
52
+ headers: {
53
+ 'User-Agent': '@graphprotocol/graph-cli',
54
+ },
55
+ });
52
56
  const json = await result.json();
53
57
  opts.latestVersion = json.tag_name;
54
58
  gluegun_1.filesystem.file(opts.cachePath, {
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.47.0",
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.0",
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": {