import apollo from "../../lib/apollo.js"; async function GetCheckoutproduct(id, token = "") { var res = await apollo.query( ` query($input: ID!){ products(where:{id:$input}) { name price description img{ url } stock } } `, token, { "input": id } ); return res; } async function GetCheckoutproductBayar(id, token = "") { var res = await apollo.query( ` query($input: ID!) { transaction(id:$input where: { status: "2" }) { id order_id cust_name cust_telp cust_address product_img{ url } product_name product_color product_quantity product_courier product_price } } `, token, { "input": id } ); return res; } module.exports = { GetCheckoutproduct: GetCheckoutproduct, GetCheckoutproductBayar: GetCheckoutproductBayar, };