deep-foundation / deep-foundation/deeplinks

Unable to pass number instead of bigint_comparison_exp when using tree selecting

Open
#116 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
13
Forks
8
PR merge metrics
No merged PRs in 30d

Description

# Actual
```js
await deep.select({
up: {
parent_id: 1521,
tree_id: {_eq: await deep.id("@deep-foundation/dialog", "DialogTree")}
}
})
```
```
Uncaught Error: expected an object for type "bigint_comparison_exp", but found a number
```
# Expected
```js
await deep.select({
up: {
parent_id: 1521,
tree_id: {_eq: await deep.id("@deep-foundation/dialog", "DialogTree")}
}
})
```
```
{data: Array(0), loading: false, networkStatus: 7}
```
# Workaround
```js
await deep.select({
up: {
parent_id: {_eq: 1521},
tree_id: {_eq: await deep.id("@deep-foundation/dialog", "DialogTree")}
}
})
```
```
{data: Array(0), loading: false, networkStatus: 7}
```

# Additional information
Both [BoolExpTree](https://github.com/deep-foundation/deeplinks/blob/71eae8c5d5879e67a157bdffe538e9f3709d4b77/imports/client_types.ts#L99) and [BoolExpLink](https://github.com/deep-foundation/deeplinks/blob/71eae8c5d5879e67a157bdffe538e9f3709d4b77/imports/client_types.ts#L15) use [ComparisonType](https://github.com/deep-foundation/deeplinks/blob/71eae8c5d5879e67a157bdffe538e9f3709d4b77/imports/client_types.ts#L154) for `\w+?_id` but we are not able to use number instead of BigIntComparisonObject in BoolExpTree - we get runtime Apollo error

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.