notes.txt 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276
  1. mutation newUser($login: String, $password: String) {
  2. UserUpsert(user: {login: $login, password: $password}) {
  3. _id
  4. createdAt
  5. }
  6. }
  7. query login($login: String, $password: String) {
  8. login(login: $login, password: $password)
  9. }
  10. mutation dellUser($login: String, $password: String) {
  11. UserDelete(user: {login: $login, password: $password}) {
  12. _id
  13. }
  14. }
  15. query muchUsers {
  16. UserFind(query: "[{\"login\":\"/sheva/\"}]") {
  17. _id
  18. createdAt
  19. login
  20. nick
  21. }
  22. }
  23. query muchUsers2($machUser:String) {
  24. UserFind(query: $machUser) {
  25. _id
  26. createdAt
  27. login
  28. nick
  29. }
  30. }
  31. query allUsers {
  32. UserFind(query: "[{}]") {
  33. _id
  34. createdAt
  35. login
  36. nick
  37. }
  38. }
  39. mutation dellUserID{
  40. UserDelete(user:{_id: "5ff783d16f871f156bf4b007"}){_id}
  41. }
  42. query goods {
  43. GoodFind(query: "[{}]") {
  44. _id
  45. name
  46. categories {
  47. _id
  48. name
  49. }
  50. name
  51. price
  52. }
  53. }
  54. query oneGood {
  55. GoodFind(query: "[{ \"_id\": \"5dc45d0b5df9d670df48cc4b\" }]") {
  56. _id
  57. createdAt
  58. name
  59. description
  60. price
  61. images {
  62. _id
  63. text
  64. url
  65. originalFileName
  66. }
  67. }
  68. }
  69. query GoodsFromCatSort ($sort:String){
  70. GoodFind(query: $sort) {
  71. _id
  72. name
  73. # description
  74. # price
  75. # images {
  76. # _id
  77. # createdAt
  78. # text
  79. # url
  80. # originalFileName
  81. # }
  82. }
  83. }
  84. query GoodsFromCat ($catId:String){
  85. GoodFind(query: $catId) {
  86. _id
  87. createdAt
  88. name
  89. description
  90. price
  91. images {
  92. _id
  93. text
  94. url
  95. originalFileName
  96. }
  97. categories {
  98. _id
  99. name
  100. }
  101. }
  102. }
  103. query categoriesAll {
  104. CategoryFind(query: "[{}]") {
  105. _id
  106. name
  107. parent {
  108. _id
  109. name
  110. }
  111. }
  112. }
  113. query categoriesNull {
  114. CategoryFind(query: "[{\"parent._id\": null}]") {
  115. name
  116. _id
  117. }
  118. }
  119. query subCategories ($subcat:String){
  120. CategoryFind(query: $subcat) {
  121. name
  122. _id
  123. subCategories{_id name}
  124. }
  125. }
  126. mutation newOrder {
  127. OrderUpsert(order: {orderGoods: [{count: 3, good: {_id: "5dc882c90e36db246e3049bc"}},
  128. {count: 5, good: {_id: "5dc886550e36db246e3049c0"}}
  129. ]}) {
  130. _id
  131. createdAt
  132. total
  133. }
  134. }
  135. mutation newOrder1($order1:OrderInput) {
  136. OrderUpsert(order: $order1) {
  137. _id
  138. total
  139. }
  140. }
  141. query orders1 {
  142. OrderFind(query: "[{ \"_id\":\"5ff7ae9e6f871f156bf4b00a\" }]") {
  143. _id
  144. orderGoods {
  145. count
  146. good {
  147. _id
  148. name
  149. price
  150. }
  151. }
  152. owner {
  153. login
  154. }
  155. }
  156. }
  157. query orders {
  158. OrderFind(query: "[{ }]") {
  159. _id
  160. total
  161. orderGoods {
  162. count
  163. good {
  164. _id
  165. name
  166. price
  167. }
  168. }
  169. owner {
  170. login
  171. }
  172. }
  173. }
  174. mutation dellOrder {
  175. OrderDelete(order: {_id: "5ff4c2a06f871f156bf4afc3"}) {
  176. _id
  177. }
  178. }
  179. mutation imgAdd{
  180. ImageUpsert(image:{}) {
  181. _id
  182. createdAt
  183. text
  184. url
  185. originalFileName
  186. }
  187. }
  188. query FindOrders($lookOrders:String){
  189. OrderFind(query:$lookOrders){
  190. total
  191. orderGoods{
  192. good{
  193. name
  194. images{
  195. url
  196. }
  197. }
  198. price
  199. count
  200. total
  201. }
  202. }
  203. }
  204. ==========================================================================================
  205. ==========================================================================================
  206. {
  207. "machUser": "[{\"login\":\"/sheva/\"}]",
  208. "subcat": "[{\"parent._id\":\"5dc4b2553f23b553bf354101\"}]",
  209. "catId": "[{ \"categories._id\": \"5dc458985df9d670df48cc47\" }]",
  210. "sort": "[{\"categories._id\": \"5dc458985df9d670df48cc47\"}, {\"sort\" : [{\"name\":-1}] } ]",
  211. "login": "sheva77",
  212. "password": "Seldom123w",
  213. "lookOrders": "[ {} ]",
  214. "lookOrders2": "[{\"total\":{\"$gt\":\"1700\"}},{\"sort\":[{\"total\":1}]}]",
  215. "order1": {
  216. "orderGoods": [
  217. {
  218. "count": 7,
  219. "good": {
  220. "_id": "5dc4a1535df9d670df48cc68"
  221. }
  222. }
  223. ]
  224. }
  225. }