ActionCreateGood.js 372 B

123456789101112131415
  1. import {actionPromise} from "../reducers/PromiseReducer";
  2. import {gql} from "./PathDB";
  3. //GoodUpsert
  4. export const actionGoodUpsert = (good) => {
  5. return actionPromise('goodUpsert', gql(`mutation goodUpsert($good: GoodInput){
  6. GoodUpsert(good: $good){
  7. _id
  8. }
  9. }`,
  10. {
  11. "good": {...good}
  12. })
  13. )
  14. }