graphql-rails-api 0.3 → 0.4.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: 618f2df1f876d4b8e616119eb7a9c9ff3261a13db2d8d24e0a3fc47f643d00cd
4
- data.tar.gz: 007c15f9602973f64414b05b239f45bb81a3a507edfd5219064197b41885d81d
3
+ metadata.gz: 481bdbd77a99147d9ca18b4d019ba21a1c364f6a8506a27f4b966b9396b262c2
4
+ data.tar.gz: e9ef1795f16042ef84010d7624bd2773d99b4a3a6f66ea5abe6c0378055efb7b
5
5
  SHA512:
6
- metadata.gz: a20508bd20eaf271f02e27434771d986ee8306f56a2d023e250476c17a6989f7626429dcbc5a877154c54411cbce9b4a0a231a71db519b2655feb9ed93ce5cc0
7
- data.tar.gz: 327af9b95d0398084c8d85f863ed29714f4c8b8b8b01e4bfc64c8627b6d0740479a2f29ca96d6643d6746e2db4701c7b99c2e7b1fdf4c7ac228640cdea2b6d0a
6
+ metadata.gz: c3f416adfeb436ed9777dafca8880c72014217994ec17e2cf2061e72c454d20b08fe61fbd80f62c536753c13a92b5f9f53e742ec8b94679abdcaf4c59b281ef7
7
+ data.tar.gz: c08cd31130934277d362ec035dc1e451b9ab304e2f0bf90e43e682f35413473938b67fc9b693d06dba515838c1d7046e9909e9114cf821b87cae02b6fd95d0b4
data/README.md CHANGED
@@ -2,6 +2,9 @@
2
2
 
3
3
  `graphql-rails-api` is a gem that provides generators to describe easily your graphql API in a domain driven design way.
4
4
 
5
+ Need any help or wanna talk with me about it on slack ? Don't hesitate,
6
+ https://bit.ly/2KvV8Pk
7
+
5
8
  ## Installation
6
9
  Add these lines to your application's Gemfile:
7
10
 
@@ -33,8 +33,10 @@ module Graphql
33
33
  end
34
34
 
35
35
  def visibility_hash
36
- @visibility_hash ||= @models.each_with_object({}) do |model, hash|
37
- hash[model.constantize] = model.constantize.visible_for(user: @user).pluck(:id)
36
+ @visibility_hash ||= @models.reject(&:blank?).each_with_object({}) do |model, hash|
37
+ visible = model.constantize.visible_for(user: @user)
38
+ next if visible.blank?
39
+ hash[model.constantize] = visible.pluck(:id)
38
40
  end
39
41
  end
40
42
 
@@ -1,7 +1,7 @@
1
1
  module Graphql
2
2
  module Rails
3
3
  module Api
4
- VERSION = '0.3'.freeze
4
+ VERSION = '0.4.1'.freeze
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: graphql-rails-api
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.3'
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - poilon
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-06-22 00:00:00.000000000 Z
11
+ date: 2018-08-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: graphql