graphiti_gql 0.2.28 → 0.2.29

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ffc7f76831ea15375482b1ec32d6fe090b19c9ebdac1ea081805dfcf32497072
4
- data.tar.gz: 3ac75bdef55c8cf63de7e2f9554dbc0e58f1f5a7a23ba591cbfac9891a9b8118
3
+ metadata.gz: ade099acc586ef5902b1b30659ca47efed5cfb3e05e3fe1a778fa81b31b27528
4
+ data.tar.gz: 3a2226feab0dd284c3aeb832b30d90dc8165a9abc03fc40921aab47eece3d315
5
5
  SHA512:
6
- metadata.gz: e51aca16a756ed7f0e053fda559e07831433ae0e37a6ab40908468a07bfa93eb48c12abd045ea93dbdc8dc8b716ff5abb190347b88d089b13305d2fd7a6ac818
7
- data.tar.gz: 53e611a009a2277cfc0bc7318710a537fd02c06760921716e149bfa8cebbbeb3607c3b409e8830460be1e80ba41b66c366507f1057c2215ee7fb7ffc79b77653
6
+ metadata.gz: 318d2eb2831f5d19bdcbdd9fbe6dd0a21fed8435875d9d4de0ca45b65b97515b5ca4f80afca282a5c1e11b85986133f5942ef4e96b21b4cb31ce492d35a07728
7
+ data.tar.gz: bc7b778005b056904a8fc4d3be767ee62a711f07fff533ddac833b96723abc5fc8368e9f63ecf2ddc40aee59544990939ff7d26a570a95ccc15ce2d8d5e93542
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- graphiti_gql (0.2.27)
4
+ graphiti_gql (0.2.29)
5
5
  activemodel (> 6.0, < 8.0)
6
6
  graphiti (~> 1.3.9)
7
7
  graphql (~> 2.0)
@@ -35,7 +35,9 @@ module GraphitiGql
35
35
  num_results = payload[:results].length
36
36
  klasses = payload[:results].map(&:class).map(&:name).uniq
37
37
  color = num_results == 0 ? :yellow : :green
38
- add_chunk("#{indent} #{num_results} #{"result".pluralize(num_results)} of #{"type".pluralize(klasses.length)} #{klasses.to_sentence}", color, true)
38
+ stmt = "#{indent} #{num_results} #{"result".pluralize(num_results)}"
39
+ stmt << " of #{"type".pluralize(klasses.length)} #{klasses.to_sentence}" if num_results > 0
40
+ add_chunk(stmt, color, true)
39
41
 
40
42
  took = ((stop - start) * 1000.0).round(2)
41
43
  add_chunk("#{indent} Took: #{took}ms", :magenta, true)
@@ -75,7 +77,7 @@ end|, :white, true)
75
77
  Graphiti.info("❌🚨 Response contained errors!", :red, true)
76
78
  response_errors.each do |err|
77
79
  Graphiti.info("#{err['extensions']['code']} - #{err['message']}", :red, true)
78
- Graphiti.info("#{err['path'].join(".")}", :red, false)
80
+ Graphiti.info("#{err['path'].join(".")}", :red, false) if err['path']
79
81
  end
80
82
  end
81
83
  else
@@ -153,6 +155,7 @@ end|, :white, true)
153
155
 
154
156
  def thin_path
155
157
  path = Graphiti.context[:object][:current_path]
158
+ return [] unless path
156
159
  path.reject do |p|
157
160
  p.is_a?(Integer) ||
158
161
  p == "nodes" ||
@@ -1,3 +1,3 @@
1
1
  module GraphitiGql
2
- VERSION = "0.2.28"
2
+ VERSION = "0.2.29"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: graphiti_gql
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.28
4
+ version: 0.2.29
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lee Richmond