active_decorator-graphql 0.2.0 → 0.3.0
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 +5 -5
- data/.travis.yml +16 -4
- data/CHANGELOG.md +7 -0
- data/README.md +1 -0
- data/gemfiles/rails_5_2.gemfile +7 -0
- data/gemfiles/rails_6_0.gemfile +7 -0
- data/lib/active_decorator/graphql.rb +7 -1
- data/lib/active_decorator/graphql/version.rb +1 -1
- metadata +6 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: e08195250d871bcd9d61e13cfa581311bb9c725fcb3c691a3821b045cb1ab893
|
|
4
|
+
data.tar.gz: 7e7444f8943d340df28d0ac6ff4dafaf98329f1db7a8ff066c2f8add3f1f365b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 327e28f4c2987fcdc2b124c7877e8795f4344f865e9ccf55e5cb9b461699472cc6e3972bab1a08edef9c6e27b3de219c0b5bdce9dd2d9766e406363a814cdb24
|
|
7
|
+
data.tar.gz: 93310af2264328f537d1a2bb2f7cc3336ceac49769d8b774411c1c2d374ef3a2bb1935fd95a5f18d4df7debf4c5cbacb556fe43fddaea6a496ed563da4eb588f
|
data/.travis.yml
CHANGED
|
@@ -1,13 +1,25 @@
|
|
|
1
1
|
sudo: false
|
|
2
2
|
language: ruby
|
|
3
3
|
rvm:
|
|
4
|
-
- 2.2.
|
|
5
|
-
- 2.3.
|
|
6
|
-
- 2.4.
|
|
4
|
+
- 2.2.10
|
|
5
|
+
- 2.3.8
|
|
6
|
+
- 2.4.9
|
|
7
|
+
- 2.5.7
|
|
8
|
+
- 2.6.5
|
|
7
9
|
gemfile:
|
|
8
10
|
- gemfiles/rails_4_2.gemfile
|
|
9
11
|
- gemfiles/rails_5_0.gemfile
|
|
10
12
|
- gemfiles/rails_5_1.gemfile
|
|
13
|
+
- gemfiles/rails_5_2.gemfile
|
|
14
|
+
- gemfiles/rails_6_0.gemfile
|
|
15
|
+
jobs:
|
|
16
|
+
exclude:
|
|
17
|
+
- rvm: 2.2.10
|
|
18
|
+
gemfile: gemfiles/rails_6_0.gemfile
|
|
19
|
+
- rvm: 2.3.8
|
|
20
|
+
gemfile: gemfiles/rails_6_0.gemfile
|
|
21
|
+
- rvm: 2.4.9
|
|
22
|
+
gemfile: gemfiles/rails_6_0.gemfile
|
|
11
23
|
notifications:
|
|
12
24
|
email: false
|
|
13
|
-
before_install: gem install bundler
|
|
25
|
+
before_install: gem install bundler -v 1.17.3
|
data/CHANGELOG.md
ADDED
data/README.md
CHANGED
|
@@ -56,6 +56,7 @@ then GraphQL::Field resolves `full_name` by decorated Author objects.
|
|
|
56
56
|
### Decorate only specific fields
|
|
57
57
|
|
|
58
58
|
If you want to decorate only specific fields ActiveDecorater::GraphQL provides options to control decoration default and field decoration.
|
|
59
|
+
Class-based API does not support decorate option.
|
|
59
60
|
|
|
60
61
|
- Control decoration defaults (config/initializers/active_decorator-graphql.rb)
|
|
61
62
|
|
|
@@ -13,7 +13,13 @@ module GraphQL
|
|
|
13
13
|
|
|
14
14
|
alias resolve_org resolve
|
|
15
15
|
def resolve(object, arguments, context)
|
|
16
|
-
|
|
16
|
+
if need_decorate?
|
|
17
|
+
if object.respond_to?(:object)
|
|
18
|
+
::ActiveDecorator::Decorator.instance.decorate(object.object)
|
|
19
|
+
else
|
|
20
|
+
::ActiveDecorator::Decorator.instance.decorate(object)
|
|
21
|
+
end
|
|
22
|
+
end
|
|
17
23
|
resolve_org(object, arguments, context)
|
|
18
24
|
end
|
|
19
25
|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: active_decorator-graphql
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.3.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Shimoyama, Hiroyasu
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2019-11-15 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -118,6 +118,7 @@ files:
|
|
|
118
118
|
- ".gitignore"
|
|
119
119
|
- ".rspec"
|
|
120
120
|
- ".travis.yml"
|
|
121
|
+
- CHANGELOG.md
|
|
121
122
|
- Gemfile
|
|
122
123
|
- LICENSE
|
|
123
124
|
- LICENSE.txt
|
|
@@ -129,6 +130,8 @@ files:
|
|
|
129
130
|
- gemfiles/rails_4_2.gemfile
|
|
130
131
|
- gemfiles/rails_5_0.gemfile
|
|
131
132
|
- gemfiles/rails_5_1.gemfile
|
|
133
|
+
- gemfiles/rails_5_2.gemfile
|
|
134
|
+
- gemfiles/rails_6_0.gemfile
|
|
132
135
|
- lib/active_decorator/graphql.rb
|
|
133
136
|
- lib/active_decorator/graphql/config.rb
|
|
134
137
|
- lib/active_decorator/graphql/version.rb
|
|
@@ -151,8 +154,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
151
154
|
- !ruby/object:Gem::Version
|
|
152
155
|
version: '0'
|
|
153
156
|
requirements: []
|
|
154
|
-
|
|
155
|
-
rubygems_version: 2.6.11
|
|
157
|
+
rubygems_version: 3.0.1
|
|
156
158
|
signing_key:
|
|
157
159
|
specification_version: 4
|
|
158
160
|
summary: A toolkit for decorating GraphQL field objects.
|