1
votes

Can you please tell me if it is possible to get the value of the nested field as the value of the alias.

query getItemList{
  item{
    name
    source: itemSource {
      name
    }
  }
}

# response
{
  name: "someItem",
  source: { name: "someName" }
}

# want to get
{
  name: "someItem",
  source: "someName"
}
alias is just a 'renamer', not a 'structure tracsformer' ... 'transformed' response wouldn't match [API defined] types - itemSource transformed from an object to a string? do it on FE after fetching - xadm
Thanks for answer! I wanted to find out if this is realizable by the query language, without edits on the back - mike