Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
 
 

48 rindas
870 B

  1. import apollo from "../../lib/apollo.js";
  2. async function profile(token="") {
  3. var res = await apollo.query(
  4. `
  5. query{
  6. users(where: { id: "13" }){
  7. id
  8. username
  9. email
  10. firstName
  11. lastName
  12. telp
  13. address
  14. }
  15. }
  16. `,
  17. token
  18. );
  19. return res;
  20. }
  21. async function GetDetailProfile(id, token = "") {
  22. var res = await apollo.query(
  23. `
  24. query($input: ID!){
  25. users(where:{id:$input})
  26. {
  27. id
  28. username
  29. email
  30. firstName
  31. lastName
  32. telp
  33. address
  34. }
  35. } `,
  36. token, {
  37. "input": id
  38. }
  39. );
  40. return res;
  41. }
  42. module.exports = {
  43. profile:profile,
  44. GetDetailProfile: GetDetailProfile,
  45. };