graphql中的别名对象,

graphql中的别名对象,,graphql,graphql-js,express-graphql,Graphql,Graphql Js,Express Graphql,我知道我的数据是否像 { id: 123 address: xyz name: hello } 我想在查询过程中使用别名我可以这样做 query { identification: id address full_name : name } 因此,我的数据如下所示: { identification: 123 address: xyz full_name: hello } { id : 123 info: { address: xyz

我知道我的数据是否像

{
id: 123
address: xyz
name: hello

}
我想在查询过程中使用别名我可以这样做

query {
 identification: id
 address 
 full_name : name

}
因此,我的数据如下所示:

{

  identification: 123
  address: xyz
  full_name: hello

}
{

  id : 123
  info: {
     address: xyz
     name: hello
   }
  

}
但我希望我即将发布的数据如下所示:

{

  identification: 123
  address: xyz
  full_name: hello

}
{

  id : 123
  info: {
     address: xyz
     name: hello
   }
  

}

如何在GraphQl查询中实现这一点?如何提供别名
info

没有GraphQl语法允许您在客户端执行此操作。在客户端代码中以编程方式应用转换,或者在服务器上更改模式以反映所需的数据结构。

否,您不能这样做。GraphQL别名只能更改字段的名称。

您应该知道必须定义类型。。。阅读文档!!查看规范以了解更多详细信息