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.
 
 

26 line
546 B

  1. import apollo from "../../lib/apollo.js";
  2. async function GetDealers(filter, token="") {
  3. var res = await apollo.query(
  4. `
  5. query { ${(filter!="")?`name: "${filter}"`:""}
  6. dealers
  7. {
  8. id
  9. name
  10. kota_dealer
  11. address
  12. telp
  13. email
  14. location
  15. }
  16. }
  17. `,
  18. token
  19. );
  20. return res;
  21. }
  22. module.exports = {
  23. GetDealers: GetDealers,
  24. };