simple_graphql_client 0.3.0 → 0.3.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: 773807324a20dfec2c2ce74fa29afa75e522ea6415ea7130418224605657e31e
4
- data.tar.gz: dfe5829570cbdfebaea360833d416d811d920519e13d5448db689fd046698e91
3
+ metadata.gz: 7ed8067b4019cd32cefc33b4b49517d9bc0d614e3d629f6477ceeafa75df2f1b
4
+ data.tar.gz: 4eb81ee42cadb0ab19a1ecf88c4312098e97fc07268382cf591fde20826d37eb
5
5
  SHA512:
6
- metadata.gz: 3e4337daeda20eb84a9de29d09f941bb9a865e1af83d895999313d5374f4befa71d57dda9a4704c0d6c8aef44701f927b771eaa4eba48c13676b89d1ecd33cd2
7
- data.tar.gz: 0c60f572296a6efabf85bab88dc1f0bee61916626d23ce604bb54d9562fa980f8722ab6187f8e6493967ac9443d5c6cba4c3fde1744a90ea961ad6744ee5de9d
6
+ metadata.gz: f934090545eff7c223b0ea9280fdbf77647b2eae72d061f0ad42761e1508c78ac4f73f04ba86d34bfdc23e613342d4e2a224aa6f86807f393313745030f47932
7
+ data.tar.gz: 9ff08d5fd01911f8c6d879c33a5944cf1d71b02f3b1a891d82718dc9f2b78725eee34057f4c14f6c5728cb4b95294276f611397f9f5cc1b827486aef3b169cac
data/Changelog.md CHANGED
@@ -1,3 +1,6 @@
1
+ 0.3.1 - 09/06/2022
2
+ fix handling
3
+
1
4
  0.3.0 - 09/06/2022
2
5
  Allow specifying the parsing class
3
6
 
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- simple_graphql_client (0.3.0)
4
+ simple_graphql_client (0.3.1)
5
5
  rest-client (~> 2.1)
6
6
 
7
7
  GEM
@@ -30,9 +30,10 @@ module SimpleGraphqlClient
30
30
  end
31
31
 
32
32
  def handle_response(body)
33
- raise SimpleGraphqlClient::Errors::QueryError, body.errors if body.errors
33
+ errors = body.is_a?(Hash) ? body["errors"] : body.errors
34
+ raise SimpleGraphqlClient::Errors::QueryError, errors if errors
34
35
 
35
- body.data
36
+ body.is_a?(Hash) ? body["data"] : body.data
36
37
  end
37
38
  end
38
39
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SimpleGraphqlClient
4
- VERSION = "0.3.0"
4
+ VERSION = "0.3.1"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple_graphql_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christophe Verbinnen