hasura / hasura/graphql-engine

how to return nested data from joined tables from update query

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

Description

Note: using `/v1/query` and know its deprecated, we want to update to the regular graphql endpoint at some point, but we’re stuck with some legacy code for now

i want my update query to return nested data from joined tables like

```
"returning":[
"id",
"name",
{
"name":"sometable",
"columns":[
"*"
]
}]
```

the object style is working for get one and get many queries, but not for create or update queries.

I get this error: `"parsing Text failed, expected String, but encountered Object"`

is this even possible? would it work if we updated to v2?

Contributor guide

Open the contributing guide

Research direction

Start by comparing the deprecated /v1/query endpoint with the regular GraphQL endpoint and its v2 behavior. Trace how the returning value is handled for update queries, especially the nested object for joined tables. Done means establishing whether nested returning data is supported and documenting the applicable endpoint or limitation.

Written by the indexing model from the issue text.

Assessment

Tech stack
graphql
Domain
api
Issue type
Feature
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.