deep-foundation / deep-foundation/deeplinks
deep.insert does not support _id syntax
- Dominant language
- TypeScript
- Stars
- 13
- Forks
- 8
- PR merge metrics
- No merged PRs in 30d
Description

This code
```js
const spaceId = 2355;
await deep.insert({
type_id: { _id: ["@deep-foundation/rss-to-deep", "Address"] },
in: { data: {
type_id: { _id: [ "@deep-foundation/core", "Contain" ] },
from_id: spaceId
}}
});
```
fails with error:
```js
client.js:397 Uncaught Error: DeepClient Insert Error: parsing Integer expected for input type: PGBigInt failed, expected Number, but encountered Object
at DeepClient.eval (client.js:396:1)
at Generator.throw ()
at rejected (client.js:5:42)
```
# Workaround
Use `await deep.id(...)`
```js
const spaceId = 2355;
await deep.insert({
type_id: await deep.id("@deep-foundation/rss-to-deep", "Address"),
in: { data: {
type_id: await deep.id("@deep-foundation/core", "Contain"),
from_id: spaceId
}}
});
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.