@graphprotocol/graph-cli 0.67.2 → 0.68.0-alpha-20240130132724-acbce29
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.68.0-alpha-20240130132724-acbce29
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#1522](https://github.com/graphprotocol/graph-tooling/pull/1522)
|
|
8
|
+
[`acbce29`](https://github.com/graphprotocol/graph-tooling/commit/acbce29256ac4d17b5b560e21a77c56762d66814)
|
|
9
|
+
Thanks [@dotansimha](https://github.com/dotansimha)! - Added support for handling GraphQL
|
|
10
|
+
`Timestamp` scalar as `i64` (AssemblyScript)
|
|
11
|
+
|
|
3
12
|
## 0.67.2
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
|
@@ -91,6 +91,7 @@ vitest_1.describe.concurrent('Schema code generator', () => {
|
|
|
91
91
|
|
|
92
92
|
# New scalars
|
|
93
93
|
int8: Int8!
|
|
94
|
+
ts: Timestamp!
|
|
94
95
|
}
|
|
95
96
|
|
|
96
97
|
type Wallet @entity {
|
|
@@ -296,6 +297,26 @@ vitest_1.describe.concurrent('Schema code generator', () => {
|
|
|
296
297
|
returnType: undefined,
|
|
297
298
|
body: `
|
|
298
299
|
this.set('int8', Value.fromI64(value))
|
|
300
|
+
`,
|
|
301
|
+
},
|
|
302
|
+
{
|
|
303
|
+
name: 'get timtestamp',
|
|
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.toI64()
|
|
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.fromI64(value))
|
|
299
320
|
`,
|
|
300
321
|
},
|
|
301
322
|
{
|
|
@@ -258,6 +258,7 @@ 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}.toI64Array()`],
|
|
261
262
|
['[BigInt]', 'Array<BigInt>', (code) => `${code}.toBigIntArray()`],
|
|
262
263
|
['[ID]', 'Array<string>', (code) => `${code}.toStringArray()`],
|
|
263
264
|
['[String]', 'Array<string>', (code) => `${code}.toStringArray()`],
|
|
@@ -272,6 +273,7 @@ const VALUE_TO_ASSEMBLYSCRIPT = [
|
|
|
272
273
|
['ID', 'string', (code) => `${code}.toString()`],
|
|
273
274
|
['String', 'string', (code) => `${code}.toString()`],
|
|
274
275
|
['BigDecimal', 'BigDecimal', (code) => `${code}.toBigDecimal()`],
|
|
276
|
+
['Timestamp', 'i64', (code) => `${code}.toI64()`],
|
|
275
277
|
[/.*/, 'string', (code) => `${code}.toString()`],
|
|
276
278
|
];
|
|
277
279
|
/**
|
|
@@ -288,6 +290,7 @@ const ASSEMBLYSCRIPT_TO_VALUE = [
|
|
|
288
290
|
['Array<Array<boolean>>', '[[Boolean]]', (code) => `Value.fromBooleanMatrix(${code})`],
|
|
289
291
|
['Array<Array<i32>>', '[[Int]]', (code) => `Value.fromI32Matrix(${code})`],
|
|
290
292
|
['Array<Array<i64>>', '[[Int8]]', (code) => `Value.fromI64Matrix(${code})`],
|
|
293
|
+
['Array<Array<i64>>', '[[Timestamp]]', (code) => `Value.fromI64Matrix(${code})`],
|
|
291
294
|
['Array<Array<BigInt>>', '[[BigInt]]', (code) => `Value.fromBigIntMatrix(${code})`],
|
|
292
295
|
['Array<Array<string>>', '[[String]]', (code) => `Value.fromStringMatrix(${code})`],
|
|
293
296
|
['Array<Array<string>>', '[[ID]]', (code) => `Value.fromStringMatrix(${code})`],
|
|
@@ -305,6 +308,7 @@ const ASSEMBLYSCRIPT_TO_VALUE = [
|
|
|
305
308
|
['Array<boolean>', '[Boolean]', (code) => `Value.fromBooleanArray(${code})`],
|
|
306
309
|
['Array<i32>', '[Int]', (code) => `Value.fromI32Array(${code})`],
|
|
307
310
|
['Array<i64>', '[Int8]', (code) => `Value.fromI64Array(${code})`],
|
|
311
|
+
['Array<i64>', '[Timestamp]', (code) => `Value.fromI64Array(${code})`],
|
|
308
312
|
['Array<BigInt>', '[BigInt]', (code) => `Value.fromBigIntArray(${code})`],
|
|
309
313
|
['Array<string>', '[String]', (code) => `Value.fromStringArray(${code})`],
|
|
310
314
|
['Array<string>', '[ID]', (code) => `Value.fromStringArray(${code})`],
|
|
@@ -317,6 +321,7 @@ const ASSEMBLYSCRIPT_TO_VALUE = [
|
|
|
317
321
|
['boolean', 'Boolean', (code) => `Value.fromBoolean(${code})`],
|
|
318
322
|
['i32', 'Int', (code) => `Value.fromI32(${code})`],
|
|
319
323
|
['i64', 'Int8', (code) => `Value.fromI64(${code})`],
|
|
324
|
+
['i64', 'Timestamp', (code) => `Value.fromI64(${code})`],
|
|
320
325
|
['BigInt', 'BigInt', (code) => `Value.fromBigInt(${code})`],
|
|
321
326
|
['string', 'String', (code) => `Value.fromString(${code})`],
|
|
322
327
|
['string', 'ID', (code) => `Value.fromString(${code})`],
|
|
@@ -44,6 +44,7 @@ const BUILTIN_SCALAR_TYPES = [
|
|
|
44
44
|
'Bytes',
|
|
45
45
|
'ID',
|
|
46
46
|
'Int8',
|
|
47
|
+
'Timestamp',
|
|
47
48
|
];
|
|
48
49
|
// Type suggestions for common mistakes
|
|
49
50
|
const TYPE_SUGGESTIONS = [
|
|
@@ -64,6 +65,8 @@ const TYPE_SUGGESTIONS = [
|
|
|
64
65
|
['Float', 'BigDecimal'],
|
|
65
66
|
['int', 'Int'],
|
|
66
67
|
['int8', 'Int8'],
|
|
68
|
+
['timestamp', 'Timestamp'],
|
|
69
|
+
['ts', 'Timestamp'],
|
|
67
70
|
['uint', 'BigInt'],
|
|
68
71
|
['owner', 'String'],
|
|
69
72
|
['Owner', 'String'],
|
package/oclif.manifest.json
CHANGED