import {actionPromise, gql} from "./index"; const actionOrdersFind = (data) => { return async dispatch => { const queryJson = JSON.stringify( [{"___owner" : data}] ) await dispatch(actionPromise("ordersFind", gql ( `query orders ($query: String) { OrderFind(query: $query){ total _id orderGoods {count, _id, price, good {name, price}} createdAt owner { login } } }`, {query: queryJson} ))) } } export default actionOrdersFind;