solidus_graphql_api 0.1.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (282) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +43 -67
  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 +10 -4
  7. data/CHANGELOG.md +4 -0
  8. data/CONTRIBUTING.md +5 -5
  9. data/Gemfile +1 -1
  10. data/Gemfile-local +1 -0
  11. data/LICENSE +1 -1
  12. data/OLD_CHANGELOG.md +170 -0
  13. data/README.md +26 -10
  14. data/Rakefile +22 -7
  15. data/app/assets/javascripts/spree/backend/solidus_graphql_api.js +2 -0
  16. data/app/assets/javascripts/spree/frontend/solidus_graphql_api.js +2 -0
  17. data/app/assets/stylesheets/spree/backend/solidus_graphql_api.css +4 -0
  18. data/app/assets/stylesheets/spree/frontend/solidus_graphql_api.css +4 -0
  19. data/app/controllers/spree/graphql_controller.rb +2 -0
  20. data/bin/console +2 -2
  21. data/bin/rails +0 -2
  22. data/bin/rails-engine +0 -3
  23. data/bin/rails-sandbox +1 -3
  24. data/bin/rake +0 -1
  25. data/bin/sandbox +5 -7
  26. data/docs/assets/images/graphiql-headers.png +0 -0
  27. data/docs/assets/images/graphiql-variables.png +0 -0
  28. data/docs/assets/images/graphiql.png +0 -0
  29. data/docs/assets/images/menu.png +0 -0
  30. data/docs/assets/images/navbar.png +0 -0
  31. data/docs/assets/style.css +1115 -0
  32. data/docs/assets/webfonts/2C4B9D_B_0.eot +0 -0
  33. data/docs/assets/webfonts/2C4B9D_B_0.ttf +0 -0
  34. data/docs/assets/webfonts/2C4B9D_B_0.woff +0 -0
  35. data/docs/assets/webfonts/2C4B9D_B_0.woff2 +0 -0
  36. data/docs/assets/webfonts/2C4B9D_C_0.eot +0 -0
  37. data/docs/assets/webfonts/2C4B9D_C_0.ttf +0 -0
  38. data/docs/assets/webfonts/2C4B9D_C_0.woff +0 -0
  39. data/docs/assets/webfonts/2C4B9D_C_0.woff2 +0 -0
  40. data/docs/assets/webfonts/2C4B9D_D_0.eot +0 -0
  41. data/docs/assets/webfonts/2C4B9D_D_0.ttf +0 -0
  42. data/docs/assets/webfonts/2C4B9D_D_0.woff +0 -0
  43. data/docs/assets/webfonts/2C4B9D_D_0.woff2 +0 -0
  44. data/docs/assets/webfonts/2C4B9D_E_0.eot +0 -0
  45. data/docs/assets/webfonts/2C4B9D_E_0.ttf +0 -0
  46. data/docs/assets/webfonts/2C4B9D_E_0.woff +0 -0
  47. data/docs/assets/webfonts/2C4B9D_E_0.woff2 +0 -0
  48. data/docs/directive/deprecated/index.html +1142 -0
  49. data/docs/directive/include/index.html +1141 -0
  50. data/docs/directive/index.html +1113 -0
  51. data/docs/directive/skip/index.html +1141 -0
  52. data/docs/enum/__directivelocation/index.html +1204 -0
  53. data/docs/enum/__typekind/index.html +1154 -0
  54. data/docs/enum/addresstypeinput/index.html +1121 -0
  55. data/docs/enum/index.html +1113 -0
  56. data/docs/index.html +1122 -0
  57. data/docs/input_object/addaddressestocheckoutinput/index.html +1135 -0
  58. data/docs/input_object/addpaymenttocheckoutinput/index.html +1135 -0
  59. data/docs/input_object/addressinput/index.html +1169 -0
  60. data/docs/input_object/addtocartinput/index.html +1130 -0
  61. data/docs/input_object/advancecheckoutinput/index.html +1120 -0
  62. data/docs/input_object/applycouponcodeinput/index.html +1125 -0
  63. data/docs/input_object/completecheckoutinput/index.html +1120 -0
  64. data/docs/input_object/createorderinput/index.html +1120 -0
  65. data/docs/input_object/emptycartinput/index.html +1120 -0
  66. data/docs/input_object/index.html +1113 -0
  67. data/docs/input_object/markdefaultshipaddressinput/index.html +1125 -0
  68. data/docs/input_object/nextcheckoutstateinput/index.html +1120 -0
  69. data/docs/input_object/productsqueryinput/index.html +1132 -0
  70. data/docs/input_object/removefromaddressbookinput/index.html +1125 -0
  71. data/docs/input_object/removefromcartinput/index.html +1125 -0
  72. data/docs/input_object/saveinaddressbookinput/index.html +1135 -0
  73. data/docs/input_object/selectshippingrateinput/index.html +1125 -0
  74. data/docs/input_object/setorderemailinput/index.html +1125 -0
  75. data/docs/input_object/updatecartquantityinput/index.html +1130 -0
  76. data/docs/interface/adjustment/index.html +1145 -0
  77. data/docs/interface/index.html +1113 -0
  78. data/docs/interface/node/index.html +1151 -0
  79. data/docs/interface/paymentsource/index.html +1134 -0
  80. data/docs/mutation/addaddressestocheckout/index.html +1137 -0
  81. data/docs/mutation/addpaymenttocheckout/index.html +1137 -0
  82. data/docs/mutation/addtocart/index.html +1137 -0
  83. data/docs/mutation/advancecheckout/index.html +1137 -0
  84. data/docs/mutation/applycouponcode/index.html +1137 -0
  85. data/docs/mutation/completecheckout/index.html +1137 -0
  86. data/docs/mutation/createorder/index.html +1137 -0
  87. data/docs/mutation/emptycart/index.html +1137 -0
  88. data/docs/mutation/markdefaultshipaddress/index.html +1132 -0
  89. data/docs/mutation/nextcheckoutstate/index.html +1137 -0
  90. data/docs/mutation/removefromaddressbook/index.html +1132 -0
  91. data/docs/mutation/removefromcart/index.html +1137 -0
  92. data/docs/mutation/saveinaddressbook/index.html +1137 -0
  93. data/docs/mutation/selectshippingrate/index.html +1137 -0
  94. data/docs/mutation/setorderemail/index.html +1137 -0
  95. data/docs/mutation/updatecartquantity/index.html +1137 -0
  96. data/docs/object/__directive/index.html +1182 -0
  97. data/docs/object/__enumvalue/index.html +1134 -0
  98. data/docs/object/__field/index.html +1164 -0
  99. data/docs/object/__inputvalue/index.html +1145 -0
  100. data/docs/object/__schema/index.html +1144 -0
  101. data/docs/object/__type/index.html +1220 -0
  102. data/docs/object/addaddressestocheckoutpayload/index.html +1130 -0
  103. data/docs/object/addpaymenttocheckoutpayload/index.html +1130 -0
  104. data/docs/object/address/index.html +1189 -0
  105. data/docs/object/addressconnection/index.html +1132 -0
  106. data/docs/object/addressedge/index.html +1126 -0
  107. data/docs/object/addtocartpayload/index.html +1130 -0
  108. data/docs/object/adjustmentconnection/index.html +1132 -0
  109. data/docs/object/adjustmentedge/index.html +1126 -0
  110. data/docs/object/advancecheckoutpayload/index.html +1130 -0
  111. data/docs/object/applycouponcodepayload/index.html +1130 -0
  112. data/docs/object/completecheckoutpayload/index.html +1130 -0
  113. data/docs/object/country/index.html +1218 -0
  114. data/docs/object/countryconnection/index.html +1132 -0
  115. data/docs/object/countryedge/index.html +1126 -0
  116. data/docs/object/createorderpayload/index.html +1130 -0
  117. data/docs/object/creditcard/index.html +1170 -0
  118. data/docs/object/currency/index.html +1144 -0
  119. data/docs/object/currencyconnection/index.html +1132 -0
  120. data/docs/object/currencyedge/index.html +1126 -0
  121. data/docs/object/emptycartpayload/index.html +1130 -0
  122. data/docs/object/image/index.html +1169 -0
  123. data/docs/object/imageconnection/index.html +1132 -0
  124. data/docs/object/imageedge/index.html +1126 -0
  125. data/docs/object/index.html +1113 -0
  126. data/docs/object/lineitem/index.html +1184 -0
  127. data/docs/object/lineitemconnection/index.html +1132 -0
  128. data/docs/object/lineitemedge/index.html +1126 -0
  129. data/docs/object/manifestitem/index.html +1124 -0
  130. data/docs/object/markdefaultshipaddresspayload/index.html +1125 -0
  131. data/docs/object/nextcheckoutstatepayload/index.html +1130 -0
  132. data/docs/object/optiontype/index.html +1203 -0
  133. data/docs/object/optiontypeconnection/index.html +1132 -0
  134. data/docs/object/optiontypeedge/index.html +1126 -0
  135. data/docs/object/optionvalue/index.html +1154 -0
  136. data/docs/object/optionvalueconnection/index.html +1132 -0
  137. data/docs/object/optionvalueedge/index.html +1126 -0
  138. data/docs/object/order/index.html +1412 -0
  139. data/docs/object/orderconnection/index.html +1132 -0
  140. data/docs/object/orderedge/index.html +1126 -0
  141. data/docs/object/pageinfo/index.html +1138 -0
  142. data/docs/object/payment/index.html +1149 -0
  143. data/docs/object/paymentmethod/index.html +1149 -0
  144. data/docs/object/price/index.html +1159 -0
  145. data/docs/object/priceconnection/index.html +1132 -0
  146. data/docs/object/priceedge/index.html +1126 -0
  147. data/docs/object/product/index.html +1327 -0
  148. data/docs/object/productconnection/index.html +1132 -0
  149. data/docs/object/productedge/index.html +1126 -0
  150. data/docs/object/productproperty/index.html +1149 -0
  151. data/docs/object/productpropertyconnection/index.html +1132 -0
  152. data/docs/object/productpropertyedge/index.html +1126 -0
  153. data/docs/object/promotionadjustment/index.html +1155 -0
  154. data/docs/object/property/index.html +1144 -0
  155. data/docs/object/removefromaddressbookpayload/index.html +1125 -0
  156. data/docs/object/removefromcartpayload/index.html +1130 -0
  157. data/docs/object/saveinaddressbookpayload/index.html +1130 -0
  158. data/docs/object/selectshippingratepayload/index.html +1130 -0
  159. data/docs/object/setorderemailpayload/index.html +1130 -0
  160. data/docs/object/shipment/index.html +1218 -0
  161. data/docs/object/shipmentconnection/index.html +1132 -0
  162. data/docs/object/shipmentedge/index.html +1126 -0
  163. data/docs/object/shippingmethod/index.html +1174 -0
  164. data/docs/object/shippingrate/index.html +1154 -0
  165. data/docs/object/shippingrateconnection/index.html +1132 -0
  166. data/docs/object/shippingrateedge/index.html +1126 -0
  167. data/docs/object/state/index.html +1144 -0
  168. data/docs/object/stateconnection/index.html +1132 -0
  169. data/docs/object/stateedge/index.html +1126 -0
  170. data/docs/object/store/index.html +1238 -0
  171. data/docs/object/taxadjustment/index.html +1150 -0
  172. data/docs/object/taxon/index.html +1228 -0
  173. data/docs/object/taxonconnection/index.html +1132 -0
  174. data/docs/object/taxonedge/index.html +1126 -0
  175. data/docs/object/taxonomy/index.html +1198 -0
  176. data/docs/object/taxonomyconnection/index.html +1132 -0
  177. data/docs/object/taxonomyedge/index.html +1126 -0
  178. data/docs/object/updatecartquantitypayload/index.html +1130 -0
  179. data/docs/object/user/index.html +1280 -0
  180. data/docs/object/usererror/index.html +1126 -0
  181. data/docs/object/variant/index.html +1332 -0
  182. data/docs/object/variantconnection/index.html +1132 -0
  183. data/docs/object/variantedge/index.html +1126 -0
  184. data/docs/object/walletpaymentsource/index.html +1144 -0
  185. data/docs/object/walletpaymentsourceconnection/index.html +1132 -0
  186. data/docs/object/walletpaymentsourceedge/index.html +1126 -0
  187. data/docs/operation/mutation/index.html +1114 -0
  188. data/docs/operation/query/index.html +1431 -0
  189. data/docs/scalar/boolean/index.html +1112 -0
  190. data/docs/scalar/float/index.html +1112 -0
  191. data/docs/scalar/id/index.html +1112 -0
  192. data/docs/scalar/index.html +1113 -0
  193. data/docs/scalar/int/index.html +1112 -0
  194. data/docs/scalar/iso8601datetime/index.html +1112 -0
  195. data/docs/scalar/json/index.html +1112 -0
  196. data/docs/scalar/string/index.html +1112 -0
  197. data/docs/union/index.html +1113 -0
  198. data/lib/generators/solidus_graphql_api/install/install_generator.rb +19 -0
  199. data/lib/generators/solidus_graphql_api/install/templates/initializer.rb +6 -0
  200. data/lib/graphql_docs/landing_pages/index.md +16 -0
  201. data/lib/solidus_graphql_api/batch_loader/has_many_through.rb +1 -0
  202. data/lib/solidus_graphql_api/batch_loader.rb +1 -1
  203. data/lib/solidus_graphql_api/configuration.rb +12 -8
  204. data/lib/solidus_graphql_api/context.rb +8 -2
  205. data/lib/solidus_graphql_api/engine.rb +2 -2
  206. data/lib/solidus_graphql_api/mutations/base_mutation.rb +3 -3
  207. data/lib/solidus_graphql_api/mutations/checkout/add_payment_to_checkout.rb +1 -1
  208. data/lib/solidus_graphql_api/mutations/user/{mark_default_address.rb → mark_default_ship_address.rb} +2 -2
  209. data/lib/solidus_graphql_api/mutations/user/save_in_address_book.rb +8 -2
  210. data/lib/solidus_graphql_api/queries/option_value/option_type_query.rb +19 -0
  211. data/lib/solidus_graphql_api/queries/shipping_rate/shipping_method_query.rb +19 -0
  212. data/lib/solidus_graphql_api/queries/taxon/children_query.rb +1 -1
  213. data/lib/solidus_graphql_api/queries/taxonomy/taxons_query.rb +1 -1
  214. data/lib/solidus_graphql_api/queries/variant/default_price_query.rb +1 -1
  215. data/lib/solidus_graphql_api/{factories → testing_support/factories}/address_factory.rb +1 -2
  216. data/lib/solidus_graphql_api/{factories → testing_support/factories}/taxonomy_factory.rb +10 -0
  217. data/lib/solidus_graphql_api/testing_support/factories.rb +9 -0
  218. data/lib/solidus_graphql_api/types/address.rb +1 -2
  219. data/lib/solidus_graphql_api/types/base/relay_node.rb +1 -1
  220. data/lib/solidus_graphql_api/types/input_objects/address_input.rb +1 -2
  221. data/lib/solidus_graphql_api/types/json.rb +6 -3
  222. data/lib/solidus_graphql_api/types/mutation.rb +1 -1
  223. data/lib/solidus_graphql_api/types/option_value.rb +5 -0
  224. data/lib/solidus_graphql_api/types/query.rb +2 -2
  225. data/lib/solidus_graphql_api/types/shipping_method.rb +20 -0
  226. data/lib/solidus_graphql_api/types/shipping_rate.rb +5 -0
  227. data/lib/solidus_graphql_api/types/user.rb +1 -1
  228. data/lib/solidus_graphql_api/version.rb +1 -1
  229. data/lib/solidus_graphql_api.rb +0 -3
  230. data/schema.graphql +128 -26
  231. data/solidus_graphql_api.gemspec +12 -12
  232. data/spec/integration/mutations/checkout/add_addresses_to_checkout_spec.rb +13 -19
  233. data/spec/integration/mutations/checkout/apply_coupon_code_spec.rb +3 -1
  234. data/spec/integration/mutations/{mark_default_address_spec.rb → mark_default_ship_address_spec.rb} +5 -5
  235. data/spec/integration/mutations/remove_from_address_book_spec.rb +4 -4
  236. data/spec/integration/mutations/save_in_address_book_spec.rb +25 -12
  237. data/spec/integration/queries/completed_orders_spec.rb +19 -15
  238. data/spec/integration/queries/countries_spec.rb +2 -2
  239. data/spec/integration/queries/current_order_spec.rb +4 -1
  240. data/spec/integration/queries/current_store_spec.rb +1 -1
  241. data/spec/integration/queries/current_user_spec.rb +7 -2
  242. data/spec/integration/queries/products_spec.rb +4 -1
  243. data/spec/integration/queries/taxonomies_spec.rb +12 -4
  244. data/spec/integration/types/json_spec.rb +17 -0
  245. data/spec/lib/solidus_graphql_api/batch_loader/belongs_to_spec.rb +24 -25
  246. data/spec/lib/solidus_graphql_api/batch_loader/has_many_spec.rb +17 -15
  247. data/spec/lib/solidus_graphql_api/batch_loader/has_many_through_spec.rb +42 -25
  248. data/spec/lib/solidus_graphql_api/batch_loader/has_one_spec.rb +17 -15
  249. data/spec/lib/solidus_graphql_api/context_spec.rb +119 -6
  250. data/spec/lib/solidus_graphql_api/queries/option_value/option_type_query_spec.rb +10 -0
  251. data/spec/lib/solidus_graphql_api/queries/shipping_rate/shipping_method_query_spec.rb +11 -0
  252. data/spec/lib/solidus_graphql_api/queries/taxon/children_query_spec.rb +9 -5
  253. data/spec/lib/solidus_graphql_api/queries/taxonomy/taxons_query_spec.rb +8 -5
  254. data/spec/lib/solidus_graphql_api/queries/variant/default_price_query_spec.rb +1 -1
  255. data/spec/lib/solidus_graphql_api/types/base/object_spec.rb +5 -1
  256. data/spec/lib/solidus_graphql_api/types/json_spec.rb +2 -1
  257. data/spec/lib/solidus_graphql_api/types/option_value_spec.rb +22 -0
  258. data/spec/lib/solidus_graphql_api/types/product_spec.rb +3 -1
  259. data/spec/lib/solidus_graphql_api/types/query_spec.rb +3 -1
  260. data/spec/lib/solidus_graphql_api/types/shipping_rate_spec.rb +22 -0
  261. data/spec/requests/spree/graphql_controller_spec.rb +15 -2
  262. data/spec/spec_helper.rb +20 -12
  263. data/spec/support/expected_schema.graphql +128 -26
  264. data/spec/support/graphql/mutations/add_addresses_to_checkout.gql +2 -2
  265. data/spec/support/graphql/mutations/mark_default_ship_address.gql +9 -0
  266. data/spec/support/graphql/mutations/remove_from_address_book.gql +1 -1
  267. data/spec/support/graphql/mutations/save_in_address_book.gql +6 -5
  268. data/spec/support/graphql/queries/completed_orders/billing_address.gql +1 -2
  269. data/spec/support/graphql/queries/completed_orders/shipping_address.gql +1 -2
  270. data/spec/support/graphql/queries/current_user.gql +6 -11
  271. data/spec/support/graphql/responses/completed_orders/billing_address.json.erb +2 -4
  272. data/spec/support/graphql/responses/completed_orders/shipping_address.json.erb +2 -4
  273. data/spec/support/graphql/responses/current_store.json.erb +1 -1
  274. data/spec/support/graphql/responses/current_user.json.erb +7 -13
  275. data/spec/support/graphql/responses/taxonomies.json.erb +7 -7
  276. data/spec/support/helpers/active_record.rb +18 -0
  277. data/spec/support/helpers/graphql.rb +4 -4
  278. metadata +245 -54
  279. data/lib/solidus_graphql_api/factories.rb +0 -11
  280. data/spec/support/graphql/mutations/mark_default_address.gql +0 -9
  281. /data/lib/solidus_graphql_api/{factories → testing_support/factories}/country_factory.rb +0 -0
  282. /data/lib/solidus_graphql_api/{factories → testing_support/factories}/store_factory.rb +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e13d165667b997910b872578daab0555697266f687273c44591815ad4e25fb54
4
- data.tar.gz: 83e8894cdd383331705701f8e69aa97aefeded8d42d07c4cc88f29fcd03b0ac1
3
+ metadata.gz: 7246f6167e36e87df43c53b816b7399f5eac626ac0cd875e2ca7094560eef66c
4
+ data.tar.gz: e312344abf61e4adacde583b53e575899fe09bc634fa26d020bfa93bd0a4063f
5
5
  SHA512:
6
- metadata.gz: e83c25b7120e61b3d5c7e20773159c87b66fc01f2439d4d829c6d19b3abf143f21af16581b75fe6e6561540963aca1a00493dcbf598d5145c128e384bae639eb
7
- data.tar.gz: 43e1ce11f2e47eb48d4d9b7157a69f1c15a9a0d67871cde22bfeb93b72f84205ecb721b7484ea27ea85a3f2a02c099f15693f85ac65ba0c5e51afb6d3b5b68dd
6
+ metadata.gz: '082feada4bd548357daa528ef06adf467b9f8b2018ce5ea8b1860cef3a5c686fa02b223323d3985d9cc66576f9504a7952eeb6636364bd25c460e26cb3dd8378'
7
+ data.tar.gz: badb15f3d46c77154c03f5ffca2d7ac563efe0a9c0690edfbf56f7e49688f480f648d638a00cbba3946d9ed8b1a84b2bccda271fb89832a231393550f8fc8e9a
data/.circleci/config.yml CHANGED
@@ -8,86 +8,62 @@ orbs:
8
8
  solidusio_extensions: solidusio/extensions@volatile
9
9
 
10
10
  commands:
11
- bundle:
12
- description: 'Install and cache gems'
11
+ libvips:
13
12
  steps:
14
- - restore_cache:
15
- keys:
16
- - v1-bundle-{{ checksum "solidus_graphql_api.gemspec" }}-{{ checksum "Gemfile" }}
17
- - v1-bundle-{{ checksum "solidus_graphql_api.gemspec" }}
18
- - v1-bundle-
19
- - run: bundle check || bundle install
20
- - save_cache:
21
- key: v1-bundle-{{ checksum "solidus_graphql_api.gemspec" }}-{{ checksum "Gemfile" }}
22
- paths:
23
- - ~/project/vendor/bundle
24
-
25
- jobs:
26
- verify-schema-updated:
27
- docker:
28
- - image: circleci/ruby:2.5.6-node
29
- environment:
30
- BUNDLE_PATH: vendor/bundle
31
- steps:
32
- - checkout
33
- - bundle
34
- - run:
35
- name: Check if Schema is up-to-date
36
- command: |
37
- mv schema.graphql old_schema.graphql
38
- bundle exec rake schema:idl
39
- diff old_schema.graphql schema.graphql
40
-
41
- run-specs-with-postgres:
42
- executor: solidusio_extensions/postgres
43
- steps:
44
- - solidusio_extensions/run-tests
45
13
  - run:
46
- name: Install & Upload test coverage to Code Climate
47
- command: |
48
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
49
- chmod +x ./cc-test-reporter
50
- ./cc-test-reporter format-coverage -t simplecov -o ./coverage/codeclimate.json
51
- ./cc-test-reporter upload-coverage
14
+ name: Install libvips
15
+ command: "sudo apt-get update && sudo apt-get install -y libvips"
52
16
 
53
- run-specs-with-mysql:
54
- executor: solidusio_extensions/mysql
55
- steps:
56
- - solidusio_extensions/run-tests
57
-
58
- schema-breaking-change-detection:
59
- docker:
60
- - image: circleci/ruby:2.5.6-node
17
+ jobs:
18
+ run-specs:
19
+ parameters:
20
+ solidus:
21
+ type: string
22
+ default: main
23
+ db:
24
+ type: string
25
+ default: "postgres"
26
+ ruby:
27
+ type: string
28
+ default: "3.2"
29
+ executor:
30
+ name: solidusio_extensions/<< parameters.db >>
31
+ ruby_version: << parameters.ruby >>
61
32
  steps:
62
33
  - checkout
63
- - run:
64
- name: Install GraphQL::SchemaComparator
65
- command: gem install graphql-schema_comparator
66
- - run:
67
- name: Schema Breaking Change detection
68
- command: rm Gemfile && schema_comparator verify "`git show origin/master:schema.graphql`" schema.graphql
34
+ - libvips
35
+ - solidusio_extensions/run-tests-solidus-<< parameters.solidus >>
69
36
 
70
37
  workflows:
71
38
  "Run specs on supported Solidus versions":
72
39
  jobs:
73
- - verify-schema-updated
74
- - schema-breaking-change-detection:
75
- requires:
76
- - verify-schema-updated
77
- - run-specs-with-postgres:
78
- requires:
79
- - verify-schema-updated
80
- - run-specs-with-mysql:
81
- requires:
82
- - verify-schema-updated
83
- "Weekly run specs against master":
40
+ - run-specs:
41
+ name: &name "run-specs-solidus-<< matrix.solidus >>-ruby-<< matrix.ruby >>-db-<< matrix.db >>"
42
+ matrix:
43
+ parameters: { solidus: ["main"], ruby: ["3.2"], db: ["postgres"] }
44
+ - run-specs:
45
+ name: *name
46
+ matrix:
47
+ parameters: { solidus: ["current"], ruby: ["3.1"], db: ["mysql"] }
48
+ - run-specs:
49
+ name: *name
50
+ matrix:
51
+ parameters: { solidus: ["older"], ruby: ["3.0"], db: ["sqlite"] }
52
+
53
+ "Weekly run specs against main":
84
54
  triggers:
85
55
  - schedule:
86
56
  cron: "0 0 * * 4" # every Thursday
87
57
  filters:
88
58
  branches:
89
59
  only:
90
- - master
60
+ - main
91
61
  jobs:
92
- - run-specs-with-postgres
93
- - run-specs-with-mysql
62
+ - run-specs:
63
+ name: *name
64
+ matrix:
65
+ parameters: { solidus: ["main"], ruby: ["3.2"], db: ["postgres"] }
66
+ - run-specs:
67
+ name: *name
68
+ matrix:
69
+ parameters: { solidus: ["current"], ruby: ["3.1"], db: ["mysql"] }
@@ -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
@@ -1,10 +1,10 @@
1
1
  require:
2
2
  - solidus_dev_support/rubocop
3
3
 
4
- Style/ExpandPathArguments:
5
- Enabled: false
4
+ AllCops:
5
+ TargetRubyVersion: 3.0
6
6
 
7
- Metrics/LineLength:
7
+ Style/ExpandPathArguments:
8
8
  Enabled: false
9
9
 
10
10
  Performance/RegexpMatch:
@@ -52,7 +52,7 @@ RSpec/LetSetup:
52
52
  RSpec/HookArgument:
53
53
  Enabled: false
54
54
 
55
- Layout/AlignArguments:
55
+ Layout/ArgumentAlignment:
56
56
  Enabled: false
57
57
 
58
58
  Rails/RakeEnvironment:
@@ -60,3 +60,9 @@ Rails/RakeEnvironment:
60
60
 
61
61
  Rails/HttpStatus:
62
62
  Enabled: false
63
+
64
+ RSpec/MultipleMemoizedHelpers:
65
+ Enabled: false
66
+
67
+ Lint/ConstantDefinitionInBlock:
68
+ Enabled: false
data/CHANGELOG.md CHANGED
@@ -0,0 +1,4 @@
1
+ # Changelog
2
+
3
+ See https://github.com/solidusio/solidus_graphql_api/releases or [OLD_CHANGELOG.md](OLD_CHANGELOG.md) for older versions.
4
+
data/CONTRIBUTING.md CHANGED
@@ -16,13 +16,13 @@ follow so that we can have a chance of keeping on top of things.
16
16
  ## Making Changes
17
17
 
18
18
  * Create a topic branch from where you want to base your work.
19
- * This is usually the master branch.
19
+ * This is usually the main branch.
20
20
  * Only target release branches if you are certain your fix must be on that
21
21
  branch.
22
- * To quickly create a topic branch based on master; `git branch
23
- fix/master/my_contribution master` then checkout the new branch with `git
24
- checkout fix/master/my_contribution`. Please avoid working directly on the
25
- `master` branch.
22
+ * To quickly create a topic branch based on main; `git branch
23
+ fix/main/my_contribution master` then checkout the new branch with `git
24
+ checkout fix/main/my_contribution`. Please avoid working directly on the
25
+ `main` branch.
26
26
  * Make commits of logical units.
27
27
  * Check for unnecessary whitespace with `git diff --check` before committing.
28
28
  * Make sure your commit messages are in the proper format.
data/Gemfile CHANGED
@@ -3,7 +3,7 @@
3
3
  source 'https://rubygems.org'
4
4
  git_source(:github) { |repo| "https://github.com/#{repo}.git" }
5
5
 
6
- branch = ENV.fetch('SOLIDUS_BRANCH', 'master')
6
+ branch = ENV.fetch('SOLIDUS_BRANCH', 'main')
7
7
  gem 'solidus', github: 'solidusio/solidus', branch: branch
8
8
 
9
9
  # Needed to help Bundler figure out how to resolve dependencies,
data/Gemfile-local ADDED
@@ -0,0 +1 @@
1
+ gem "pry-byebug"
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/OLD_CHANGELOG.md ADDED
@@ -0,0 +1,170 @@
1
+ # Changelog
2
+
3
+ ## [v0.2.0](https://github.com/solidusio/solidus_graphql_api/tree/v0.2.0) (2021-11-29)
4
+
5
+ [Full Changelog](https://github.com/solidusio/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/solidus_graphql_api/issues/181)
10
+ - Add shipping\_method field to ShippingRate [\#179](https://github.com/solidusio/solidus_graphql_api/issues/179)
11
+ - Allow querying a country by id [\#173](https://github.com/solidusio/solidus_graphql_api/issues/173)
12
+ - Variant's option\_values are duplicated [\#172](https://github.com/solidusio/solidus_graphql_api/issues/172)
13
+ - Add option\_type field to OptionValue type [\#171](https://github.com/solidusio/solidus_graphql_api/issues/171)
14
+ - How to add new query [\#168](https://github.com/solidusio/solidus_graphql_api/issues/168)
15
+ - Prepare Solidus Graphql Api for Solidus 3.0 [\#153](https://github.com/solidusio/solidus_graphql_api/issues/153)
16
+ - State of this gem [\#141](https://github.com/solidusio/solidus_graphql_api/issues/141)
17
+ - Dependabot can't resolve your Ruby dependency files [\#139](https://github.com/solidusio/solidus_graphql_api/issues/139)
18
+ - Dependabot can't resolve your Ruby dependency files [\#138](https://github.com/solidusio/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/solidus_graphql_api/pull/192) ([waiting-for-dev](https://github.com/waiting-for-dev))
23
+ - Update development dependencies [\#191](https://github.com/solidusio/solidus_graphql_api/pull/191) ([waiting-for-dev](https://github.com/waiting-for-dev))
24
+ - Support graphql 1.12 [\#190](https://github.com/solidusio/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/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/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/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/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/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/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/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/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/solidus_graphql_api/pull/177) ([waiting-for-dev](https://github.com/waiting-for-dev))
34
+ - Solidus 3 preparation [\#167](https://github.com/solidusio/solidus_graphql_api/pull/167) ([cpfergus1](https://github.com/cpfergus1))
35
+ - Upgrade to GitHub-native Dependabot [\#166](https://github.com/solidusio/solidus_graphql_api/pull/166) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
36
+ - Fix master build [\#147](https://github.com/solidusio/solidus_graphql_api/pull/147) ([Sinetheta](https://github.com/Sinetheta))
37
+ - Add Gem Version badge [\#135](https://github.com/solidusio/solidus_graphql_api/pull/135) ([AlessioRocco](https://github.com/AlessioRocco))
38
+ - Graphql doc [\#122](https://github.com/solidusio/solidus_graphql_api/pull/122) ([SamuelMartini](https://github.com/SamuelMartini))
39
+
40
+ ## [v0.1.0](https://github.com/solidusio/solidus_graphql_api/tree/v0.1.0) (2020-07-03)
41
+
42
+ [Full Changelog](https://github.com/solidusio/solidus_graphql_api/compare/6eedc113d59a6bf008893a3b51fdf3b5aa8fb276...v0.1.0)
43
+
44
+ **Implemented enhancements:**
45
+
46
+ - AddressBook Mutations [\#86](https://github.com/solidusio/solidus_graphql_api/issues/86)
47
+ - Add markDefaultAddress mutation [\#87](https://github.com/solidusio/solidus_graphql_api/pull/87) ([AlessioRocco](https://github.com/AlessioRocco))
48
+ - Add removeFromAddressBook mutation [\#85](https://github.com/solidusio/solidus_graphql_api/pull/85) ([AlessioRocco](https://github.com/AlessioRocco))
49
+ - Add saveInAddressBook mutation [\#83](https://github.com/solidusio/solidus_graphql_api/pull/83) ([AlessioRocco](https://github.com/AlessioRocco))
50
+ - Fix nullable fields in all types [\#82](https://github.com/solidusio/solidus_graphql_api/pull/82) ([rainerdema](https://github.com/rainerdema))
51
+ - Current order [\#79](https://github.com/solidusio/solidus_graphql_api/pull/79) ([mdesantis](https://github.com/mdesantis))
52
+ - Add SignIn Mutation [\#72](https://github.com/solidusio/solidus_graphql_api/pull/72) ([AlessioRocco](https://github.com/AlessioRocco))
53
+ - Add order type and orders connection [\#54](https://github.com/solidusio/solidus_graphql_api/pull/54) ([mdesantis](https://github.com/mdesantis))
54
+ - Update ruby image on CircleCI [\#31](https://github.com/solidusio/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/solidus_graphql_api/pull/90) ([rainerdema](https://github.com/rainerdema))
59
+ - Fix user sign-in bug [\#81](https://github.com/solidusio/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/solidus_graphql_api/issues/61)
64
+ - Currency Type [\#53](https://github.com/solidusio/solidus_graphql_api/issues/53)
65
+ - Current Order field \(Order Type\) [\#46](https://github.com/solidusio/solidus_graphql_api/issues/46)
66
+ - Order Type and related Connections and Types [\#45](https://github.com/solidusio/solidus_graphql_api/issues/45)
67
+ - Search and Filter pattern [\#40](https://github.com/solidusio/solidus_graphql_api/issues/40)
68
+ - Current Store field \(Store Type\) [\#39](https://github.com/solidusio/solidus_graphql_api/issues/39)
69
+ - Navigable E-Commerce [\#38](https://github.com/solidusio/solidus_graphql_api/issues/38)
70
+ - User Profile Management [\#37](https://github.com/solidusio/solidus_graphql_api/issues/37)
71
+
72
+ **Merged pull requests:**
73
+
74
+ - Update gemspec authors and email [\#134](https://github.com/solidusio/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/solidus_graphql_api/pull/133) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
76
+ - Update README [\#132](https://github.com/solidusio/solidus_graphql_api/pull/132) ([SamuelMartini](https://github.com/SamuelMartini))
77
+ - Rename RansackJson to Json and convert nested ids [\#131](https://github.com/solidusio/solidus_graphql_api/pull/131) ([AlessioRocco](https://github.com/AlessioRocco))
78
+ - Add manifest to shipment [\#130](https://github.com/solidusio/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/solidus_graphql_api/pull/129) ([AlessioRocco](https://github.com/AlessioRocco))
80
+ - Add state field to the Payment type [\#128](https://github.com/solidusio/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/solidus_graphql_api/pull/127) ([ChristianRimondi](https://github.com/ChristianRimondi))
82
+ - Change the engine mount path from / to /graphql [\#126](https://github.com/solidusio/solidus_graphql_api/pull/126) ([ChristianRimondi](https://github.com/ChristianRimondi))
83
+ - Set order email mutation [\#125](https://github.com/solidusio/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/solidus_graphql_api/pull/124) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
85
+ - Remove SignIn mutation [\#123](https://github.com/solidusio/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/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/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/solidus_graphql_api/pull/119) ([ChristianRimondi](https://github.com/ChristianRimondi))
89
+ - Add payments to Order type [\#117](https://github.com/solidusio/solidus_graphql_api/pull/117) ([AlessioRocco](https://github.com/AlessioRocco))
90
+ - Add available payment methods to the Order type [\#116](https://github.com/solidusio/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/solidus_graphql_api/pull/115) ([AlessioRocco](https://github.com/AlessioRocco))
92
+ - Create order mutation [\#114](https://github.com/solidusio/solidus_graphql_api/pull/114) ([ChristianRimondi](https://github.com/ChristianRimondi))
93
+ - Add mutation to apply coupon code [\#113](https://github.com/solidusio/solidus_graphql_api/pull/113) ([rainerdema](https://github.com/rainerdema))
94
+ - Empty cart mutation [\#111](https://github.com/solidusio/solidus_graphql_api/pull/111) ([ChristianRimondi](https://github.com/ChristianRimondi))
95
+ - Update cart quantity mutation [\#110](https://github.com/solidusio/solidus_graphql_api/pull/110) ([ChristianRimondi](https://github.com/ChristianRimondi))
96
+ - Remove from cart mutation [\#109](https://github.com/solidusio/solidus_graphql_api/pull/109) ([ChristianRimondi](https://github.com/ChristianRimondi))
97
+ - Add select shipping rate mutation [\#106](https://github.com/solidusio/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/solidus_graphql_api/pull/105) ([AlessioRocco](https://github.com/AlessioRocco))
99
+ - Add advanceCheckout mutation [\#104](https://github.com/solidusio/solidus_graphql_api/pull/104) ([rainerdema](https://github.com/rainerdema))
100
+ - Add completeCheckout mutation [\#103](https://github.com/solidusio/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/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/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/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/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/solidus_graphql_api/pull/96) ([AlessioRocco](https://github.com/AlessioRocco))
106
+ - Add shipments connection to the Order type [\#95](https://github.com/solidusio/solidus_graphql_api/pull/95) ([AlessioRocco](https://github.com/AlessioRocco))
107
+ - Add addAddressesToCheckout mutation [\#94](https://github.com/solidusio/solidus_graphql_api/pull/94) ([AlessioRocco](https://github.com/AlessioRocco))
108
+ - Add to cart mutation [\#93](https://github.com/solidusio/solidus_graphql_api/pull/93) ([ChristianRimondi](https://github.com/ChristianRimondi))
109
+ - Add nextCheckoutState mutation [\#92](https://github.com/solidusio/solidus_graphql_api/pull/92) ([rainerdema](https://github.com/rainerdema))
110
+ - Add the BatchLoader middleware [\#91](https://github.com/solidusio/solidus_graphql_api/pull/91) ([ChristianRimondi](https://github.com/ChristianRimondi))
111
+ - Update badges link paths in README.md [\#89](https://github.com/solidusio/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/solidus_graphql_api/pull/88) ([ChristianRimondi](https://github.com/ChristianRimondi))
113
+ - Add current\_order to SolidusGraphqlApi::Context hash [\#84](https://github.com/solidusio/solidus_graphql_api/pull/84) ([AlessioRocco](https://github.com/AlessioRocco))
114
+ - Align expected schema with actual schema [\#78](https://github.com/solidusio/solidus_graphql_api/pull/78) ([mdesantis](https://github.com/mdesantis))
115
+ - Add LineItem type and order.lineItems field [\#77](https://github.com/solidusio/solidus_graphql_api/pull/77) ([mdesantis](https://github.com/mdesantis))
116
+ - Improve product by slug spec [\#75](https://github.com/solidusio/solidus_graphql_api/pull/75) ([ChristianRimondi](https://github.com/ChristianRimondi))
117
+ - Reorganize specs to support GraphQL mutations [\#73](https://github.com/solidusio/solidus_graphql_api/pull/73) ([AlessioRocco](https://github.com/AlessioRocco))
118
+ - Remove duplicated declaration in expected schema [\#70](https://github.com/solidusio/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/solidus_graphql_api/pull/69) ([rainerdema](https://github.com/rainerdema))
120
+ - Improve current user specs [\#68](https://github.com/solidusio/solidus_graphql_api/pull/68) ([AlessioRocco](https://github.com/AlessioRocco))
121
+ - Simplify countries query specs [\#67](https://github.com/solidusio/solidus_graphql_api/pull/67) ([AlessioRocco](https://github.com/AlessioRocco))
122
+ - Use factory for current store spec [\#66](https://github.com/solidusio/solidus_graphql_api/pull/66) ([AlessioRocco](https://github.com/AlessioRocco))
123
+ - Improve taxonomy specs [\#65](https://github.com/solidusio/solidus_graphql_api/pull/65) ([AlessioRocco](https://github.com/AlessioRocco))
124
+ - Improve snapshot specs error messages [\#64](https://github.com/solidusio/solidus_graphql_api/pull/64) ([mdesantis](https://github.com/mdesantis))
125
+ - Migrate to solidus\_dev\_support [\#63](https://github.com/solidusio/solidus_graphql_api/pull/63) ([ChristianRimondi](https://github.com/ChristianRimondi))
126
+ - Add Currency Type [\#62](https://github.com/solidusio/solidus_graphql_api/pull/62) ([rainerdema](https://github.com/rainerdema))
127
+ - Use SimpleCov built-in Rails configurations [\#60](https://github.com/solidusio/solidus_graphql_api/pull/60) ([AlessioRocco](https://github.com/AlessioRocco))
128
+ - Implement products search [\#59](https://github.com/solidusio/solidus_graphql_api/pull/59) ([ChristianRimondi](https://github.com/ChristianRimondi))
129
+ - Allow developers to set a local .Gemfile [\#58](https://github.com/solidusio/solidus_graphql_api/pull/58) ([mdesantis](https://github.com/mdesantis))
130
+ - Improve current store query specs [\#56](https://github.com/solidusio/solidus_graphql_api/pull/56) ([AlessioRocco](https://github.com/AlessioRocco))
131
+ - Add snapshot specs for countries query [\#55](https://github.com/solidusio/solidus_graphql_api/pull/55) ([AlessioRocco](https://github.com/AlessioRocco))
132
+ - Move expected schema into spec/support [\#52](https://github.com/solidusio/solidus_graphql_api/pull/52) ([AlessioRocco](https://github.com/AlessioRocco))
133
+ - Improve Helpers::Graphql.execute\_query spec helper [\#51](https://github.com/solidusio/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/solidus_graphql_api/pull/50) ([ChristianRimondi](https://github.com/ChristianRimondi))
135
+ - Remove graphiql-rails gem [\#49](https://github.com/solidusio/solidus_graphql_api/pull/49) ([AlessioRocco](https://github.com/AlessioRocco))
136
+ - Add Store Type [\#47](https://github.com/solidusio/solidus_graphql_api/pull/47) ([rainerdema](https://github.com/rainerdema))
137
+ - Add an Object to manage the schema context [\#36](https://github.com/solidusio/solidus_graphql_api/pull/36) ([AlessioRocco](https://github.com/AlessioRocco))
138
+ - Remove object id from the batch loader key [\#35](https://github.com/solidusio/solidus_graphql_api/pull/35) ([ChristianRimondi](https://github.com/ChristianRimondi))
139
+ - Add addresses field to user type [\#34](https://github.com/solidusio/solidus_graphql_api/pull/34) ([rainerdema](https://github.com/rainerdema))
140
+ - Fix CircleCI specs errors [\#32](https://github.com/solidusio/solidus_graphql_api/pull/32) ([ChristianRimondi](https://github.com/ChristianRimondi))
141
+ - Fix namespace errors [\#30](https://github.com/solidusio/solidus_graphql_api/pull/30) ([ChristianRimondi](https://github.com/ChristianRimondi))
142
+ - Add images connection field to Variant Type [\#29](https://github.com/solidusio/solidus_graphql_api/pull/29) ([AlessioRocco](https://github.com/AlessioRocco))
143
+ - Add product\_by\_slug field to root query [\#28](https://github.com/solidusio/solidus_graphql_api/pull/28) ([ChristianRimondi](https://github.com/ChristianRimondi))
144
+ - Add properties to product type [\#27](https://github.com/solidusio/solidus_graphql_api/pull/27) ([AlessioRocco](https://github.com/AlessioRocco))
145
+ - Add ProductProperty Type [\#26](https://github.com/solidusio/solidus_graphql_api/pull/26) ([AlessioRocco](https://github.com/AlessioRocco))
146
+ - Add Property Type [\#25](https://github.com/solidusio/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/solidus_graphql_api/pull/24) ([ChristianRimondi](https://github.com/ChristianRimondi))
148
+ - Add products field to the root query [\#23](https://github.com/solidusio/solidus_graphql_api/pull/23) ([AlessioRocco](https://github.com/AlessioRocco))
149
+ - Align StatesQuery with other queries object [\#22](https://github.com/solidusio/solidus_graphql_api/pull/22) ([AlessioRocco](https://github.com/AlessioRocco))
150
+ - Fix spec file name typo [\#21](https://github.com/solidusio/solidus_graphql_api/pull/21) ([AlessioRocco](https://github.com/AlessioRocco))
151
+ - Type Customization API [\#20](https://github.com/solidusio/solidus_graphql_api/pull/20) ([aldesantis](https://github.com/aldesantis))
152
+ - Batch loading framework [\#19](https://github.com/solidusio/solidus_graphql_api/pull/19) ([aldesantis](https://github.com/aldesantis))
153
+ - Add Variant Type [\#18](https://github.com/solidusio/solidus_graphql_api/pull/18) ([AlessioRocco](https://github.com/AlessioRocco))
154
+ - Add Option Type type [\#17](https://github.com/solidusio/solidus_graphql_api/pull/17) ([AlessioRocco](https://github.com/AlessioRocco))
155
+ - Add OptionValue Type [\#16](https://github.com/solidusio/solidus_graphql_api/pull/16) ([AlessioRocco](https://github.com/AlessioRocco))
156
+ - Add Price Type [\#15](https://github.com/solidusio/solidus_graphql_api/pull/15) ([AlessioRocco](https://github.com/AlessioRocco))
157
+ - Check if the Schema is up-to-date [\#14](https://github.com/solidusio/solidus_graphql_api/pull/14) ([ChristianRimondi](https://github.com/ChristianRimondi))
158
+ - Add Address type [\#13](https://github.com/solidusio/solidus_graphql_api/pull/13) ([rainerdema](https://github.com/rainerdema))
159
+ - Add User type [\#12](https://github.com/solidusio/solidus_graphql_api/pull/12) ([rainerdema](https://github.com/rainerdema))
160
+ - Add authentication [\#10](https://github.com/solidusio/solidus_graphql_api/pull/10) ([ChristianRimondi](https://github.com/ChristianRimondi))
161
+ - Add Taxon type [\#9](https://github.com/solidusio/solidus_graphql_api/pull/9) ([rainerdema](https://github.com/rainerdema))
162
+ - Add Taxonomy type [\#8](https://github.com/solidusio/solidus_graphql_api/pull/8) ([AlessioRocco](https://github.com/AlessioRocco))
163
+ - Add State Type [\#7](https://github.com/solidusio/solidus_graphql_api/pull/7) ([AlessioRocco](https://github.com/AlessioRocco))
164
+ - Add batch-loader gem [\#6](https://github.com/solidusio/solidus_graphql_api/pull/6) ([AlessioRocco](https://github.com/AlessioRocco))
165
+ - Add Country type [\#5](https://github.com/solidusio/solidus_graphql_api/pull/5) ([ChristianRimondi](https://github.com/ChristianRimondi))
166
+ - Add Circle CI and Code Climate configurations [\#4](https://github.com/solidusio/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/README.md CHANGED
@@ -1,11 +1,16 @@
1
- [![Maintainability](https://api.codeclimate.com/v1/badges/8ea7739ad6726ad8cfa7/maintainability)](https://codeclimate.com/github/solidusio-contrib/solidus_graphql_api/maintainability)
2
- [![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
1
  # SolidusGraphqlApi
6
2
 
3
+ [![Maintainability](https://api.codeclimate.com/v1/badges/8ea7739ad6726ad8cfa7/maintainability)](https://codeclimate.com/github/solidusio/solidus_graphql_api/maintainability)
4
+ [![Test Coverage](https://api.codeclimate.com/v1/badges/8ea7739ad6726ad8cfa7/test_coverage)](https://codeclimate.com/github/solidusio/solidus_graphql_api/test_coverage)
5
+ [![CircleCI](https://circleci.com/gh/solidusio/solidus_graphql_api.svg?style=shield)](https://circleci.com/gh/solidusio/solidus_graphql_api)
6
+ [![Gem Version](https://badge.fury.io/rb/solidus_graphql_api.svg)](https://badge.fury.io/rb/solidus_graphql_api)
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.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,48 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'bundler/gem_tasks'
3
4
  require 'solidus_dev_support/rake_tasks'
4
- SolidusDevSupport::RakeTasks.install
5
+ require 'graphql-docs'
5
6
 
6
- require 'rubocop/rake_task'
7
- RuboCop::RakeTask.new
7
+ SolidusDevSupport::RakeTasks.install
8
8
 
9
- task default: %w[rubocop extension:specs]
9
+ task default: 'extension:specs'
10
10
 
11
11
  namespace :schema do
12
- desc 'Dump the schema to JSON and IDL'
12
+ desc 'Generates documentation from schema.graphql'
13
+ task :generate_docs do
14
+ doc_dir = "./lib/graphql_docs"
15
+ GraphQLDocs.build(
16
+ filename: "#{__dir__}/schema.graphql",
17
+ output_dir: 'docs',
18
+ base_url: '/solidus_graphql_api/docs',
19
+ landing_pages: { index: "#{doc_dir}/landing_pages/index.md" },
20
+ delete_output: true
21
+ )
22
+ end
23
+
24
+ desc 'Dump the schema to JSON and IDL and generate docs'
13
25
  task :dump do
14
26
  setup_graphql_rake_tasks
15
27
 
16
28
  Rake::Task['graphql:schema:dump'].invoke
29
+ Rake::Task['schema:generate_docs'].invoke
17
30
  end
18
31
 
19
- desc 'Dump the schema to IDL in schema.graphql'
32
+ desc 'Dump the schema to IDL in schema.graphql and generate docs'
20
33
  task :idl do
21
34
  setup_graphql_rake_tasks
22
35
 
23
36
  Rake::Task['graphql:schema:idl'].invoke
37
+ Rake::Task['schema:generate_docs'].invoke
24
38
  end
25
39
 
26
- desc 'Dump the schema to JSON in schema.json'
40
+ desc 'Dump the schema to JSON in schema.json and generate docs'
27
41
  task :json do
28
42
  setup_graphql_rake_tasks
29
43
 
30
44
  Rake::Task['graphql:schema:json'].invoke
45
+ Rake::Task['schema:generate_docs'].invoke
31
46
  end
32
47
  end
33
48
 
@@ -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__)