import _default from "antd/lib/checkbox/Group";
import { actionPromise } from ".";
import gql from "../api";

const actionCatById = (_id) =>  //добавить подкатегории
  actionPromise('catById', gql(`query catById($q: String){
      CategoryFindOne(query:$q){
         name subCategories {
          _id
          name 
          goods {
            _id name description price images{
            url
            }
          }
       }goods {
         _id name price description images{
           url
         }
       }
     }
   }`, {"q": JSON.stringify([{_id}])}))

   export default actionCatById;