hasura / hasura/graphql-engine
Remote Schema to Database Array relationship returns invalid input syntax for type integer.
- Dominant language
- TypeScript
- Stars
- 32.1k
- Forks
- 3k
- PR merge metrics
- PR metrics pending
Description
### Version Information
Server Version: v2.10.1
CLI Version (for CLI related issues):
### Environment
Cloud
### What is the current behavior?
I have got a custom Graphql server running in a separate server and I wanted to include a query from it to Hasura with the remote schema feature. I've created the remote schema and it is working well but I also needed to create an array relationship between the response in the remote schema query to a table in Postgres.
Currently, It is returning an error below.
`{
"errors": [
{
"extensions": {
"code": "data-exception",
"path": "$"
},
"message": "invalid input syntax for type integer: \"[\"36\", \"37\", \"38\", \"39\", \"40\", \"41\", \"42\", \"43\"]\""
}
]
}`
### What is the expected behavior?
To get the related entries from the database with the list of ids returned from the remote schema query response.
### Screenshots or Screencast

### Please provide any traces or logs that could help here.
### Any possible solutions?
### Can you identify the location in the source code where the problem exists?
### If the bug is confirmed, would you be willing to submit a PR?
### Keywords
"Remote Schema", "Array relationship"
Contributor guide
Research direction
Start by reproducing the remote schema array relationship described in the issue, using the reported Hasura v2.10.1 Cloud setup and the returned list of integer IDs. Trace how the relationship value reaches the Postgres query and compare the generated input with the expected list semantics. Done means related database entries are returned without the integer input syntax error, with a regression test covering the case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- graphql, postgres
- Domain
- api, backend-api-design, database
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100