@graphprotocol/graph-cli 0.69.0-alpha-20240317093022-fe4274c → 0.69.0-alpha-20240318144933-441f36b
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,14 +1,9 @@
|
|
|
1
1
|
# @graphprotocol/graph-cli
|
|
2
2
|
|
|
3
|
-
## 0.69.0-alpha-
|
|
3
|
+
## 0.69.0-alpha-20240318144933-441f36b
|
|
4
4
|
|
|
5
5
|
### Minor Changes
|
|
6
6
|
|
|
7
|
-
- [#1522](https://github.com/graphprotocol/graph-tooling/pull/1522)
|
|
8
|
-
[`db1272f`](https://github.com/graphprotocol/graph-tooling/commit/db1272f96e698b9d427b7ab6d48f01d67eb1173e)
|
|
9
|
-
Thanks [@dotansimha](https://github.com/dotansimha)! - Added support for handling GraphQL
|
|
10
|
-
`Timestamp` scalar as `i64` (AssemblyScript)
|
|
11
|
-
|
|
12
7
|
- [#1610](https://github.com/graphprotocol/graph-tooling/pull/1610)
|
|
13
8
|
[`fc03add`](https://github.com/graphprotocol/graph-tooling/commit/fc03add1a8510afa49110481b486c8fa56f8c19f)
|
|
14
9
|
Thanks [@yehia67](https://github.com/yehia67)! - Generate `docker-compose.yml` with `graph init`
|
|
@@ -91,7 +91,6 @@ vitest_1.describe.concurrent('Schema code generator', () => {
|
|
|
91
91
|
|
|
92
92
|
# New scalars
|
|
93
93
|
int8: Int8!
|
|
94
|
-
timestamp: Timestamp!
|
|
95
94
|
}
|
|
96
95
|
|
|
97
96
|
type Wallet @entity {
|
|
@@ -297,26 +296,6 @@ vitest_1.describe.concurrent('Schema code generator', () => {
|
|
|
297
296
|
returnType: undefined,
|
|
298
297
|
body: `
|
|
299
298
|
this.set('int8', Value.fromI64(value))
|
|
300
|
-
`,
|
|
301
|
-
},
|
|
302
|
-
{
|
|
303
|
-
name: 'get timestamp',
|
|
304
|
-
params: [],
|
|
305
|
-
returnType: new typescript_1.NamedType('i64'),
|
|
306
|
-
body: `let value = this.get('timestamp')
|
|
307
|
-
if (!value || value.kind == ValueKind.NULL) {
|
|
308
|
-
return 0
|
|
309
|
-
} else {
|
|
310
|
-
return value.toTimestamp()
|
|
311
|
-
}
|
|
312
|
-
`,
|
|
313
|
-
},
|
|
314
|
-
{
|
|
315
|
-
name: 'set timestamp',
|
|
316
|
-
params: [new typescript_1.Param('value', new typescript_1.NamedType('i64'))],
|
|
317
|
-
returnType: undefined,
|
|
318
|
-
body: `
|
|
319
|
-
this.set('timestamp', Value.fromTimestamp(value))
|
|
320
299
|
`,
|
|
321
300
|
},
|
|
322
301
|
{
|
|
@@ -258,7 +258,6 @@ const VALUE_TO_ASSEMBLYSCRIPT = [
|
|
|
258
258
|
['[Boolean]', 'Array<boolean>', (code) => `${code}.toBooleanArray()`],
|
|
259
259
|
['[Int]', 'Array<i32>', (code) => `${code}.toI32Array()`],
|
|
260
260
|
['[Int8]', 'Array<i64>', (code) => `${code}.toI64Array()`],
|
|
261
|
-
['[Timestamp]', 'Array<i64>', (code) => `${code}.toTimestampArray()`],
|
|
262
261
|
['[BigInt]', 'Array<BigInt>', (code) => `${code}.toBigIntArray()`],
|
|
263
262
|
['[ID]', 'Array<string>', (code) => `${code}.toStringArray()`],
|
|
264
263
|
['[String]', 'Array<string>', (code) => `${code}.toStringArray()`],
|
|
@@ -273,7 +272,6 @@ const VALUE_TO_ASSEMBLYSCRIPT = [
|
|
|
273
272
|
['ID', 'string', (code) => `${code}.toString()`],
|
|
274
273
|
['String', 'string', (code) => `${code}.toString()`],
|
|
275
274
|
['BigDecimal', 'BigDecimal', (code) => `${code}.toBigDecimal()`],
|
|
276
|
-
['Timestamp', 'i64', (code) => `${code}.toTimestamp()`],
|
|
277
275
|
[/.*/, 'string', (code) => `${code}.toString()`],
|
|
278
276
|
];
|
|
279
277
|
/**
|
|
@@ -290,7 +288,6 @@ const ASSEMBLYSCRIPT_TO_VALUE = [
|
|
|
290
288
|
['Array<Array<boolean>>', '[[Boolean]]', (code) => `Value.fromBooleanMatrix(${code})`],
|
|
291
289
|
['Array<Array<i32>>', '[[Int]]', (code) => `Value.fromI32Matrix(${code})`],
|
|
292
290
|
['Array<Array<i64>>', '[[Int8]]', (code) => `Value.fromI64Matrix(${code})`],
|
|
293
|
-
['Array<Array<i64>>', '[[Timestamp]]', (code) => `Value.fromTimestampMatrix(${code})`],
|
|
294
291
|
['Array<Array<BigInt>>', '[[BigInt]]', (code) => `Value.fromBigIntMatrix(${code})`],
|
|
295
292
|
['Array<Array<string>>', '[[String]]', (code) => `Value.fromStringMatrix(${code})`],
|
|
296
293
|
['Array<Array<string>>', '[[ID]]', (code) => `Value.fromStringMatrix(${code})`],
|
|
@@ -308,7 +305,6 @@ const ASSEMBLYSCRIPT_TO_VALUE = [
|
|
|
308
305
|
['Array<boolean>', '[Boolean]', (code) => `Value.fromBooleanArray(${code})`],
|
|
309
306
|
['Array<i32>', '[Int]', (code) => `Value.fromI32Array(${code})`],
|
|
310
307
|
['Array<i64>', '[Int8]', (code) => `Value.fromI64Array(${code})`],
|
|
311
|
-
['Array<i64>', '[Timestamp]', (code) => `Value.fromTimestampArray(${code})`],
|
|
312
308
|
['Array<BigInt>', '[BigInt]', (code) => `Value.fromBigIntArray(${code})`],
|
|
313
309
|
['Array<string>', '[String]', (code) => `Value.fromStringArray(${code})`],
|
|
314
310
|
['Array<string>', '[ID]', (code) => `Value.fromStringArray(${code})`],
|
|
@@ -321,7 +317,6 @@ const ASSEMBLYSCRIPT_TO_VALUE = [
|
|
|
321
317
|
['boolean', 'Boolean', (code) => `Value.fromBoolean(${code})`],
|
|
322
318
|
['i32', 'Int', (code) => `Value.fromI32(${code})`],
|
|
323
319
|
['i64', 'Int8', (code) => `Value.fromI64(${code})`],
|
|
324
|
-
['i64', 'Timestamp', (code) => `Value.fromTimestamp(${code})`],
|
|
325
320
|
['BigInt', 'BigInt', (code) => `Value.fromBigInt(${code})`],
|
|
326
321
|
['string', 'String', (code) => `Value.fromString(${code})`],
|
|
327
322
|
['string', 'ID', (code) => `Value.fromString(${code})`],
|
|
@@ -44,7 +44,6 @@ const BUILTIN_SCALAR_TYPES = [
|
|
|
44
44
|
'Bytes',
|
|
45
45
|
'ID',
|
|
46
46
|
'Int8',
|
|
47
|
-
'Timestamp',
|
|
48
47
|
];
|
|
49
48
|
// Type suggestions for common mistakes
|
|
50
49
|
const TYPE_SUGGESTIONS = [
|
|
@@ -65,8 +64,6 @@ const TYPE_SUGGESTIONS = [
|
|
|
65
64
|
['Float', 'BigDecimal'],
|
|
66
65
|
['int', 'Int'],
|
|
67
66
|
['int8', 'Int8'],
|
|
68
|
-
['timestamp', 'Timestamp'],
|
|
69
|
-
['ts', 'Timestamp'],
|
|
70
67
|
['uint', 'BigInt'],
|
|
71
68
|
['owner', 'String'],
|
|
72
69
|
['Owner', 'String'],
|
package/oclif.manifest.json
CHANGED
package/package.json
CHANGED