import apollo from "../../lib/apollo.js";

async function GetCartProduct(id, token = "") {
    var res = await apollo.query(
        `
        query($input: ID!){
        products(where:{id:$input})
        {
            name
            price
            description
            img{
            url
            }
            overview
            specification
            film
            stock
        }
        }	`,
        token, {
        "input": id
        }
    );
    return res;
}

module.exports = {
    GetCartProduct: GetCartProduct,
};