我将graphql-yoga用于我的graphql服务器,我想在var poDetails = new List<PurchaseOrderDetail>();
foreach (var po in purchaseOrders)
{
var poDetail = await PurchaseOrderDetails.PullAsync(queryName, PurchaseOrderDetailsTable.CreateQuery().Where(pod => po.Id == pod.PoId);
poDetails.Add(poDetail);
}
下提取状态代码:
formatResponse
Query: {
get_foo: () => {
return fetch(URL).then(res => res.json());
},
const options = {
...
// A function applied to each response after execution
formatResponse,
};
我尝试同时打印两个const formatResponse = (res) => {
console.log(res);
};
,但响应(res, req
)没有存储状态码字段。