actionGoodUpsert.js 460 B

123456789101112131415161718
  1. import { gql } from "../helpers";
  2. import { actionPromise } from "../reducers";
  3. export const actionGoodUpsert = (good) => async (dispatch) => {
  4. dispatch(
  5. actionPromise(
  6. "goodUpsert",
  7. gql(
  8. `mutation GoodUpsert($good:GoodInput!){
  9. GoodUpsert(good:$good){
  10. _id name
  11. }
  12. }`,
  13. { good }
  14. )
  15. )
  16. );
  17. };