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 +4 -4
- data/README.md +3 -0
- data/lib/graphql/hydrate_query.rb +4 -2
- data/lib/graphql/rails/api/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 481bdbd77a99147d9ca18b4d019ba21a1c364f6a8506a27f4b966b9396b262c2
|
|
4
|
+
data.tar.gz: e9ef1795f16042ef84010d7624bd2773d99b4a3a6f66ea5abe6c0378055efb7b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
-
|
|
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
|
|
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:
|
|
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-
|
|
11
|
+
date: 2018-08-20 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: graphql
|