Skip to content
This repository was archived by the owner on Sep 11, 2025. It is now read-only.

Commit 30ed1d3

Browse files
Use JSON Date (#12)
1 parent 9b08389 commit 30ed1d3

File tree

6 files changed

+26
-27
lines changed

6 files changed

+26
-27
lines changed

plugins/as/hmplugin1/assembly/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ export function queryPeople2(): string {
5858
const resp = JSON.parse<PeopleGQLResponse>(results);
5959
const people = resp.data.people;
6060
const duration = resp.extensions!.tracing.duration / 1000000.0;
61+
console.log(`Start: ${resp.extensions!.tracing.startTime.toISOString()}`);
62+
console.log(`End: ${resp.extensions!.tracing.endTime.toISOString()}`);
6163
console.log(`Duration: ${duration}ms`);
6264
return JSON.stringify(people);
6365
}

plugins/as/hmplugin1/package-lock.json

Lines changed: 10 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

plugins/as/hmplugin1/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@
1212
},
1313
"dependencies": {
1414
"hypermode-as": "file:../hypermode-as",
15-
"json-as": "^0.5.67"
15+
"json-as": "^0.6.3"
1616
},
1717
"devDependencies": {
1818
"@assemblyscript/wasi-shim": "^0.1.0",
19-
"assemblyscript": "^0.27.18",
19+
"assemblyscript": "^0.27.20",
2020
"visitor-as": "^0.11.4"
2121
},
2222
"overrides": {

plugins/as/hypermode-as/assembly/index.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,12 @@ export class GQLExtensions {
1212
tracing!: GQLTracing;
1313
}
1414

15-
// TODO: Use Date instead of string when this is fixed:
16-
// https://github.com/JairusSW/as-json/issues/54
17-
1815
// @ts-ignore
1916
@json
2017
class GQLTracing {
2118
version!: u32;
22-
startTime!: string; // Date
23-
endTime!: string; // Date
19+
startTime!: Date
20+
endTime!: Date
2421
duration!: u32;
2522
execution: GQLExecution | null = null;
2623
}

plugins/as/hypermode-as/package-lock.json

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

plugins/as/hypermode-as/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
"license": "MIT",
77
"type": "module",
88
"dependencies": {
9-
"json-as": "^0.5.67"
9+
"json-as": "^0.6.3"
1010
},
1111
"devDependencies": {
12-
"assemblyscript": "^0.27.18",
12+
"assemblyscript": "^0.27.20",
1313
"visitor-as": "^0.11.4"
1414
},
1515
"overrides": {

0 commit comments

Comments
 (0)