graphlient 0.3.5 → 0.3.6

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
- SHA1:
3
- metadata.gz: a6d0e92ac6d77cf9f1e57056c517074fb3ddf053
4
- data.tar.gz: b9ecc89c535d2ef16ca945df3836a499038279ac
2
+ SHA256:
3
+ metadata.gz: 360f0f96c897fae58c76624fa317385c14270444a827aa802efd95f71e46ac19
4
+ data.tar.gz: fd335527ff368f734cdd906ec31a7f985fffd19b51709bdfb04c33c31e75e457
5
5
  SHA512:
6
- metadata.gz: 4295209e08e772f6d3e419d38df7f6eda09d02c47f84f97ec4b2f1ae13b7c716013a43715d336830f80bf7309d0d0a8eb67151d3162118c5a716dbef948abd49
7
- data.tar.gz: 5cbb4cc4fae863e5bb91257d8299249709e06b3b6a0c8fcb9d29aa7f5db90219df977c11417338ac7af9778fbcb66dbaa673c1af438b62daf51f77744dd138d2
6
+ metadata.gz: 77896f951d3bfad43bf77f9ce54885070ac69a6418d6d64617a7034e45d89b0e1e1399b0b4dec7f1abec43e0ee044a271e6cf68c48b0c7e8047c974ee0e3298d
7
+ data.tar.gz: a4755beb10938c1e779bade046eea42ecd4035c032376dc7c0d492d8a7a35919b4fef018a0250df7f3793be4a343d20038ddf3aeca91a8e273a78c985811a726
@@ -1,7 +1,11 @@
1
- ### 0.3.5 (Next)
2
-
1
+ ### 0.3.7 (Next)
3
2
  * Your contribution here.
4
3
 
4
+ ### 0.3.6 (07/23/2019)
5
+
6
+ * [#63](https://github.com/ashkan18/graphlient/pull/63): Remove unused method for attribute with typo - [@ashkan18](https://github.com/ashkan18).
7
+ * [#62](https://github.com/ashkan18/graphlient/pull/62): Fix typo preventing access to response object on error - [@jmondo](https://github.com/jmondo).
8
+
5
9
  ### 0.3.4 (01/31/2019)
6
10
 
7
11
  * [#56](https://github.com/ashkan18/graphlient/pull/56): Remove safe navigation usage to retain support for Ruby 2.2 - [@avinoth](https://github.com/avinoth).
data/Gemfile CHANGED
@@ -11,7 +11,7 @@ group :development do
11
11
  end
12
12
 
13
13
  group :test do
14
- gem 'graphql'
14
+ gem 'graphql', '~> 1.9.7'
15
15
  gem 'graphql-errors'
16
16
  gem 'rack-parser'
17
17
  gem 'rack-test'
@@ -1,7 +1,7 @@
1
1
  module Graphlient
2
2
  module Errors
3
3
  class GraphQLError < Error
4
- attr_reader :responsee
4
+ attr_reader :response
5
5
  def initialize(response)
6
6
  super('the server responded with a GraphQL error')
7
7
  @response = response
@@ -1,3 +1,3 @@
1
1
  module Graphlient
2
- VERSION = '0.3.5'.freeze
2
+ VERSION = '0.3.6'.freeze
3
3
  end
@@ -91,7 +91,7 @@ describe Graphlient::Client do
91
91
  expect do
92
92
  client.execute(query, id: '42')
93
93
  end.to raise_error Graphlient::Errors::GraphQLError do |e|
94
- expect(e.to_s).to eq "Variable id of type Int was provided invalid value\n Could not coerce value \"42\" to Int"
94
+ expect(e.to_s).to eq 'Variable id of type Int was provided invalid value'
95
95
  end
96
96
  end
97
97
 
@@ -111,6 +111,14 @@ describe Graphlient::Client do
111
111
  expect(e.to_s).to eq 'Cannot return null for non-nullable field Query.notNullInvoice'
112
112
  end
113
113
  end
114
+
115
+ it 'fails with access to the response' do
116
+ expect do
117
+ client.execute(not_null_query, id: 42)
118
+ end.to raise_error Graphlient::Errors::GraphQLError do |e|
119
+ expect(e.response).to be_a GraphQL::Client::Response
120
+ end
121
+ end
114
122
  end
115
123
 
116
124
  context 'non-parameterized query' do
@@ -215,7 +223,7 @@ describe Graphlient::Client do
215
223
  end
216
224
  end
217
225
  end.to raise_error Graphlient::Errors::GraphQLError,
218
- "Variable input of type CreateInvoiceInput! was provided invalid value\n Expected value to not be null"
226
+ 'Variable input of type CreateInvoiceInput! was provided invalid value'
219
227
  end
220
228
 
221
229
  it 'returns a response from a query' do
@@ -264,7 +272,7 @@ describe Graphlient::Client do
264
272
  end
265
273
  end
266
274
  end.to raise_error Graphlient::Errors::GraphQLError,
267
- "Variable input of type CreateInvoiceInput! was provided invalid value\n feeInCents: Expected value to not be null"
275
+ 'Variable input of type CreateInvoiceInput! was provided invalid value for feeInCents (Expected value to not be null)'
268
276
  end
269
277
  end
270
278
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: graphlient
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.5
4
+ version: 0.3.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ashkan Nasseri
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-01-31 00:00:00.000000000 Z
11
+ date: 2019-07-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -136,7 +136,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
136
136
  version: 1.3.6
137
137
  requirements: []
138
138
  rubyforge_project:
139
- rubygems_version: 2.4.8
139
+ rubygems_version: 2.7.8
140
140
  signing_key:
141
141
  specification_version: 4
142
142
  summary: A friendlier Ruby client for consuming GraphQL-based APIs.