solidus_graphql_api 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (267) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +18 -2
  3. data/.github/dependabot.yml +23 -0
  4. data/.github/stale.yml +3 -3
  5. data/.github_changelog_generator +2 -0
  6. data/.rubocop.yml +7 -4
  7. data/CHANGELOG.md +170 -0
  8. data/Gemfile +0 -5
  9. data/LICENSE +1 -1
  10. data/README.md +25 -9
  11. data/Rakefile +21 -7
  12. data/app/assets/javascripts/spree/backend/solidus_graphql_api.js +2 -0
  13. data/app/assets/javascripts/spree/frontend/solidus_graphql_api.js +2 -0
  14. data/app/assets/stylesheets/spree/backend/solidus_graphql_api.css +4 -0
  15. data/app/assets/stylesheets/spree/frontend/solidus_graphql_api.css +4 -0
  16. data/app/controllers/spree/graphql_controller.rb +2 -0
  17. data/bin/console +2 -2
  18. data/bin/rails +0 -2
  19. data/bin/rails-engine +0 -3
  20. data/bin/rails-sandbox +1 -3
  21. data/bin/rake +0 -1
  22. data/bin/sandbox +3 -1
  23. data/docs/assets/images/graphiql-headers.png +0 -0
  24. data/docs/assets/images/graphiql-variables.png +0 -0
  25. data/docs/assets/images/graphiql.png +0 -0
  26. data/docs/assets/images/menu.png +0 -0
  27. data/docs/assets/images/navbar.png +0 -0
  28. data/docs/assets/style.css +1115 -0
  29. data/docs/assets/webfonts/2C4B9D_B_0.eot +0 -0
  30. data/docs/assets/webfonts/2C4B9D_B_0.ttf +0 -0
  31. data/docs/assets/webfonts/2C4B9D_B_0.woff +0 -0
  32. data/docs/assets/webfonts/2C4B9D_B_0.woff2 +0 -0
  33. data/docs/assets/webfonts/2C4B9D_C_0.eot +0 -0
  34. data/docs/assets/webfonts/2C4B9D_C_0.ttf +0 -0
  35. data/docs/assets/webfonts/2C4B9D_C_0.woff +0 -0
  36. data/docs/assets/webfonts/2C4B9D_C_0.woff2 +0 -0
  37. data/docs/assets/webfonts/2C4B9D_D_0.eot +0 -0
  38. data/docs/assets/webfonts/2C4B9D_D_0.ttf +0 -0
  39. data/docs/assets/webfonts/2C4B9D_D_0.woff +0 -0
  40. data/docs/assets/webfonts/2C4B9D_D_0.woff2 +0 -0
  41. data/docs/assets/webfonts/2C4B9D_E_0.eot +0 -0
  42. data/docs/assets/webfonts/2C4B9D_E_0.ttf +0 -0
  43. data/docs/assets/webfonts/2C4B9D_E_0.woff +0 -0
  44. data/docs/assets/webfonts/2C4B9D_E_0.woff2 +0 -0
  45. data/docs/directive/deprecated/index.html +1142 -0
  46. data/docs/directive/include/index.html +1141 -0
  47. data/docs/directive/index.html +1113 -0
  48. data/docs/directive/skip/index.html +1141 -0
  49. data/docs/enum/__directivelocation/index.html +1204 -0
  50. data/docs/enum/__typekind/index.html +1154 -0
  51. data/docs/enum/addresstypeinput/index.html +1121 -0
  52. data/docs/enum/index.html +1113 -0
  53. data/docs/index.html +1122 -0
  54. data/docs/input_object/addaddressestocheckoutinput/index.html +1135 -0
  55. data/docs/input_object/addpaymenttocheckoutinput/index.html +1135 -0
  56. data/docs/input_object/addressinput/index.html +1169 -0
  57. data/docs/input_object/addtocartinput/index.html +1130 -0
  58. data/docs/input_object/advancecheckoutinput/index.html +1120 -0
  59. data/docs/input_object/applycouponcodeinput/index.html +1125 -0
  60. data/docs/input_object/completecheckoutinput/index.html +1120 -0
  61. data/docs/input_object/createorderinput/index.html +1120 -0
  62. data/docs/input_object/emptycartinput/index.html +1120 -0
  63. data/docs/input_object/index.html +1113 -0
  64. data/docs/input_object/markdefaultshipaddressinput/index.html +1125 -0
  65. data/docs/input_object/nextcheckoutstateinput/index.html +1120 -0
  66. data/docs/input_object/productsqueryinput/index.html +1132 -0
  67. data/docs/input_object/removefromaddressbookinput/index.html +1125 -0
  68. data/docs/input_object/removefromcartinput/index.html +1125 -0
  69. data/docs/input_object/saveinaddressbookinput/index.html +1135 -0
  70. data/docs/input_object/selectshippingrateinput/index.html +1125 -0
  71. data/docs/input_object/setorderemailinput/index.html +1125 -0
  72. data/docs/input_object/updatecartquantityinput/index.html +1130 -0
  73. data/docs/interface/adjustment/index.html +1145 -0
  74. data/docs/interface/index.html +1113 -0
  75. data/docs/interface/node/index.html +1151 -0
  76. data/docs/interface/paymentsource/index.html +1134 -0
  77. data/docs/mutation/addaddressestocheckout/index.html +1137 -0
  78. data/docs/mutation/addpaymenttocheckout/index.html +1137 -0
  79. data/docs/mutation/addtocart/index.html +1137 -0
  80. data/docs/mutation/advancecheckout/index.html +1137 -0
  81. data/docs/mutation/applycouponcode/index.html +1137 -0
  82. data/docs/mutation/completecheckout/index.html +1137 -0
  83. data/docs/mutation/createorder/index.html +1137 -0
  84. data/docs/mutation/emptycart/index.html +1137 -0
  85. data/docs/mutation/markdefaultshipaddress/index.html +1132 -0
  86. data/docs/mutation/nextcheckoutstate/index.html +1137 -0
  87. data/docs/mutation/removefromaddressbook/index.html +1132 -0
  88. data/docs/mutation/removefromcart/index.html +1137 -0
  89. data/docs/mutation/saveinaddressbook/index.html +1137 -0
  90. data/docs/mutation/selectshippingrate/index.html +1137 -0
  91. data/docs/mutation/setorderemail/index.html +1137 -0
  92. data/docs/mutation/updatecartquantity/index.html +1137 -0
  93. data/docs/object/__directive/index.html +1182 -0
  94. data/docs/object/__enumvalue/index.html +1134 -0
  95. data/docs/object/__field/index.html +1164 -0
  96. data/docs/object/__inputvalue/index.html +1145 -0
  97. data/docs/object/__schema/index.html +1144 -0
  98. data/docs/object/__type/index.html +1220 -0
  99. data/docs/object/addaddressestocheckoutpayload/index.html +1130 -0
  100. data/docs/object/addpaymenttocheckoutpayload/index.html +1130 -0
  101. data/docs/object/address/index.html +1189 -0
  102. data/docs/object/addressconnection/index.html +1132 -0
  103. data/docs/object/addressedge/index.html +1126 -0
  104. data/docs/object/addtocartpayload/index.html +1130 -0
  105. data/docs/object/adjustmentconnection/index.html +1132 -0
  106. data/docs/object/adjustmentedge/index.html +1126 -0
  107. data/docs/object/advancecheckoutpayload/index.html +1130 -0
  108. data/docs/object/applycouponcodepayload/index.html +1130 -0
  109. data/docs/object/completecheckoutpayload/index.html +1130 -0
  110. data/docs/object/country/index.html +1218 -0
  111. data/docs/object/countryconnection/index.html +1132 -0
  112. data/docs/object/countryedge/index.html +1126 -0
  113. data/docs/object/createorderpayload/index.html +1130 -0
  114. data/docs/object/creditcard/index.html +1170 -0
  115. data/docs/object/currency/index.html +1144 -0
  116. data/docs/object/currencyconnection/index.html +1132 -0
  117. data/docs/object/currencyedge/index.html +1126 -0
  118. data/docs/object/emptycartpayload/index.html +1130 -0
  119. data/docs/object/image/index.html +1169 -0
  120. data/docs/object/imageconnection/index.html +1132 -0
  121. data/docs/object/imageedge/index.html +1126 -0
  122. data/docs/object/index.html +1113 -0
  123. data/docs/object/lineitem/index.html +1184 -0
  124. data/docs/object/lineitemconnection/index.html +1132 -0
  125. data/docs/object/lineitemedge/index.html +1126 -0
  126. data/docs/object/manifestitem/index.html +1124 -0
  127. data/docs/object/markdefaultshipaddresspayload/index.html +1125 -0
  128. data/docs/object/nextcheckoutstatepayload/index.html +1130 -0
  129. data/docs/object/optiontype/index.html +1203 -0
  130. data/docs/object/optiontypeconnection/index.html +1132 -0
  131. data/docs/object/optiontypeedge/index.html +1126 -0
  132. data/docs/object/optionvalue/index.html +1154 -0
  133. data/docs/object/optionvalueconnection/index.html +1132 -0
  134. data/docs/object/optionvalueedge/index.html +1126 -0
  135. data/docs/object/order/index.html +1412 -0
  136. data/docs/object/orderconnection/index.html +1132 -0
  137. data/docs/object/orderedge/index.html +1126 -0
  138. data/docs/object/pageinfo/index.html +1138 -0
  139. data/docs/object/payment/index.html +1149 -0
  140. data/docs/object/paymentmethod/index.html +1149 -0
  141. data/docs/object/price/index.html +1159 -0
  142. data/docs/object/priceconnection/index.html +1132 -0
  143. data/docs/object/priceedge/index.html +1126 -0
  144. data/docs/object/product/index.html +1327 -0
  145. data/docs/object/productconnection/index.html +1132 -0
  146. data/docs/object/productedge/index.html +1126 -0
  147. data/docs/object/productproperty/index.html +1149 -0
  148. data/docs/object/productpropertyconnection/index.html +1132 -0
  149. data/docs/object/productpropertyedge/index.html +1126 -0
  150. data/docs/object/promotionadjustment/index.html +1155 -0
  151. data/docs/object/property/index.html +1144 -0
  152. data/docs/object/removefromaddressbookpayload/index.html +1125 -0
  153. data/docs/object/removefromcartpayload/index.html +1130 -0
  154. data/docs/object/saveinaddressbookpayload/index.html +1130 -0
  155. data/docs/object/selectshippingratepayload/index.html +1130 -0
  156. data/docs/object/setorderemailpayload/index.html +1130 -0
  157. data/docs/object/shipment/index.html +1218 -0
  158. data/docs/object/shipmentconnection/index.html +1132 -0
  159. data/docs/object/shipmentedge/index.html +1126 -0
  160. data/docs/object/shippingmethod/index.html +1174 -0
  161. data/docs/object/shippingrate/index.html +1154 -0
  162. data/docs/object/shippingrateconnection/index.html +1132 -0
  163. data/docs/object/shippingrateedge/index.html +1126 -0
  164. data/docs/object/state/index.html +1144 -0
  165. data/docs/object/stateconnection/index.html +1132 -0
  166. data/docs/object/stateedge/index.html +1126 -0
  167. data/docs/object/store/index.html +1238 -0
  168. data/docs/object/taxadjustment/index.html +1150 -0
  169. data/docs/object/taxon/index.html +1228 -0
  170. data/docs/object/taxonconnection/index.html +1132 -0
  171. data/docs/object/taxonedge/index.html +1126 -0
  172. data/docs/object/taxonomy/index.html +1198 -0
  173. data/docs/object/taxonomyconnection/index.html +1132 -0
  174. data/docs/object/taxonomyedge/index.html +1126 -0
  175. data/docs/object/updatecartquantitypayload/index.html +1130 -0
  176. data/docs/object/user/index.html +1280 -0
  177. data/docs/object/usererror/index.html +1126 -0
  178. data/docs/object/variant/index.html +1332 -0
  179. data/docs/object/variantconnection/index.html +1132 -0
  180. data/docs/object/variantedge/index.html +1126 -0
  181. data/docs/object/walletpaymentsource/index.html +1144 -0
  182. data/docs/object/walletpaymentsourceconnection/index.html +1132 -0
  183. data/docs/object/walletpaymentsourceedge/index.html +1126 -0
  184. data/docs/operation/mutation/index.html +1114 -0
  185. data/docs/operation/query/index.html +1431 -0
  186. data/docs/scalar/boolean/index.html +1112 -0
  187. data/docs/scalar/float/index.html +1112 -0
  188. data/docs/scalar/id/index.html +1112 -0
  189. data/docs/scalar/index.html +1113 -0
  190. data/docs/scalar/int/index.html +1112 -0
  191. data/docs/scalar/iso8601datetime/index.html +1112 -0
  192. data/docs/scalar/json/index.html +1112 -0
  193. data/docs/scalar/string/index.html +1112 -0
  194. data/docs/union/index.html +1113 -0
  195. data/lib/generators/solidus_graphql_api/install/install_generator.rb +19 -0
  196. data/lib/generators/solidus_graphql_api/install/templates/initializer.rb +6 -0
  197. data/lib/graphql_docs/landing_pages/index.md +16 -0
  198. data/lib/solidus_graphql_api/batch_loader/has_many_through.rb +1 -0
  199. data/lib/solidus_graphql_api/configuration.rb +12 -8
  200. data/lib/solidus_graphql_api/context.rb +7 -1
  201. data/lib/solidus_graphql_api/engine.rb +2 -2
  202. data/lib/solidus_graphql_api/mutations/base_mutation.rb +3 -3
  203. data/lib/solidus_graphql_api/mutations/checkout/add_payment_to_checkout.rb +1 -1
  204. data/lib/solidus_graphql_api/mutations/user/{mark_default_address.rb → mark_default_ship_address.rb} +2 -2
  205. data/lib/solidus_graphql_api/mutations/user/save_in_address_book.rb +8 -2
  206. data/lib/solidus_graphql_api/queries/option_value/option_type_query.rb +19 -0
  207. data/lib/solidus_graphql_api/queries/shipping_rate/shipping_method_query.rb +19 -0
  208. data/lib/solidus_graphql_api/queries/variant/default_price_query.rb +1 -1
  209. data/lib/solidus_graphql_api/{factories → testing_support/factories}/address_factory.rb +1 -2
  210. data/lib/solidus_graphql_api/{factories → testing_support/factories}/country_factory.rb +0 -0
  211. data/lib/solidus_graphql_api/{factories → testing_support/factories}/store_factory.rb +0 -0
  212. data/lib/solidus_graphql_api/{factories → testing_support/factories}/taxonomy_factory.rb +10 -0
  213. data/lib/solidus_graphql_api/testing_support/factories.rb +9 -0
  214. data/lib/solidus_graphql_api/types/address.rb +1 -2
  215. data/lib/solidus_graphql_api/types/base/relay_node.rb +1 -1
  216. data/lib/solidus_graphql_api/types/input_objects/address_input.rb +1 -2
  217. data/lib/solidus_graphql_api/types/json.rb +6 -3
  218. data/lib/solidus_graphql_api/types/mutation.rb +1 -1
  219. data/lib/solidus_graphql_api/types/option_value.rb +5 -0
  220. data/lib/solidus_graphql_api/types/query.rb +2 -2
  221. data/lib/solidus_graphql_api/types/shipping_method.rb +20 -0
  222. data/lib/solidus_graphql_api/types/shipping_rate.rb +5 -0
  223. data/lib/solidus_graphql_api/types/user.rb +1 -1
  224. data/lib/solidus_graphql_api/version.rb +1 -1
  225. data/lib/solidus_graphql_api.rb +0 -3
  226. data/schema.graphql +128 -26
  227. data/solidus_graphql_api.gemspec +9 -7
  228. data/spec/integration/mutations/checkout/add_addresses_to_checkout_spec.rb +12 -18
  229. data/spec/integration/mutations/checkout/apply_coupon_code_spec.rb +3 -1
  230. data/spec/integration/mutations/{mark_default_address_spec.rb → mark_default_ship_address_spec.rb} +5 -5
  231. data/spec/integration/mutations/remove_from_address_book_spec.rb +4 -4
  232. data/spec/integration/mutations/save_in_address_book_spec.rb +25 -12
  233. data/spec/integration/queries/completed_orders_spec.rb +19 -15
  234. data/spec/integration/queries/current_order_spec.rb +4 -1
  235. data/spec/integration/queries/current_store_spec.rb +1 -1
  236. data/spec/integration/queries/products_spec.rb +4 -1
  237. data/spec/integration/queries/taxonomies_spec.rb +9 -4
  238. data/spec/integration/types/json_spec.rb +17 -0
  239. data/spec/lib/solidus_graphql_api/batch_loader/has_many_through_spec.rb +27 -15
  240. data/spec/lib/solidus_graphql_api/context_spec.rb +119 -6
  241. data/spec/lib/solidus_graphql_api/queries/option_value/option_type_query_spec.rb +10 -0
  242. data/spec/lib/solidus_graphql_api/queries/shipping_rate/shipping_method_query_spec.rb +11 -0
  243. data/spec/lib/solidus_graphql_api/queries/variant/default_price_query_spec.rb +1 -1
  244. data/spec/lib/solidus_graphql_api/types/base/object_spec.rb +5 -1
  245. data/spec/lib/solidus_graphql_api/types/json_spec.rb +2 -1
  246. data/spec/lib/solidus_graphql_api/types/option_value_spec.rb +22 -0
  247. data/spec/lib/solidus_graphql_api/types/product_spec.rb +3 -1
  248. data/spec/lib/solidus_graphql_api/types/query_spec.rb +3 -1
  249. data/spec/lib/solidus_graphql_api/types/shipping_rate_spec.rb +22 -0
  250. data/spec/requests/spree/graphql_controller_spec.rb +15 -2
  251. data/spec/spec_helper.rb +15 -9
  252. data/spec/support/expected_schema.graphql +128 -26
  253. data/spec/support/graphql/mutations/add_addresses_to_checkout.gql +2 -2
  254. data/spec/support/graphql/mutations/mark_default_ship_address.gql +9 -0
  255. data/spec/support/graphql/mutations/remove_from_address_book.gql +1 -1
  256. data/spec/support/graphql/mutations/save_in_address_book.gql +6 -5
  257. data/spec/support/graphql/queries/completed_orders/billing_address.gql +1 -2
  258. data/spec/support/graphql/queries/completed_orders/shipping_address.gql +1 -2
  259. data/spec/support/graphql/queries/current_user.gql +6 -11
  260. data/spec/support/graphql/responses/completed_orders/billing_address.json.erb +2 -4
  261. data/spec/support/graphql/responses/completed_orders/shipping_address.json.erb +2 -4
  262. data/spec/support/graphql/responses/current_store.json.erb +1 -1
  263. data/spec/support/graphql/responses/current_user.json.erb +7 -13
  264. data/spec/support/graphql/responses/taxonomies.json.erb +7 -7
  265. metadata +252 -37
  266. data/lib/solidus_graphql_api/factories.rb +0 -11
  267. data/spec/support/graphql/mutations/mark_default_address.gql +0 -9
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e13d165667b997910b872578daab0555697266f687273c44591815ad4e25fb54
4
- data.tar.gz: 83e8894cdd383331705701f8e69aa97aefeded8d42d07c4cc88f29fcd03b0ac1
3
+ metadata.gz: 842b0b97d15d3b9059d8e440fb3ee586dfa2898aed7fce718c02abea970b8ee1
4
+ data.tar.gz: 2b8b1b24ba1200c4f3e0f9ce7c41c18ada439f761d6f46279600e6ab85130276
5
5
  SHA512:
6
- metadata.gz: e83c25b7120e61b3d5c7e20773159c87b66fc01f2439d4d829c6d19b3abf143f21af16581b75fe6e6561540963aca1a00493dcbf598d5145c128e384bae639eb
7
- data.tar.gz: 43e1ce11f2e47eb48d4d9b7157a69f1c15a9a0d67871cde22bfeb93b72f84205ecb721b7484ea27ea85a3f2a02c099f15693f85ac65ba0c5e51afb6d3b5b68dd
6
+ metadata.gz: 5dfa1d78df69577d6865be1ee777b95cb3aba4b3a2288ef941bb2655bc42d6b955c9994e9522c5058a756d157b2b93cad053dbca2acf0123da35cf14a262cd6c
7
+ data.tar.gz: 6799f2d770473e12f237af78dd37026d363d01b59c510e893d350a10ea18bb53368c2ea61d658bd8adac9e6bc9f9cf31f03b7bee61b5e9d23d6a131cd9c4ac49
data/.circleci/config.yml CHANGED
@@ -41,7 +41,11 @@ jobs:
41
41
  run-specs-with-postgres:
42
42
  executor: solidusio_extensions/postgres
43
43
  steps:
44
- - solidusio_extensions/run-tests
44
+ - checkout
45
+ - solidusio_extensions/run-tests-solidus-current
46
+ - solidusio_extensions/store-test-results
47
+ - solidusio_extensions/run-tests-solidus-master
48
+ - solidusio_extensions/store-test-results
45
49
  - run:
46
50
  name: Install & Upload test coverage to Code Climate
47
51
  command: |
@@ -53,7 +57,12 @@ jobs:
53
57
  run-specs-with-mysql:
54
58
  executor: solidusio_extensions/mysql
55
59
  steps:
56
- - solidusio_extensions/run-tests
60
+ - checkout
61
+ - solidusio_extensions/run-tests-solidus-current
62
+ - solidusio_extensions/store-test-results
63
+ - solidusio_extensions/run-tests-solidus-master
64
+ - solidusio_extensions/store-test-results
65
+
57
66
 
58
67
  schema-breaking-change-detection:
59
68
  docker:
@@ -67,6 +76,11 @@ jobs:
67
76
  name: Schema Breaking Change detection
68
77
  command: rm Gemfile && schema_comparator verify "`git show origin/master:schema.graphql`" schema.graphql
69
78
 
79
+ lint-code:
80
+ executor: solidusio_extensions/sqlite-memory
81
+ steps:
82
+ - solidusio_extensions/lint-code
83
+
70
84
  workflows:
71
85
  "Run specs on supported Solidus versions":
72
86
  jobs:
@@ -80,6 +94,8 @@ workflows:
80
94
  - run-specs-with-mysql:
81
95
  requires:
82
96
  - verify-schema-updated
97
+ - lint-code
98
+
83
99
  "Weekly run specs against master":
84
100
  triggers:
85
101
  - schedule:
@@ -0,0 +1,23 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: bundler
4
+ directory: "/"
5
+ schedule:
6
+ interval: daily
7
+ open-pull-requests-limit: 10
8
+ ignore:
9
+ - dependency-name: solidus_dev_support
10
+ versions:
11
+ - 2.1.0
12
+ - 2.4.0
13
+ - 2.4.2
14
+ - 2.4.3
15
+ - dependency-name: pry
16
+ versions:
17
+ - 0.14.0
18
+ - dependency-name: graphql
19
+ versions:
20
+ - 1.12.0
21
+ - dependency-name: simplecov
22
+ versions:
23
+ - 0.21.2
data/.github/stale.yml CHANGED
@@ -1,17 +1,17 @@
1
1
  # Number of days of inactivity before an issue becomes stale
2
2
  daysUntilStale: 60
3
3
  # Number of days of inactivity before a stale issue is closed
4
- daysUntilClose: 7
4
+ daysUntilClose: false
5
5
  # Issues with these labels will never be considered stale
6
6
  exemptLabels:
7
7
  - pinned
8
8
  - security
9
9
  # Label to use when marking an issue as stale
10
- staleLabel: wontfix
10
+ staleLabel: stale
11
11
  # Comment to post when marking an issue as stale. Set to `false` to disable
12
12
  markComment: >
13
13
  This issue has been automatically marked as stale because it has not had
14
- recent activity. It will be closed if no further activity occurs. Thank you
14
+ recent activity. It might be closed if no further activity occurs. Thank you
15
15
  for your contributions.
16
16
  # Comment to post when closing a stale issue. Set to `false` to disable
17
17
  closeComment: false
@@ -0,0 +1,2 @@
1
+ issues=false
2
+ exclude-labels=infrastructure
data/.rubocop.yml CHANGED
@@ -4,9 +4,6 @@ require:
4
4
  Style/ExpandPathArguments:
5
5
  Enabled: false
6
6
 
7
- Metrics/LineLength:
8
- Enabled: false
9
-
10
7
  Performance/RegexpMatch:
11
8
  Enabled: false
12
9
 
@@ -52,7 +49,7 @@ RSpec/LetSetup:
52
49
  RSpec/HookArgument:
53
50
  Enabled: false
54
51
 
55
- Layout/AlignArguments:
52
+ Layout/ArgumentAlignment:
56
53
  Enabled: false
57
54
 
58
55
  Rails/RakeEnvironment:
@@ -60,3 +57,9 @@ Rails/RakeEnvironment:
60
57
 
61
58
  Rails/HttpStatus:
62
59
  Enabled: false
60
+
61
+ RSpec/MultipleMemoizedHelpers:
62
+ Enabled: false
63
+
64
+ Lint/ConstantDefinitionInBlock:
65
+ Enabled: false
data/CHANGELOG.md CHANGED
@@ -0,0 +1,170 @@
1
+ # Changelog
2
+
3
+ ## [v0.2.0](https://github.com/solidusio-contrib/solidus_graphql_api/tree/v0.2.0) (2021-11-29)
4
+
5
+ [Full Changelog](https://github.com/solidusio-contrib/solidus_graphql_api/compare/v0.1.0...v0.2.0)
6
+
7
+ **Closed issues:**
8
+
9
+ - It's not possible to create a billing address [\#181](https://github.com/solidusio-contrib/solidus_graphql_api/issues/181)
10
+ - Add shipping\_method field to ShippingRate [\#179](https://github.com/solidusio-contrib/solidus_graphql_api/issues/179)
11
+ - Allow querying a country by id [\#173](https://github.com/solidusio-contrib/solidus_graphql_api/issues/173)
12
+ - Variant's option\_values are duplicated [\#172](https://github.com/solidusio-contrib/solidus_graphql_api/issues/172)
13
+ - Add option\_type field to OptionValue type [\#171](https://github.com/solidusio-contrib/solidus_graphql_api/issues/171)
14
+ - How to add new query [\#168](https://github.com/solidusio-contrib/solidus_graphql_api/issues/168)
15
+ - Prepare Solidus Graphql Api for Solidus 3.0 [\#153](https://github.com/solidusio-contrib/solidus_graphql_api/issues/153)
16
+ - State of this gem [\#141](https://github.com/solidusio-contrib/solidus_graphql_api/issues/141)
17
+ - Dependabot can't resolve your Ruby dependency files [\#139](https://github.com/solidusio-contrib/solidus_graphql_api/issues/139)
18
+ - Dependabot can't resolve your Ruby dependency files [\#138](https://github.com/solidusio-contrib/solidus_graphql_api/issues/138)
19
+
20
+ **Merged pull requests:**
21
+
22
+ - Fix error on JSON type after update to graphql 1.12 [\#192](https://github.com/solidusio-contrib/solidus_graphql_api/pull/192) ([waiting-for-dev](https://github.com/waiting-for-dev))
23
+ - Update development dependencies [\#191](https://github.com/solidusio-contrib/solidus_graphql_api/pull/191) ([waiting-for-dev](https://github.com/waiting-for-dev))
24
+ - Support graphql 1.12 [\#190](https://github.com/solidusio-contrib/solidus_graphql_api/pull/190) ([waiting-for-dev](https://github.com/waiting-for-dev))
25
+ - Fix rendering blob URLs on disk storage [\#189](https://github.com/solidusio-contrib/solidus_graphql_api/pull/189) ([waiting-for-dev](https://github.com/waiting-for-dev))
26
+ - Allow creating a billing address [\#188](https://github.com/solidusio-contrib/solidus_graphql_api/pull/188) ([waiting-for-dev](https://github.com/waiting-for-dev))
27
+ - Add ShippingMethod type and associate to ShippingRate [\#187](https://github.com/solidusio-contrib/solidus_graphql_api/pull/187) ([waiting-for-dev](https://github.com/waiting-for-dev))
28
+ - Upgrade batch-loader dependency version [\#186](https://github.com/solidusio-contrib/solidus_graphql_api/pull/186) ([waiting-for-dev](https://github.com/waiting-for-dev))
29
+ - Fix duplication of records on has\_many\_through associations [\#185](https://github.com/solidusio-contrib/solidus_graphql_api/pull/185) ([waiting-for-dev](https://github.com/waiting-for-dev))
30
+ - Add option\_type field within OptionValue type [\#184](https://github.com/solidusio-contrib/solidus_graphql_api/pull/184) ([waiting-for-dev](https://github.com/waiting-for-dev))
31
+ - Fix remote possibility to return wrong current order [\#183](https://github.com/solidusio-contrib/solidus_graphql_api/pull/183) ([waiting-for-dev](https://github.com/waiting-for-dev))
32
+ - Fix user impersonation security vulnerability [\#182](https://github.com/solidusio-contrib/solidus_graphql_api/pull/182) ([waiting-for-dev](https://github.com/waiting-for-dev))
33
+ - Make dependency on Rails \> 6.1 explicit [\#177](https://github.com/solidusio-contrib/solidus_graphql_api/pull/177) ([waiting-for-dev](https://github.com/waiting-for-dev))
34
+ - Solidus 3 preparation [\#167](https://github.com/solidusio-contrib/solidus_graphql_api/pull/167) ([cpfergus1](https://github.com/cpfergus1))
35
+ - Upgrade to GitHub-native Dependabot [\#166](https://github.com/solidusio-contrib/solidus_graphql_api/pull/166) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
36
+ - Fix master build [\#147](https://github.com/solidusio-contrib/solidus_graphql_api/pull/147) ([Sinetheta](https://github.com/Sinetheta))
37
+ - Add Gem Version badge [\#135](https://github.com/solidusio-contrib/solidus_graphql_api/pull/135) ([AlessioRocco](https://github.com/AlessioRocco))
38
+ - Graphql doc [\#122](https://github.com/solidusio-contrib/solidus_graphql_api/pull/122) ([SamuelMartini](https://github.com/SamuelMartini))
39
+
40
+ ## [v0.1.0](https://github.com/solidusio-contrib/solidus_graphql_api/tree/v0.1.0) (2020-07-03)
41
+
42
+ [Full Changelog](https://github.com/solidusio-contrib/solidus_graphql_api/compare/6eedc113d59a6bf008893a3b51fdf3b5aa8fb276...v0.1.0)
43
+
44
+ **Implemented enhancements:**
45
+
46
+ - AddressBook Mutations [\#86](https://github.com/solidusio-contrib/solidus_graphql_api/issues/86)
47
+ - Add markDefaultAddress mutation [\#87](https://github.com/solidusio-contrib/solidus_graphql_api/pull/87) ([AlessioRocco](https://github.com/AlessioRocco))
48
+ - Add removeFromAddressBook mutation [\#85](https://github.com/solidusio-contrib/solidus_graphql_api/pull/85) ([AlessioRocco](https://github.com/AlessioRocco))
49
+ - Add saveInAddressBook mutation [\#83](https://github.com/solidusio-contrib/solidus_graphql_api/pull/83) ([AlessioRocco](https://github.com/AlessioRocco))
50
+ - Fix nullable fields in all types [\#82](https://github.com/solidusio-contrib/solidus_graphql_api/pull/82) ([rainerdema](https://github.com/rainerdema))
51
+ - Current order [\#79](https://github.com/solidusio-contrib/solidus_graphql_api/pull/79) ([mdesantis](https://github.com/mdesantis))
52
+ - Add SignIn Mutation [\#72](https://github.com/solidusio-contrib/solidus_graphql_api/pull/72) ([AlessioRocco](https://github.com/AlessioRocco))
53
+ - Add order type and orders connection [\#54](https://github.com/solidusio-contrib/solidus_graphql_api/pull/54) ([mdesantis](https://github.com/mdesantis))
54
+ - Update ruby image on CircleCI [\#31](https://github.com/solidusio-contrib/solidus_graphql_api/pull/31) ([rainerdema](https://github.com/rainerdema))
55
+
56
+ **Fixed bugs:**
57
+
58
+ - Fix `Duplicate type definition` error during runtime changes in dev environment [\#90](https://github.com/solidusio-contrib/solidus_graphql_api/pull/90) ([rainerdema](https://github.com/rainerdema))
59
+ - Fix user sign-in bug [\#81](https://github.com/solidusio-contrib/solidus_graphql_api/pull/81) ([AlessioRocco](https://github.com/AlessioRocco))
60
+
61
+ **Closed issues:**
62
+
63
+ - Improve specs by using the new example group aliases and shared context [\#61](https://github.com/solidusio-contrib/solidus_graphql_api/issues/61)
64
+ - Currency Type [\#53](https://github.com/solidusio-contrib/solidus_graphql_api/issues/53)
65
+ - Current Order field \(Order Type\) [\#46](https://github.com/solidusio-contrib/solidus_graphql_api/issues/46)
66
+ - Order Type and related Connections and Types [\#45](https://github.com/solidusio-contrib/solidus_graphql_api/issues/45)
67
+ - Search and Filter pattern [\#40](https://github.com/solidusio-contrib/solidus_graphql_api/issues/40)
68
+ - Current Store field \(Store Type\) [\#39](https://github.com/solidusio-contrib/solidus_graphql_api/issues/39)
69
+ - Navigable E-Commerce [\#38](https://github.com/solidusio-contrib/solidus_graphql_api/issues/38)
70
+ - User Profile Management [\#37](https://github.com/solidusio-contrib/solidus_graphql_api/issues/37)
71
+
72
+ **Merged pull requests:**
73
+
74
+ - Update gemspec authors and email [\#134](https://github.com/solidusio-contrib/solidus_graphql_api/pull/134) ([AlessioRocco](https://github.com/AlessioRocco))
75
+ - Update solidus\_dev\_support requirement from ~\> 1.4.0 to ~\> 1.5.0 [\#133](https://github.com/solidusio-contrib/solidus_graphql_api/pull/133) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
76
+ - Update README [\#132](https://github.com/solidusio-contrib/solidus_graphql_api/pull/132) ([SamuelMartini](https://github.com/SamuelMartini))
77
+ - Rename RansackJson to Json and convert nested ids [\#131](https://github.com/solidusio-contrib/solidus_graphql_api/pull/131) ([AlessioRocco](https://github.com/AlessioRocco))
78
+ - Add manifest to shipment [\#130](https://github.com/solidusio-contrib/solidus_graphql_api/pull/130) ([ChristianRimondi](https://github.com/ChristianRimondi))
79
+ - Recalculate the order after update the attributes in the checkout mutations [\#129](https://github.com/solidusio-contrib/solidus_graphql_api/pull/129) ([AlessioRocco](https://github.com/AlessioRocco))
80
+ - Add state field to the Payment type [\#128](https://github.com/solidusio-contrib/solidus_graphql_api/pull/128) ([ChristianRimondi](https://github.com/ChristianRimondi))
81
+ - Set shippingAddress and billingAddress order's fields as nullable [\#127](https://github.com/solidusio-contrib/solidus_graphql_api/pull/127) ([ChristianRimondi](https://github.com/ChristianRimondi))
82
+ - Change the engine mount path from / to /graphql [\#126](https://github.com/solidusio-contrib/solidus_graphql_api/pull/126) ([ChristianRimondi](https://github.com/ChristianRimondi))
83
+ - Set order email mutation [\#125](https://github.com/solidusio-contrib/solidus_graphql_api/pull/125) ([ChristianRimondi](https://github.com/ChristianRimondi))
84
+ - Update graphql requirement from ~\> 1.10.0 to \>= 1.10, \< 1.12 [\#124](https://github.com/solidusio-contrib/solidus_graphql_api/pull/124) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
85
+ - Remove SignIn mutation [\#123](https://github.com/solidusio-contrib/solidus_graphql_api/pull/123) ([AlessioRocco](https://github.com/AlessioRocco))
86
+ - Add Adjustment types and the adjustments connection to the Order type [\#121](https://github.com/solidusio-contrib/solidus_graphql_api/pull/121) ([rainerdema](https://github.com/rainerdema))
87
+ - Update solidus\_dev\_support requirement from ~\> 0.5.0 to ~\> 1.4.0 [\#120](https://github.com/solidusio-contrib/solidus_graphql_api/pull/120) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
88
+ - Update Codeclimate badges to point to the right repo [\#119](https://github.com/solidusio-contrib/solidus_graphql_api/pull/119) ([ChristianRimondi](https://github.com/ChristianRimondi))
89
+ - Add payments to Order type [\#117](https://github.com/solidusio-contrib/solidus_graphql_api/pull/117) ([AlessioRocco](https://github.com/AlessioRocco))
90
+ - Add available payment methods to the Order type [\#116](https://github.com/solidusio-contrib/solidus_graphql_api/pull/116) ([AlessioRocco](https://github.com/AlessioRocco))
91
+ - Add mutation to add a payment to the checkout [\#115](https://github.com/solidusio-contrib/solidus_graphql_api/pull/115) ([AlessioRocco](https://github.com/AlessioRocco))
92
+ - Create order mutation [\#114](https://github.com/solidusio-contrib/solidus_graphql_api/pull/114) ([ChristianRimondi](https://github.com/ChristianRimondi))
93
+ - Add mutation to apply coupon code [\#113](https://github.com/solidusio-contrib/solidus_graphql_api/pull/113) ([rainerdema](https://github.com/rainerdema))
94
+ - Empty cart mutation [\#111](https://github.com/solidusio-contrib/solidus_graphql_api/pull/111) ([ChristianRimondi](https://github.com/ChristianRimondi))
95
+ - Update cart quantity mutation [\#110](https://github.com/solidusio-contrib/solidus_graphql_api/pull/110) ([ChristianRimondi](https://github.com/ChristianRimondi))
96
+ - Remove from cart mutation [\#109](https://github.com/solidusio-contrib/solidus_graphql_api/pull/109) ([ChristianRimondi](https://github.com/ChristianRimondi))
97
+ - Add select shipping rate mutation [\#106](https://github.com/solidusio-contrib/solidus_graphql_api/pull/106) ([AlessioRocco](https://github.com/AlessioRocco))
98
+ - Fix specs for Solidus version \>= 2.11.0.alpha [\#105](https://github.com/solidusio-contrib/solidus_graphql_api/pull/105) ([AlessioRocco](https://github.com/AlessioRocco))
99
+ - Add advanceCheckout mutation [\#104](https://github.com/solidusio-contrib/solidus_graphql_api/pull/104) ([rainerdema](https://github.com/rainerdema))
100
+ - Add completeCheckout mutation [\#103](https://github.com/solidusio-contrib/solidus_graphql_api/pull/103) ([rainerdema](https://github.com/rainerdema))
101
+ - Update batch-loader requirement from ~\> 1.4.1 to \>= 1.4.1, \< 1.6.0 [\#102](https://github.com/solidusio-contrib/solidus_graphql_api/pull/102) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
102
+ - Update solidus\_support requirement from ~\> 0.4.0 to ~\> 0.5 [\#100](https://github.com/solidusio-contrib/solidus_graphql_api/pull/100) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
103
+ - Update pry requirement from ~\> 0.12.2 to ~\> 0.13.1 [\#98](https://github.com/solidusio-contrib/solidus_graphql_api/pull/98) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
104
+ - Update graphql requirement from ~\> 1.9.7 to ~\> 1.10.0 [\#97](https://github.com/solidusio-contrib/solidus_graphql_api/pull/97) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
105
+ - Add shippingRates connection to the Shipment type [\#96](https://github.com/solidusio-contrib/solidus_graphql_api/pull/96) ([AlessioRocco](https://github.com/AlessioRocco))
106
+ - Add shipments connection to the Order type [\#95](https://github.com/solidusio-contrib/solidus_graphql_api/pull/95) ([AlessioRocco](https://github.com/AlessioRocco))
107
+ - Add addAddressesToCheckout mutation [\#94](https://github.com/solidusio-contrib/solidus_graphql_api/pull/94) ([AlessioRocco](https://github.com/AlessioRocco))
108
+ - Add to cart mutation [\#93](https://github.com/solidusio-contrib/solidus_graphql_api/pull/93) ([ChristianRimondi](https://github.com/ChristianRimondi))
109
+ - Add nextCheckoutState mutation [\#92](https://github.com/solidusio-contrib/solidus_graphql_api/pull/92) ([rainerdema](https://github.com/rainerdema))
110
+ - Add the BatchLoader middleware [\#91](https://github.com/solidusio-contrib/solidus_graphql_api/pull/91) ([ChristianRimondi](https://github.com/ChristianRimondi))
111
+ - Update badges link paths in README.md [\#89](https://github.com/solidusio-contrib/solidus_graphql_api/pull/89) ([rainerdema](https://github.com/rainerdema))
112
+ - Now the ProductsQueryInput correctly accepts a relay-style ID for Taxon [\#88](https://github.com/solidusio-contrib/solidus_graphql_api/pull/88) ([ChristianRimondi](https://github.com/ChristianRimondi))
113
+ - Add current\_order to SolidusGraphqlApi::Context hash [\#84](https://github.com/solidusio-contrib/solidus_graphql_api/pull/84) ([AlessioRocco](https://github.com/AlessioRocco))
114
+ - Align expected schema with actual schema [\#78](https://github.com/solidusio-contrib/solidus_graphql_api/pull/78) ([mdesantis](https://github.com/mdesantis))
115
+ - Add LineItem type and order.lineItems field [\#77](https://github.com/solidusio-contrib/solidus_graphql_api/pull/77) ([mdesantis](https://github.com/mdesantis))
116
+ - Improve product by slug spec [\#75](https://github.com/solidusio-contrib/solidus_graphql_api/pull/75) ([ChristianRimondi](https://github.com/ChristianRimondi))
117
+ - Reorganize specs to support GraphQL mutations [\#73](https://github.com/solidusio-contrib/solidus_graphql_api/pull/73) ([AlessioRocco](https://github.com/AlessioRocco))
118
+ - Remove duplicated declaration in expected schema [\#70](https://github.com/solidusio-contrib/solidus_graphql_api/pull/70) ([mdesantis](https://github.com/mdesantis))
119
+ - Add Wallet Type with the connection in User Type [\#69](https://github.com/solidusio-contrib/solidus_graphql_api/pull/69) ([rainerdema](https://github.com/rainerdema))
120
+ - Improve current user specs [\#68](https://github.com/solidusio-contrib/solidus_graphql_api/pull/68) ([AlessioRocco](https://github.com/AlessioRocco))
121
+ - Simplify countries query specs [\#67](https://github.com/solidusio-contrib/solidus_graphql_api/pull/67) ([AlessioRocco](https://github.com/AlessioRocco))
122
+ - Use factory for current store spec [\#66](https://github.com/solidusio-contrib/solidus_graphql_api/pull/66) ([AlessioRocco](https://github.com/AlessioRocco))
123
+ - Improve taxonomy specs [\#65](https://github.com/solidusio-contrib/solidus_graphql_api/pull/65) ([AlessioRocco](https://github.com/AlessioRocco))
124
+ - Improve snapshot specs error messages [\#64](https://github.com/solidusio-contrib/solidus_graphql_api/pull/64) ([mdesantis](https://github.com/mdesantis))
125
+ - Migrate to solidus\_dev\_support [\#63](https://github.com/solidusio-contrib/solidus_graphql_api/pull/63) ([ChristianRimondi](https://github.com/ChristianRimondi))
126
+ - Add Currency Type [\#62](https://github.com/solidusio-contrib/solidus_graphql_api/pull/62) ([rainerdema](https://github.com/rainerdema))
127
+ - Use SimpleCov built-in Rails configurations [\#60](https://github.com/solidusio-contrib/solidus_graphql_api/pull/60) ([AlessioRocco](https://github.com/AlessioRocco))
128
+ - Implement products search [\#59](https://github.com/solidusio-contrib/solidus_graphql_api/pull/59) ([ChristianRimondi](https://github.com/ChristianRimondi))
129
+ - Allow developers to set a local .Gemfile [\#58](https://github.com/solidusio-contrib/solidus_graphql_api/pull/58) ([mdesantis](https://github.com/mdesantis))
130
+ - Improve current store query specs [\#56](https://github.com/solidusio-contrib/solidus_graphql_api/pull/56) ([AlessioRocco](https://github.com/AlessioRocco))
131
+ - Add snapshot specs for countries query [\#55](https://github.com/solidusio-contrib/solidus_graphql_api/pull/55) ([AlessioRocco](https://github.com/AlessioRocco))
132
+ - Move expected schema into spec/support [\#52](https://github.com/solidusio-contrib/solidus_graphql_api/pull/52) ([AlessioRocco](https://github.com/AlessioRocco))
133
+ - Improve Helpers::Graphql.execute\_query spec helper [\#51](https://github.com/solidusio-contrib/solidus_graphql_api/pull/51) ([AlessioRocco](https://github.com/AlessioRocco))
134
+ - Use match\_array instead of eq in the queries specs [\#50](https://github.com/solidusio-contrib/solidus_graphql_api/pull/50) ([ChristianRimondi](https://github.com/ChristianRimondi))
135
+ - Remove graphiql-rails gem [\#49](https://github.com/solidusio-contrib/solidus_graphql_api/pull/49) ([AlessioRocco](https://github.com/AlessioRocco))
136
+ - Add Store Type [\#47](https://github.com/solidusio-contrib/solidus_graphql_api/pull/47) ([rainerdema](https://github.com/rainerdema))
137
+ - Add an Object to manage the schema context [\#36](https://github.com/solidusio-contrib/solidus_graphql_api/pull/36) ([AlessioRocco](https://github.com/AlessioRocco))
138
+ - Remove object id from the batch loader key [\#35](https://github.com/solidusio-contrib/solidus_graphql_api/pull/35) ([ChristianRimondi](https://github.com/ChristianRimondi))
139
+ - Add addresses field to user type [\#34](https://github.com/solidusio-contrib/solidus_graphql_api/pull/34) ([rainerdema](https://github.com/rainerdema))
140
+ - Fix CircleCI specs errors [\#32](https://github.com/solidusio-contrib/solidus_graphql_api/pull/32) ([ChristianRimondi](https://github.com/ChristianRimondi))
141
+ - Fix namespace errors [\#30](https://github.com/solidusio-contrib/solidus_graphql_api/pull/30) ([ChristianRimondi](https://github.com/ChristianRimondi))
142
+ - Add images connection field to Variant Type [\#29](https://github.com/solidusio-contrib/solidus_graphql_api/pull/29) ([AlessioRocco](https://github.com/AlessioRocco))
143
+ - Add product\_by\_slug field to root query [\#28](https://github.com/solidusio-contrib/solidus_graphql_api/pull/28) ([ChristianRimondi](https://github.com/ChristianRimondi))
144
+ - Add properties to product type [\#27](https://github.com/solidusio-contrib/solidus_graphql_api/pull/27) ([AlessioRocco](https://github.com/AlessioRocco))
145
+ - Add ProductProperty Type [\#26](https://github.com/solidusio-contrib/solidus_graphql_api/pull/26) ([AlessioRocco](https://github.com/AlessioRocco))
146
+ - Add Property Type [\#25](https://github.com/solidusio-contrib/solidus_graphql_api/pull/25) ([AlessioRocco](https://github.com/AlessioRocco))
147
+ - Disable the cache for all the `BatchLoader` run in the tests [\#24](https://github.com/solidusio-contrib/solidus_graphql_api/pull/24) ([ChristianRimondi](https://github.com/ChristianRimondi))
148
+ - Add products field to the root query [\#23](https://github.com/solidusio-contrib/solidus_graphql_api/pull/23) ([AlessioRocco](https://github.com/AlessioRocco))
149
+ - Align StatesQuery with other queries object [\#22](https://github.com/solidusio-contrib/solidus_graphql_api/pull/22) ([AlessioRocco](https://github.com/AlessioRocco))
150
+ - Fix spec file name typo [\#21](https://github.com/solidusio-contrib/solidus_graphql_api/pull/21) ([AlessioRocco](https://github.com/AlessioRocco))
151
+ - Type Customization API [\#20](https://github.com/solidusio-contrib/solidus_graphql_api/pull/20) ([aldesantis](https://github.com/aldesantis))
152
+ - Batch loading framework [\#19](https://github.com/solidusio-contrib/solidus_graphql_api/pull/19) ([aldesantis](https://github.com/aldesantis))
153
+ - Add Variant Type [\#18](https://github.com/solidusio-contrib/solidus_graphql_api/pull/18) ([AlessioRocco](https://github.com/AlessioRocco))
154
+ - Add Option Type type [\#17](https://github.com/solidusio-contrib/solidus_graphql_api/pull/17) ([AlessioRocco](https://github.com/AlessioRocco))
155
+ - Add OptionValue Type [\#16](https://github.com/solidusio-contrib/solidus_graphql_api/pull/16) ([AlessioRocco](https://github.com/AlessioRocco))
156
+ - Add Price Type [\#15](https://github.com/solidusio-contrib/solidus_graphql_api/pull/15) ([AlessioRocco](https://github.com/AlessioRocco))
157
+ - Check if the Schema is up-to-date [\#14](https://github.com/solidusio-contrib/solidus_graphql_api/pull/14) ([ChristianRimondi](https://github.com/ChristianRimondi))
158
+ - Add Address type [\#13](https://github.com/solidusio-contrib/solidus_graphql_api/pull/13) ([rainerdema](https://github.com/rainerdema))
159
+ - Add User type [\#12](https://github.com/solidusio-contrib/solidus_graphql_api/pull/12) ([rainerdema](https://github.com/rainerdema))
160
+ - Add authentication [\#10](https://github.com/solidusio-contrib/solidus_graphql_api/pull/10) ([ChristianRimondi](https://github.com/ChristianRimondi))
161
+ - Add Taxon type [\#9](https://github.com/solidusio-contrib/solidus_graphql_api/pull/9) ([rainerdema](https://github.com/rainerdema))
162
+ - Add Taxonomy type [\#8](https://github.com/solidusio-contrib/solidus_graphql_api/pull/8) ([AlessioRocco](https://github.com/AlessioRocco))
163
+ - Add State Type [\#7](https://github.com/solidusio-contrib/solidus_graphql_api/pull/7) ([AlessioRocco](https://github.com/AlessioRocco))
164
+ - Add batch-loader gem [\#6](https://github.com/solidusio-contrib/solidus_graphql_api/pull/6) ([AlessioRocco](https://github.com/AlessioRocco))
165
+ - Add Country type [\#5](https://github.com/solidusio-contrib/solidus_graphql_api/pull/5) ([ChristianRimondi](https://github.com/ChristianRimondi))
166
+ - Add Circle CI and Code Climate configurations [\#4](https://github.com/solidusio-contrib/solidus_graphql_api/pull/4) ([ChristianRimondi](https://github.com/ChristianRimondi))
167
+
168
+
169
+
170
+ \* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)*
data/Gemfile CHANGED
@@ -6,11 +6,6 @@ git_source(:github) { |repo| "https://github.com/#{repo}.git" }
6
6
  branch = ENV.fetch('SOLIDUS_BRANCH', 'master')
7
7
  gem 'solidus', github: 'solidusio/solidus', branch: branch
8
8
 
9
- # Needed to help Bundler figure out how to resolve dependencies,
10
- # otherwise it takes forever to resolve them.
11
- # See https://github.com/bundler/bundler/issues/6677
12
- gem 'rails', '>0.a'
13
-
14
9
  # Provides basic authentication functionality for testing parts of your engine
15
10
  gem 'solidus_auth_devise'
16
11
 
data/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2020 Nebulab
1
+ Copyright (c) 2020-2021 Nebulab
2
2
  All rights reserved.
3
3
 
4
4
  Redistribution and use in source and binary forms, with or without modification,
data/README.md CHANGED
@@ -1,11 +1,16 @@
1
+ # SolidusGraphqlApi
2
+
1
3
  [![Maintainability](https://api.codeclimate.com/v1/badges/8ea7739ad6726ad8cfa7/maintainability)](https://codeclimate.com/github/solidusio-contrib/solidus_graphql_api/maintainability)
2
4
  [![Test Coverage](https://api.codeclimate.com/v1/badges/8ea7739ad6726ad8cfa7/test_coverage)](https://codeclimate.com/github/solidusio-contrib/solidus_graphql_api/test_coverage)
3
- [![CircleCI](https://circleci.com/gh/solidusio-contrib/solidus_graphql_api.svg?style=svg)](https://circleci.com/gh/solidusio-contrib/solidus_graphql_api)
4
-
5
- # SolidusGraphqlApi
5
+ [![CircleCI](https://circleci.com/gh/solidusio-contrib/solidus_graphql_api.svg?style=shield)](https://circleci.com/gh/solidusio-contrib/solidus_graphql_api)
6
+ [![Gem Version](https://badge.fury.io/rb/solidus_graphql_api.svg)](https://badge.fury.io/rb/solidus_graphql_api)
6
7
 
7
8
  Provides a [graphql](https://graphql.org/) api for the [Solidus](https://github.com/solidusio/solidus) ecommerce framework.
8
9
 
10
+ ## Supported Versions
11
+
12
+ - Solidus 2.11.x
13
+ - Solidus 3.x
9
14
  ## Installation
10
15
 
11
16
  Add solidus_graphql_api to your Gemfile:
@@ -14,10 +19,10 @@ Add solidus_graphql_api to your Gemfile:
14
19
  gem 'solidus_graphql_api'
15
20
  ```
16
21
 
17
- Bundle your dependencies:
22
+ Bundle your dependencies and run the installation generator:
18
23
 
19
24
  ```shell
20
- bundle
25
+ bin/rails generate solidus_graphql_api:install
21
26
  ```
22
27
 
23
28
  Unlike the REST API which has a variety of endpoints, the GraphQL API has a
@@ -29,6 +34,10 @@ For example in development you can use:
29
34
  POST http://localhost:3000/graphql
30
35
  ```
31
36
 
37
+ ## Documentation
38
+
39
+ The Solidus GraphQL API documentation can be found [here](https://solidusio-contrib.github.io/solidus_graphql_api/docs/).
40
+
32
41
  ## Customizations
33
42
 
34
43
  You can extend the gem functionality through decorators, just like Solidus.
@@ -232,14 +241,21 @@ $ bin/rails server
232
241
  Use Ctrl-C to stop
233
242
  ```
234
243
 
235
- ### Releasing new versions
244
+ ### Updating the changelog
236
245
 
237
- Your new extension version can be released using `gem-release` like this:
246
+ Before and after releases the changelog should be updated to reflect the up-to-date status of
247
+ the project:
238
248
 
239
249
  ```shell
240
- bundle exec gem bump -v VERSION --tag --push --remote upstream && gem release
250
+ bin/rake changelog
251
+ git add CHANGELOG.md
252
+ git commit -m "Update the changelog"
241
253
  ```
242
254
 
255
+ ### Releasing new versions
256
+
257
+ Please refer to the dedicated [page](https://github.com/solidusio/solidus/wiki/How-to-release-extensions) on Solidus wiki.
258
+
243
259
  ## License
244
260
 
245
- Copyright (c) 2020 Nebulab, released under the New BSD License.
261
+ Copyright (c) 2020-2021 Nebulab, released under the New BSD License.
data/Rakefile CHANGED
@@ -1,33 +1,47 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'solidus_dev_support/rake_tasks'
4
- SolidusDevSupport::RakeTasks.install
4
+ require 'graphql-docs'
5
5
 
6
- require 'rubocop/rake_task'
7
- RuboCop::RakeTask.new
6
+ SolidusDevSupport::RakeTasks.install
8
7
 
9
- task default: %w[rubocop extension:specs]
8
+ task default: 'extension:specs'
10
9
 
11
10
  namespace :schema do
12
- desc 'Dump the schema to JSON and IDL'
11
+ desc 'Generates documentation from schema.graphql'
12
+ task :generate_docs do
13
+ doc_dir = "./lib/graphql_docs"
14
+ GraphQLDocs.build(
15
+ filename: "#{__dir__}/schema.graphql",
16
+ output_dir: 'docs',
17
+ base_url: '/solidus_graphql_api/docs',
18
+ landing_pages: { index: "#{doc_dir}/landing_pages/index.md" },
19
+ delete_output: true
20
+ )
21
+ end
22
+
23
+ desc 'Dump the schema to JSON and IDL and generate docs'
13
24
  task :dump do
14
25
  setup_graphql_rake_tasks
15
26
 
16
27
  Rake::Task['graphql:schema:dump'].invoke
28
+ Rake::Task['schema:generate_docs'].invoke
17
29
  end
18
30
 
19
- desc 'Dump the schema to IDL in schema.graphql'
31
+ desc 'Dump the schema to IDL in schema.graphql and generate docs'
20
32
  task :idl do
21
33
  setup_graphql_rake_tasks
22
34
 
23
35
  Rake::Task['graphql:schema:idl'].invoke
36
+ Rake::Task['schema:generate_docs'].invoke
24
37
  end
25
38
 
26
- desc 'Dump the schema to JSON in schema.json'
39
+ desc 'Dump the schema to JSON in schema.json and generate docs'
27
40
  task :json do
28
41
  setup_graphql_rake_tasks
29
42
 
30
43
  Rake::Task['graphql:schema:json'].invoke
44
+ Rake::Task['schema:generate_docs'].invoke
31
45
  end
32
46
  end
33
47
 
@@ -0,0 +1,2 @@
1
+ // Placeholder manifest file.
2
+ // the installer will append this file to the app vendored assets here: vendor/assets/javascripts/spree/backend/all.js'
@@ -0,0 +1,2 @@
1
+ // Placeholder manifest file.
2
+ // the installer will append this file to the app vendored assets here: vendor/assets/javascripts/spree/frontend/all.js'
@@ -0,0 +1,4 @@
1
+ /*
2
+ Placeholder manifest file.
3
+ the installer will append this file to the app vendored assets here: 'vendor/assets/stylesheets/spree/backend/all.css'
4
+ */
@@ -0,0 +1,4 @@
1
+ /*
2
+ Placeholder manifest file.
3
+ the installer will append this file to the app vendored assets here: 'vendor/assets/stylesheets/spree/frontend/all.css'
4
+ */
@@ -2,6 +2,8 @@
2
2
 
3
3
  module Spree
4
4
  class GraphqlController < ApplicationController
5
+ include ActiveStorage::SetCurrent
6
+
5
7
  skip_before_action :verify_authenticity_token
6
8
 
7
9
  def execute
data/bin/console CHANGED
@@ -10,8 +10,8 @@ require "solidus_graphql_api"
10
10
  $LOAD_PATH.unshift(*Dir["#{__dir__}/../app/*"])
11
11
 
12
12
  # (If you use this, don't forget to add pry to your Gemfile!)
13
- require "pry"
14
- Pry.start
13
+ # require "pry"
14
+ # Pry.start
15
15
 
16
16
  require "irb"
17
17
  IRB.start(__FILE__)
data/bin/rails CHANGED
@@ -1,7 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- # frozen_string_literal: true
4
-
5
3
  if %w[g generate].include? ARGV.first
6
4
  exec "#{__dir__}/rails-engine", *ARGV
7
5
  else
data/bin/rails-engine CHANGED
@@ -1,7 +1,4 @@
1
1
  #!/usr/bin/env ruby
2
-
3
- # frozen_string_literal: true
4
-
5
2
  # This command will automatically be run when you run "rails" with Rails gems
6
3
  # installed from the root of your application.
7
4
 
data/bin/rails-sandbox CHANGED
@@ -1,13 +1,11 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- # frozen_string_literal: true
4
-
5
3
  app_root = 'sandbox'
6
4
 
7
5
  unless File.exist? "#{app_root}/bin/rails"
8
6
  warn 'Creating the sandbox app...'
9
7
  Dir.chdir "#{__dir__}/.." do
10
- system "#{__dir__}/sandbox" or begin # rubocop:disable Style/AndOr
8
+ system "#{__dir__}/sandbox" or begin
11
9
  warn 'Automatic creation of the sandbox app failed'
12
10
  exit 1
13
11
  end
data/bin/rake CHANGED
@@ -1,5 +1,4 @@
1
1
  #!/usr/bin/env ruby
2
-
3
2
  # frozen_string_literal: true
4
3
 
5
4
  require "rubygems"
data/bin/sandbox CHANGED
@@ -67,14 +67,16 @@ unbundled bundle install --gemfile Gemfile
67
67
 
68
68
  unbundled bundle exec rake db:drop db:create
69
69
 
70
- unbundled bundle exec rails generate spree:install \
70
+ unbundled bundle exec rails generate solidus:install \
71
71
  --auto-accept \
72
72
  --user_class=Spree::User \
73
73
  --enforce_available_locales=true \
74
74
  --with-authentication=false \
75
+ --payment-method=none \
75
76
  $@
76
77
 
77
78
  unbundled bundle exec rails generate solidus:auth:install
79
+ unbundled bundle exec rails generate ${extension_name}:install
78
80
 
79
81
  echo
80
82
  echo "🚀 Sandbox app successfully created for $extension_name!"
Binary file
Binary file
Binary file