ActionCreateGood.js 359 B

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