graphjin 3.0.17 → 3.0.19
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/README.md +4 -2
- package/package.json +1 -1
- package/wasm/graphjin.wasm +0 -0
- package/wasm/js/wasm_exec.js +9 -2
package/README.md
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
[](https://github.com/dosco/graphjin/blob/master/LICENSE)
|
|
4
4
|
[](https://www.npmjs.com/package/graphjin)
|
|
5
5
|
[](https://hub.docker.com/r/dosco/graphjin/builds)
|
|
6
|
-
[](https://discord.gg/6pSWCTZ)
|
|
7
|
+
[](https://pkg.go.dev/github.com/dosco/graphjin/core/v3)
|
|
8
8
|
[](https://goreportcard.com/report/github.com/dosco/graphjin/core/v3)
|
|
9
9
|
|
|
10
10
|
## Build APIs in 5 minutes not weeks
|
|
@@ -68,6 +68,8 @@ Detailed docs on GraphQL syntax, usecases, JS and GO code examples and it's acti
|
|
|
68
68
|
|
|
69
69
|
## [](https://graphjin.com)
|
|
70
70
|
|
|
71
|
+
## [](https://pkg.go.dev/github.com/dosco/graphjin/tests/v3)
|
|
72
|
+
|
|
71
73
|
## Use with NodeJS
|
|
72
74
|
|
|
73
75
|
GraphJin allows you to use GraphQL and the full power of GraphJin to access to create instant APIs without writing and maintaining lines and lines of database code. GraphJin NodeJS currently only supports Postgres compatible databases working on adding MySQL support as well. Example app in [/examples/nodejs](https://github.com/dosco/graphjin/tree/master/examples/nodejs)
|
package/package.json
CHANGED
package/wasm/graphjin.wasm
CHANGED
|
Binary file
|
package/wasm/js/wasm_exec.js
CHANGED
|
@@ -113,6 +113,10 @@
|
|
|
113
113
|
this.mem.setUint32(addr + 4, Math.floor(v / 4294967296), true);
|
|
114
114
|
}
|
|
115
115
|
|
|
116
|
+
const setInt32 = (addr, v) => {
|
|
117
|
+
this.mem.setUint32(addr + 0, v, true);
|
|
118
|
+
}
|
|
119
|
+
|
|
116
120
|
const getInt64 = (addr) => {
|
|
117
121
|
const low = this.mem.getUint32(addr + 0, true);
|
|
118
122
|
const high = this.mem.getInt32(addr + 4, true);
|
|
@@ -206,7 +210,10 @@
|
|
|
206
210
|
|
|
207
211
|
const timeOrigin = Date.now() - performance.now();
|
|
208
212
|
this.importObject = {
|
|
209
|
-
|
|
213
|
+
_gotest: {
|
|
214
|
+
add: (a, b) => a + b,
|
|
215
|
+
},
|
|
216
|
+
gojs: {
|
|
210
217
|
// Go's SP does not change as long as no Go code is running. Some operations (e.g. calls, getters and setters)
|
|
211
218
|
// may synchronously trigger a Go event handler. This makes Go code get executed in the middle of the imported
|
|
212
219
|
// function. A goroutine can switch to a new stack if the current stack is too small (see morestack function).
|
|
@@ -269,7 +276,7 @@
|
|
|
269
276
|
this._resume();
|
|
270
277
|
}
|
|
271
278
|
},
|
|
272
|
-
getInt64(sp + 8)
|
|
279
|
+
getInt64(sp + 8),
|
|
273
280
|
));
|
|
274
281
|
this.mem.setInt32(sp + 16, id, true);
|
|
275
282
|
},
|