gql.js 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. const productbyprops = `
  2. query productbyprops($category: String, $updatedAt: String, $name: String, $createdAt: String, $status: String, $intro: String, $price: Float, $img: String, $stock: Int) {
  3. productbyprops: product_by_props(category: $category updatedAt: $updatedAt name: $name createdAt: $createdAt status: $status intro: $intro price: $price img: $img stock: $stock) {
  4. category
  5. updatedAt
  6. unit
  7. name
  8. createdAt
  9. status
  10. id
  11. intro
  12. price
  13. img
  14. stock
  15. }
  16. }
  17. `
  18. const productbyid = `
  19. query productbyid($id: ID) {
  20. productbyid: product_by_id(id: $id) {
  21. category
  22. updatedAt
  23. unit
  24. name
  25. createdAt
  26. status
  27. id
  28. intro
  29. price
  30. img
  31. stock
  32. }
  33. }
  34. `
  35. const cart_by_userid = `
  36. query findUserCart($user_id:ID){
  37. cartList:userCart_by_props(user_id:$user_id){
  38. count
  39. createdAt
  40. id
  41. product_id{
  42. category
  43. createdAt
  44. img
  45. intro
  46. name
  47. price
  48. status
  49. stock
  50. unit
  51. updatedAt
  52. }
  53. }
  54. }
  55. `
  56. const userAddressbyprops = `
  57. query userAddressbyprops($address: String, $updatedAt: String, $telephone: String, $default: Int, $city: String, $username: String, $postcode: String, $createdAt: String, $deletedAt: String, $user_id: ID, $area: String, $province: String) {
  58. userAddressbyprops: userAddress_by_props(address: $address updatedAt: $updatedAt telephone: $telephone
  59. default: $default city: $city username: $username postcode: $postcode createdAt: $createdAt deletedAt: $deletedAt user_id: $user_id area: $area province: $province) {
  60. address
  61. updatedAt
  62. telephone
  63. default
  64. city
  65. username
  66. postcode
  67. createdAt
  68. deletedAt
  69. id
  70. user_id {
  71. email
  72. updatedAt
  73. password
  74. telephone
  75. username
  76. createdAt
  77. openid
  78. id
  79. }
  80. area
  81. province
  82. }
  83. }
  84. `
  85. export {
  86. productbyprops,
  87. productbyid,
  88. cart_by_userid,
  89. userAddressbyprops
  90. }