import actionPromise from "./actionPromise";
import {gql} from "./";




const actionWishes = (arr) => {

    return async dispatch => {
        const queryJson = JSON.stringify(
            [{"$or" : arr}]
        )


        await dispatch(actionPromise("wishesSearch", gql(
            `query wishesGoods($query: String) {
                GoodFind(query: $query) {
                  name 
                  _id
                  images{url}
                  price
                 }
              }`, {query: queryJson}
        )))
    }
}

export default actionWishes;