graphiti 1.2.16 → 1.3.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +96 -0
- data/.standard.yml +4 -4
- data/Appraisals +23 -17
- data/CHANGELOG.md +7 -1
- data/Guardfile +5 -5
- data/deprecated_generators/graphiti/generator_mixin.rb +1 -0
- data/deprecated_generators/graphiti/resource_generator.rb +1 -1
- data/gemfiles/{rails_5.gemfile → rails_5_2.gemfile} +2 -2
- data/gemfiles/{rails_5_graphiti_rails.gemfile → rails_5_2_graphiti_rails.gemfile} +3 -4
- data/gemfiles/rails_6.gemfile +1 -1
- data/gemfiles/rails_6_graphiti_rails.gemfile +2 -3
- data/gemfiles/{rails_4.gemfile → rails_7.gemfile} +2 -2
- data/gemfiles/rails_7_graphiti_rails.gemfile +19 -0
- data/graphiti.gemspec +16 -16
- data/lib/graphiti/adapters/abstract.rb +20 -5
- data/lib/graphiti/adapters/active_record/belongs_to_sideload.rb +1 -1
- data/lib/graphiti/adapters/active_record/has_many_sideload.rb +1 -1
- data/lib/graphiti/adapters/active_record/has_one_sideload.rb +1 -1
- data/lib/graphiti/adapters/active_record/{inferrence.rb → inference.rb} +2 -2
- data/lib/graphiti/adapters/active_record/many_to_many_sideload.rb +19 -0
- data/lib/graphiti/adapters/active_record.rb +119 -74
- data/lib/graphiti/adapters/graphiti_api.rb +1 -1
- data/lib/graphiti/adapters/null.rb +1 -1
- data/lib/graphiti/adapters/persistence/associations.rb +78 -0
- data/lib/graphiti/configuration.rb +3 -1
- data/lib/graphiti/debugger.rb +12 -8
- data/lib/graphiti/delegates/pagination.rb +47 -13
- data/lib/graphiti/deserializer.rb +3 -3
- data/lib/graphiti/errors.rb +109 -15
- data/lib/graphiti/extensions/extra_attribute.rb +4 -4
- data/lib/graphiti/extensions/temp_id.rb +1 -1
- data/lib/graphiti/filter_operators.rb +0 -1
- data/lib/graphiti/hash_renderer.rb +198 -21
- data/lib/graphiti/query.rb +105 -73
- data/lib/graphiti/railtie.rb +5 -5
- data/lib/graphiti/renderer.rb +19 -1
- data/lib/graphiti/request_validator.rb +10 -10
- data/lib/graphiti/request_validators/update_validator.rb +4 -5
- data/lib/graphiti/request_validators/validator.rb +38 -24
- data/lib/graphiti/resource/configuration.rb +35 -7
- data/lib/graphiti/resource/dsl.rb +34 -8
- data/lib/graphiti/resource/interface.rb +13 -3
- data/lib/graphiti/resource/links.rb +3 -3
- data/lib/graphiti/resource/persistence.rb +2 -1
- data/lib/graphiti/resource/polymorphism.rb +8 -2
- data/lib/graphiti/resource/remote.rb +2 -2
- data/lib/graphiti/resource/sideloading.rb +4 -4
- data/lib/graphiti/resource.rb +12 -1
- data/lib/graphiti/resource_proxy.rb +23 -3
- data/lib/graphiti/runner.rb +5 -5
- data/lib/graphiti/schema.rb +36 -11
- data/lib/graphiti/schema_diff.rb +44 -4
- data/lib/graphiti/scope.rb +8 -10
- data/lib/graphiti/scoping/base.rb +3 -3
- data/lib/graphiti/scoping/filter.rb +36 -15
- data/lib/graphiti/scoping/filter_group_validator.rb +78 -0
- data/lib/graphiti/scoping/paginate.rb +47 -3
- data/lib/graphiti/scoping/sort.rb +5 -7
- data/lib/graphiti/serializer.rb +49 -7
- data/lib/graphiti/sideload/belongs_to.rb +1 -1
- data/lib/graphiti/sideload/has_many.rb +19 -1
- data/lib/graphiti/sideload/many_to_many.rb +11 -4
- data/lib/graphiti/sideload/polymorphic_belongs_to.rb +3 -4
- data/lib/graphiti/sideload.rb +47 -23
- data/lib/graphiti/stats/dsl.rb +0 -1
- data/lib/graphiti/stats/payload.rb +12 -9
- data/lib/graphiti/types.rb +15 -15
- data/lib/graphiti/util/attribute_check.rb +1 -1
- data/lib/graphiti/util/class.rb +6 -0
- data/lib/graphiti/util/link.rb +10 -2
- data/lib/graphiti/util/persistence.rb +21 -78
- data/lib/graphiti/util/relationship_payload.rb +4 -4
- data/lib/graphiti/util/remote_params.rb +9 -4
- data/lib/graphiti/util/remote_serializer.rb +1 -0
- data/lib/graphiti/util/serializer_attributes.rb +41 -11
- data/lib/graphiti/util/simple_errors.rb +4 -4
- data/lib/graphiti/util/transaction_hooks_recorder.rb +1 -1
- data/lib/graphiti/version.rb +1 -1
- data/lib/graphiti.rb +6 -3
- metadata +46 -37
- data/.travis.yml +0 -59
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: graphiti
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lee Richmond
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-05-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jsonapi-serializable
|
@@ -28,16 +28,22 @@ dependencies:
|
|
28
28
|
name: jsonapi-renderer
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.2
|
33
|
+
version: '0.2'
|
34
|
+
- - ">="
|
35
|
+
- !ruby/object:Gem::Version
|
36
|
+
version: 0.2.2
|
34
37
|
type: :runtime
|
35
38
|
prerelease: false
|
36
39
|
version_requirements: !ruby/object:Gem::Requirement
|
37
40
|
requirements:
|
38
|
-
- -
|
41
|
+
- - "~>"
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: '0.2'
|
44
|
+
- - ">="
|
39
45
|
- !ruby/object:Gem::Version
|
40
|
-
version: 0.2.
|
46
|
+
version: 0.2.2
|
41
47
|
- !ruby/object:Gem::Dependency
|
42
48
|
name: dry-types
|
43
49
|
requirement: !ruby/object:Gem::Requirement
|
@@ -92,14 +98,14 @@ dependencies:
|
|
92
98
|
requirements:
|
93
99
|
- - ">="
|
94
100
|
- !ruby/object:Gem::Version
|
95
|
-
version: '
|
101
|
+
version: '5.2'
|
96
102
|
type: :runtime
|
97
103
|
prerelease: false
|
98
104
|
version_requirements: !ruby/object:Gem::Requirement
|
99
105
|
requirements:
|
100
106
|
- - ">="
|
101
107
|
- !ruby/object:Gem::Version
|
102
|
-
version: '
|
108
|
+
version: '5.2'
|
103
109
|
- !ruby/object:Gem::Dependency
|
104
110
|
name: faraday
|
105
111
|
requirement: !ruby/object:Gem::Requirement
|
@@ -146,59 +152,59 @@ dependencies:
|
|
146
152
|
name: rake
|
147
153
|
requirement: !ruby/object:Gem::Requirement
|
148
154
|
requirements:
|
149
|
-
- - "
|
155
|
+
- - ">="
|
150
156
|
- !ruby/object:Gem::Version
|
151
157
|
version: '10.0'
|
152
158
|
type: :development
|
153
159
|
prerelease: false
|
154
160
|
version_requirements: !ruby/object:Gem::Requirement
|
155
161
|
requirements:
|
156
|
-
- - "
|
162
|
+
- - ">="
|
157
163
|
- !ruby/object:Gem::Version
|
158
164
|
version: '10.0'
|
159
165
|
- !ruby/object:Gem::Dependency
|
160
|
-
name:
|
166
|
+
name: standard
|
161
167
|
requirement: !ruby/object:Gem::Requirement
|
162
168
|
requirements:
|
163
|
-
- - "
|
169
|
+
- - "~>"
|
164
170
|
- !ruby/object:Gem::Version
|
165
|
-
version:
|
171
|
+
version: 1.4.0
|
166
172
|
type: :development
|
167
173
|
prerelease: false
|
168
174
|
version_requirements: !ruby/object:Gem::Requirement
|
169
175
|
requirements:
|
170
|
-
- - "
|
176
|
+
- - "~>"
|
171
177
|
- !ruby/object:Gem::Version
|
172
|
-
version:
|
178
|
+
version: 1.4.0
|
173
179
|
- !ruby/object:Gem::Dependency
|
174
|
-
name:
|
180
|
+
name: activemodel
|
175
181
|
requirement: !ruby/object:Gem::Requirement
|
176
182
|
requirements:
|
177
|
-
- -
|
183
|
+
- - ">="
|
178
184
|
- !ruby/object:Gem::Version
|
179
|
-
version:
|
185
|
+
version: '5.2'
|
180
186
|
type: :development
|
181
187
|
prerelease: false
|
182
188
|
version_requirements: !ruby/object:Gem::Requirement
|
183
189
|
requirements:
|
184
|
-
- -
|
190
|
+
- - ">="
|
185
191
|
- !ruby/object:Gem::Version
|
186
|
-
version:
|
192
|
+
version: '5.2'
|
187
193
|
- !ruby/object:Gem::Dependency
|
188
|
-
name:
|
194
|
+
name: graphiti_spec_helpers
|
189
195
|
requirement: !ruby/object:Gem::Requirement
|
190
196
|
requirements:
|
191
|
-
- -
|
197
|
+
- - '='
|
192
198
|
- !ruby/object:Gem::Version
|
193
|
-
version:
|
199
|
+
version: 1.0.beta.4
|
194
200
|
type: :development
|
195
201
|
prerelease: false
|
196
202
|
version_requirements: !ruby/object:Gem::Requirement
|
197
203
|
requirements:
|
198
|
-
- -
|
204
|
+
- - '='
|
199
205
|
- !ruby/object:Gem::Version
|
200
|
-
version:
|
201
|
-
description:
|
206
|
+
version: 1.0.beta.4
|
207
|
+
description:
|
202
208
|
email:
|
203
209
|
- richmolj@gmail.com
|
204
210
|
executables:
|
@@ -206,10 +212,10 @@ executables:
|
|
206
212
|
extensions: []
|
207
213
|
extra_rdoc_files: []
|
208
214
|
files:
|
215
|
+
- ".github/workflows/ci.yml"
|
209
216
|
- ".gitignore"
|
210
217
|
- ".rspec"
|
211
218
|
- ".standard.yml"
|
212
|
-
- ".travis.yml"
|
213
219
|
- ".yardopts"
|
214
220
|
- Appraisals
|
215
221
|
- CHANGELOG.md
|
@@ -240,11 +246,12 @@ files:
|
|
240
246
|
- deprecated_generators/graphiti/templates/update_request_spec.rb.erb
|
241
247
|
- exe/graphiti
|
242
248
|
- gemfiles/.bundle/config
|
243
|
-
- gemfiles/
|
244
|
-
- gemfiles/
|
245
|
-
- gemfiles/rails_5_graphiti_rails.gemfile
|
249
|
+
- gemfiles/rails_5_2.gemfile
|
250
|
+
- gemfiles/rails_5_2_graphiti_rails.gemfile
|
246
251
|
- gemfiles/rails_6.gemfile
|
247
252
|
- gemfiles/rails_6_graphiti_rails.gemfile
|
253
|
+
- gemfiles/rails_7.gemfile
|
254
|
+
- gemfiles/rails_7_graphiti_rails.gemfile
|
248
255
|
- graphiti.gemspec
|
249
256
|
- lib/graphiti.rb
|
250
257
|
- lib/graphiti/adapters/abstract.rb
|
@@ -252,10 +259,11 @@ files:
|
|
252
259
|
- lib/graphiti/adapters/active_record/belongs_to_sideload.rb
|
253
260
|
- lib/graphiti/adapters/active_record/has_many_sideload.rb
|
254
261
|
- lib/graphiti/adapters/active_record/has_one_sideload.rb
|
255
|
-
- lib/graphiti/adapters/active_record/
|
262
|
+
- lib/graphiti/adapters/active_record/inference.rb
|
256
263
|
- lib/graphiti/adapters/active_record/many_to_many_sideload.rb
|
257
264
|
- lib/graphiti/adapters/graphiti_api.rb
|
258
265
|
- lib/graphiti/adapters/null.rb
|
266
|
+
- lib/graphiti/adapters/persistence/associations.rb
|
259
267
|
- lib/graphiti/cli.rb
|
260
268
|
- lib/graphiti/configuration.rb
|
261
269
|
- lib/graphiti/context.rb
|
@@ -297,6 +305,7 @@ files:
|
|
297
305
|
- lib/graphiti/scoping/default_filter.rb
|
298
306
|
- lib/graphiti/scoping/extra_attributes.rb
|
299
307
|
- lib/graphiti/scoping/filter.rb
|
308
|
+
- lib/graphiti/scoping/filter_group_validator.rb
|
300
309
|
- lib/graphiti/scoping/filterable.rb
|
301
310
|
- lib/graphiti/scoping/paginate.rb
|
302
311
|
- lib/graphiti/scoping/sort.rb
|
@@ -331,23 +340,23 @@ homepage: https://github.com/graphiti-api/graphiti
|
|
331
340
|
licenses:
|
332
341
|
- MIT
|
333
342
|
metadata: {}
|
334
|
-
post_install_message:
|
343
|
+
post_install_message:
|
335
344
|
rdoc_options: []
|
336
345
|
require_paths:
|
337
346
|
- lib
|
338
347
|
required_ruby_version: !ruby/object:Gem::Requirement
|
339
348
|
requirements:
|
340
|
-
- - "
|
349
|
+
- - ">="
|
341
350
|
- !ruby/object:Gem::Version
|
342
|
-
version: '2.
|
351
|
+
version: '2.6'
|
343
352
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
344
353
|
requirements:
|
345
354
|
- - ">="
|
346
355
|
- !ruby/object:Gem::Version
|
347
356
|
version: '0'
|
348
357
|
requirements: []
|
349
|
-
rubygems_version: 3.
|
350
|
-
signing_key:
|
358
|
+
rubygems_version: 3.3.7
|
359
|
+
signing_key:
|
351
360
|
specification_version: 4
|
352
361
|
summary: Easily build jsonapi.org-compatible APIs
|
353
362
|
test_files: []
|
data/.travis.yml
DELETED
@@ -1,59 +0,0 @@
|
|
1
|
-
sudo: false
|
2
|
-
language: ruby
|
3
|
-
rvm:
|
4
|
-
- 2.5
|
5
|
-
- 2.6
|
6
|
-
gemfile:
|
7
|
-
- Gemfile
|
8
|
-
- gemfiles/rails_4.gemfile
|
9
|
-
- gemfiles/rails_5.gemfile
|
10
|
-
- gemfiles/rails_6.gemfile
|
11
|
-
- gemfiles/rails_5_graphiti_rails.gemfile
|
12
|
-
- gemfiles/rails_6_graphiti_rails.gemfile
|
13
|
-
env:
|
14
|
-
- COMMAND=standardrb --no-fix --format progress
|
15
|
-
- COMMAND=rspec
|
16
|
-
- COMMAND=rspec APPRAISAL_INITIALIZED=true
|
17
|
-
matrix:
|
18
|
-
exclude:
|
19
|
-
- env: COMMAND=standardrb --no-fix --format progress
|
20
|
-
gemfile: gemfiles/rails_4.gemfile
|
21
|
-
- env: COMMAND=standardrb --no-fix --format progress
|
22
|
-
gemfile: gemfiles/rails_5.gemfile
|
23
|
-
- env: COMMAND=standardrb --no-fix --format progress
|
24
|
-
gemfile: gemfiles/rails_6.gemfile
|
25
|
-
- env: COMMAND=standardrb --no-fix --format progress
|
26
|
-
gemfile: gemfiles/rails_5_graphiti_rails.gemfile
|
27
|
-
- env: COMMAND=standardrb --no-fix --format progress
|
28
|
-
gemfile: gemfiles/rails_6_graphiti_rails.gemfile
|
29
|
-
- env: COMMAND=rspec APPRAISAL_INITIALIZED=true
|
30
|
-
gemfile: Gemfile
|
31
|
-
- env: COMMAND=rspec
|
32
|
-
gemfile: gemfiles/rails_4.gemfile
|
33
|
-
- env: COMMAND=rspec
|
34
|
-
gemfile: gemfiles/rails_5.gemfile
|
35
|
-
- env: COMMAND=rspec
|
36
|
-
gemfile: gemfiles/rails_6.gemfile
|
37
|
-
- env: COMMAND=rspec
|
38
|
-
gemfile: gemfiles/rails_5_graphiti_rails.gemfile
|
39
|
-
- env: COMMAND=rspec
|
40
|
-
gemfile: gemfiles/rails_6_graphiti_rails.gemfile
|
41
|
-
- gemfile: gemfiles/rails_4.gemfile
|
42
|
-
rvm: 2.5
|
43
|
-
- gemfile: gemfiles/rails_4.gemfile
|
44
|
-
rvm: 2.6
|
45
|
-
|
46
|
-
script:
|
47
|
-
- bundle _1.17.3_ exec $COMMAND
|
48
|
-
|
49
|
-
install: bundle _1.17.3_ install --retry=3 --jobs=3
|
50
|
-
before_install:
|
51
|
-
- gem install bundler -v '1.17.3'
|
52
|
-
deploy:
|
53
|
-
provider: rubygems
|
54
|
-
api_key:
|
55
|
-
secure: aON6EPWgHZXVQs+n/glMjPJ5kMpeR25khDpYlFIM0Ggf2+xuT/yRMtGbNTYnB01v/v2s9tNWK6QlMGARCbKz/W6WS8VNwFxs4DO1IPY3XoyF8QaPlXVKfBLldjUoVx61zL5xtcv8uZqWT1ATY+DjHW3nQ875ss/GW8tw+UASG1uUEuPCE9z+rNa3xYnm2qSZOwhFWqs5bHRQcc3gF3O8Hy8r4aosYTAlYOSeGDToqTUq1Ws21dV4xnIo97Nhmh9SYBQcKpZk1qF9bUz4zqdKsDKAxHMJRShtILmhPxNpIqE5ZV0+Xt+cnwi11AZDhSgfoUqYO9t2uG562luAqTnEZEQl+Lmc+nx4nJTH6tcR3ri301k0O+qDZ3PgSojJvrUuNC8DDLbbsVJNHYycGOLclqQq1aNbgz9HayEE5s+AyklPcprJhngxA5WP80AtONAxxLt4OjrY0X80TvOi2b5nfIN7DowGmcLbRahnms98Yk6/i1vCNV4R9bO0AaqpGLV+L8sVp98Qquk2mpvB3Le4W89qm5int1y2FNJbgInBpY1UOsI3wLENt0npC1X/KVMJKkpHvk80rGccI5FIVRUDZ3YD77hi+s1busPSVQ/+l4QdTFHmWp13Pghf6hNaIwfNwFMHwM2Fkv8YXa4c1mWc1cY5WP1ELS8cEnjtmp/9Iuc=
|
56
|
-
gem: graphiti
|
57
|
-
on:
|
58
|
-
tags: true
|
59
|
-
repo: graphiti-api/graphiti
|