hasura / hasura/graphql-engine

Error if the action returns an array (v2.0.5)

Open
#7,363 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
32.1k
Forks
3k
PR merge metrics
PR metrics pending

Description

If I create an action that returns an object that has a field with an array, then I get "invalid input syntax for type ...". On version 1.3.3, this worked.
```
{
"errors": [
{
"extensions": {
"path": "$",
"code": "data-exception"
},
"message": "invalid input syntax for type integer: \"[6760980, 6759992, 6761453, 6760641, 6761474, 6761492, 6761195, 6761226]\""
}
]
}
```
![изображение](https://user-images.githubusercontent.com/57487539/128529153-0127c33a-cc94-4fa4-b61b-26530db64698.png)

Contributor guide

Open the contributing guide

Research direction

No source file or test is named. Start by reproducing the action result with an object containing an integer array on v2.0.5, then compare it with v1.3.3 and trace how the action output reaches PostgreSQL. Done means array-valued fields no longer produce the reported invalid integer syntax error, with regression coverage for the case.

Written by the indexing model from the issue text.

Assessment

Tech stack
graphql, postgresql, typescript
Domain
api, databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.