You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

30 line
550 B

  1. import apollo from "../../lib/apollo.js";
  2. async function GetCartProduct(id, token = "") {
  3. var res = await apollo.query(
  4. `
  5. query($input: ID!){
  6. products(where:{id:$input})
  7. {
  8. name
  9. price
  10. description
  11. img{
  12. url
  13. }
  14. overview
  15. specification
  16. film
  17. stock
  18. }
  19. } `,
  20. token, {
  21. "input": id
  22. }
  23. );
  24. return res;
  25. }
  26. module.exports = {
  27. GetCartProduct: GetCartProduct,
  28. };