当我在graphiql中发送变异但在客户端卡住时,GraphQl服务器工作正常,如何使用阿波罗角度发送graphql变异中的数组。
工作突变
mutation{cashBillsAddBulk(CashBills:[{
billValue:1,registerId:2,registerStatus:"open"
,billCount:1},{
billValue:1,registerId:2,registerStatus:"open"
,billCount:1}])}
客户端突变
const cashBillsAddBulk = gql`mutation ($bills: [CashBillsInput]){cashBillsAddBulk(CashBills: $bills)}
`;
功能
public addCashBills(CashBills: any[]): Observable<any> {
return this.apollo.mutate({
mutation: cashBillsAddBulk,
variables: CashBills
});
}