actionOrderUpsert.js 427 B

123456789101112131415161718
  1. import { gql } from "../helpers";
  2. import { actionPromise } from "../reducers";
  3. export const actionOrderUpsert = (order) =>
  4. actionPromise(
  5. "orderUpsert",
  6. gql(
  7. `mutation newOrder($order:OrderInput!){
  8. OrderUpsert(order:$order){
  9. _id price
  10. }
  11. }
  12. `,
  13. {
  14. order,
  15. }
  16. )
  17. );