Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.

48 righe
792 B

  1. import apollo from "../../../lib/apollo.js";
  2. async function GetDetailProduct(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. async function GetProductSuzuki(token = "") {
  27. var res = await apollo.query(
  28. `
  29. query {
  30. products(where: { business_partner: "2" }) {
  31. id
  32. name
  33. price
  34. img {
  35. url
  36. }
  37. }
  38. }`,
  39. token
  40. );
  41. return res;
  42. }
  43. module.exports = {
  44. GetProductSuzuki: GetProductSuzuki,
  45. GetDetailProduct:GetDetailProduct,
  46. };