actionAddCategory.js 361 B

123456789101112131415
  1. import _default from "antd/lib/checkbox/Group"
  2. import { actionPromise } from ".";
  3. import gql from "../api";
  4. const actionAddCategory = (name) =>
  5. actionPromise('addCat', gql(`mutation addCategory ($add:CategoryInput) {
  6. CategoryUpsert(category:$add){
  7. _id name
  8. }
  9. }`, {
  10. "add": {"name": name}
  11. }))
  12. export default actionAddCategory;