graphql-client 0.2.5 → 0.2.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/graphql/client.rb +3 -7
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6e4479e6ded8ce37427e5860e1933f5a300c1b50
4
- data.tar.gz: 003125bef74a999629acb8ed10311cb209b2836a
3
+ metadata.gz: 6fb2c7543a34c26a3ffa6718ddb35a4e4ae9972c
4
+ data.tar.gz: f879a3fff89104e8c5eff98ba15c62ec2694de17
5
5
  SHA512:
6
- metadata.gz: 4eba62b6ade25e1767138e410be130a7caf818464507aecec649903f0a896e69f7442a0f908fbc09382743a4292342abefa5562b58b4973924e85429e46db696
7
- data.tar.gz: 376afde0857506206c374cc9980d4577d99d83be32366939135da786c8152e4177dc75414727f77ab2ddc10300281316fa7f4522180681b9d91b681e22259646
6
+ metadata.gz: d0b95e7dd51deebc8edd667ac3b824f270173992f5b8d7017eb96490c0a9eab6e4fdee58a989209640062e3f70a74f52e607a056b730ca34eeb6bc6599ef6d99
7
+ data.tar.gz: 2c21b4f7ec54721953afaeb88f41f10af9b13006cfbaca45e6573649df23b464afa39d6208d4dacc29ce0bfdc558a67290e3915afd6d094ea7aa7a50000137a0
@@ -202,13 +202,9 @@ module GraphQL
202
202
 
203
203
  errors = validator.validate(query)
204
204
  errors.fetch(:errors).each do |error|
205
- if error.respond_to?(:message)
206
- validation_line = error.line
207
- error = ValidationError.new(error.message)
208
- else # TODO: Remove when only supporting graphql-ruby 1.x
209
- validation_line = error["locations"][0]["line"]
210
- error = ValidationError.new(error["message"])
211
- end
205
+ error_hash = error.to_h
206
+ validation_line = error_hash["locations"][0]["line"]
207
+ error = ValidationError.new(error_hash["message"])
212
208
  error.set_backtrace(["#{filename}:#{lineno + validation_line}"] + caller) if filename && lineno
213
209
  raise error
214
210
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: graphql-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.5
4
+ version: 0.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - GitHub
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-11-16 00:00:00.000000000 Z
11
+ date: 2016-11-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport