我想访问state.label并在我的客户端获取它,
Example.json
"batch": "2016-15-12",
"state": {
"label": "ALIVE",
"date": {
"$date": "2018-06-08T08:21:15.539Z"
},
"lastDeconnection": {
"$date": "2018-04-26T09:24:12.094Z"
},
"lastConnection": {
"$date": "2018-06-04T11:04:34.388Z"
}
}
我需要知道如何在服务器端的document.type上声明它,以便我可以得到它
state:{
name:"state.label"
type: GraphQLString,
description: 'pairing code of the box'
}
现在正在运作。