25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
 
 

57 satır
1.1 KiB

  1. import apollo from "../../lib/apollo.js";
  2. async function GetCheckoutproduct(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 GetCheckoutproductBayar(id, token = "") {
  27. var res = await apollo.query(
  28. `
  29. query($input: ID!) {
  30. product(id:$input) {
  31. id
  32. name
  33. price
  34. description
  35. img {
  36. url
  37. }
  38. overview
  39. specification
  40. film
  41. stock
  42. }
  43. }
  44. `,
  45. token, {
  46. "input": id
  47. }
  48. );
  49. return res;
  50. }
  51. module.exports = {
  52. GetCheckoutproduct: GetCheckoutproduct,
  53. GetCheckoutproductBayar: GetCheckoutproductBayar,
  54. };