shopify_graphql 2.4.0 → 2.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5038269045bca2f01a4e7d1861ce592c3a862a58d3369a2ca69e8dc5b7beb0d8
4
- data.tar.gz: 477823c3f50646817ac472f5ff4fe71bfb287078b75101fd6c8d6a669e6bb0b0
3
+ metadata.gz: 827b03ca608d7ae514f1758fb96ebc253783b778cbe376d8e2a5d3ab772b42da
4
+ data.tar.gz: b473cac1e4ac0dcf34ea3895dcaa6cadf0bb5dd4d2ea434b1ed4350dcd137839
5
5
  SHA512:
6
- metadata.gz: cff7fe23d0a706dc8bf49ccba92e8ee2b75caa6eaff3f69ede31a6bf95b37e96e8d60aa43f5c69867810019bf88671c8cf36c795f03254dc450a04faf783e023
7
- data.tar.gz: 56bdd0133ec23c3b447d76375e6bcc9628f5db8b0217da885cf719047f521a0d456015bac41e9406de7115f2d6e33fd954bae89d807110445334a0f31ca36194
6
+ metadata.gz: 169c9249f8ac75c8f7c07d087b91cc6ff7a09ea9b8d361e4a2e746106f71fb6dca3f81dce546b6e3dfd0df1fe73bd8657d7adf515656232e38ec6053621fb9fd
7
+ data.tar.gz: b4633cdc0d303d4e9f4f7fee089c5ff7e67793a4c28ae3779a7f093cfed030405f3a77fd1760490ce6b022a2e179ad689fa7400db1294bf2c291f40999242dd4
@@ -26,7 +26,13 @@ module ShopifyGraphql
26
26
 
27
27
  class Client
28
28
  def client
29
- @client ||= ShopifyAPI::Clients::Graphql::Admin.new(session: ShopifyAPI::Context.active_session)
29
+ session = ShopifyAPI::Context.active_session
30
+ if @client.nil? || @access_token != session&.access_token || @shop != session&.shop
31
+ @client = ShopifyAPI::Clients::Graphql::Admin.new(session: session)
32
+ @access_token = session.access_token&.dup
33
+ @shop = session.shop.dup
34
+ end
35
+ @client
30
36
  end
31
37
 
32
38
  def execute(query, headers: nil, **variables)
@@ -110,6 +116,8 @@ module ShopifyGraphql
110
116
  TooManyRequests.new(response: response)
111
117
  when "INTERNAL_SERVER_ERROR"
112
118
  ServerError.new(response: response)
119
+ when "SHOP_PENDING_TERMINATION"
120
+ ShopPendingTermination.new(response: response)
113
121
  else
114
122
  ConnectionError.new(response: response)
115
123
  end
@@ -65,6 +65,10 @@ module ShopifyGraphql
65
65
  class ShopLocked < ClientError # :nodoc:
66
66
  end
67
67
 
68
+ # GraphQL SHOP_PENDING_TERMINATION error code (shop is under review)
69
+ class ShopPendingTermination < ClientError # :nodoc:
70
+ end
71
+
68
72
  # 429 Too Many Requests
69
73
  class TooManyRequests < ClientError # :nodoc:
70
74
  end
@@ -1,3 +1,3 @@
1
1
  module ShopifyGraphql
2
- VERSION = "2.4.0"
2
+ VERSION = "2.5.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shopify_graphql
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.0
4
+ version: 2.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kirill Platonov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-07-22 00:00:00.000000000 Z
11
+ date: 2026-09-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails