actionRootCats.js 510 B

12345678910111213141516171819202122
  1. import { gql } from "../helpers";
  2. import { actionPromise } from "../reducers";
  3. export const actionRootCats = () =>
  4. actionPromise(
  5. "rootCats",
  6. gql(
  7. `query rootCats($query:String) {
  8. CategoryFind(query: $query){
  9. _id name
  10. }
  11. }`,
  12. {
  13. query: JSON.stringify([
  14. {
  15. parent: null,
  16. },
  17. ]),
  18. }
  19. )
  20. );