graphiti 1.13.0 → 1.13.2
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/CHANGELOG.md +15 -0
- data/graphiti.gemspec +0 -18
- data/lib/graphiti/scoping/filter.rb +3 -1
- data/lib/graphiti/types.rb +5 -1
- data/lib/graphiti/version.rb +1 -1
- metadata +3 -10
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ffedb3e23185f2ec27cb3aebb302c7e27caad8d9595605a90dc1de87d08a5f93
|
|
4
|
+
data.tar.gz: '082375ee5cb6e20e0b1dc1bbc80cb4283e0c6f7330e4bbc02d253aa074bbfeef'
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7b7af8affb728561eef3e45a83f238597465eb8d050a44ec41bfe84e88de2455b86f998d3141a345bec100b41ca479c057643a1db86bbd8c57cac101d629b45c
|
|
7
|
+
data.tar.gz: 5eecece4715d3bab183ec10e37a846558ab547534b03bf15f601ea576735a3952717a567d25fa6c3746317c5449a99a5477e5758c22142f5d4e820d155bd4211
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
graphiti changelog
|
|
2
2
|
|
|
3
|
+
## [1.13.2](https://github.com/graphiti-api/graphiti/compare/v1.13.1...v1.13.2) (2026-08-07)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* drop the relationship guard install notice ([65b8be6](https://github.com/graphiti-api/graphiti/commit/65b8be65455a7d034c9dca082434c1dbfe610a7a))
|
|
9
|
+
|
|
10
|
+
## [1.13.1](https://github.com/graphiti-api/graphiti/compare/v1.13.0...v1.13.1) (2026-08-02)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
* accept a single value for array filters ([#517](https://github.com/graphiti-api/graphiti/issues/517)) ([23f3e80](https://github.com/graphiti-api/graphiti/commit/23f3e80b583b0bf0843d8bb9334970ae56d83299))
|
|
16
|
+
* typecast null values in filter lists ([#515](https://github.com/graphiti-api/graphiti/issues/515)) ([3dcf4c8](https://github.com/graphiti-api/graphiti/commit/3dcf4c868abb12eb6b6d59cd0814b227d4838ece))
|
|
17
|
+
|
|
3
18
|
# [1.13.0](https://github.com/graphiti-api/graphiti/compare/v1.12.2...v1.13.0) (2026-07-30)
|
|
4
19
|
|
|
5
20
|
|
data/graphiti.gemspec
CHANGED
|
@@ -18,24 +18,6 @@ Gem::Specification.new do |spec|
|
|
|
18
18
|
spec.require_paths = ["lib"]
|
|
19
19
|
spec.required_ruby_version = ">= 2.7"
|
|
20
20
|
|
|
21
|
-
# TODO: remove once the 1.12 upgrade window has passed
|
|
22
|
-
spec.post_install_message = <<~MSG
|
|
23
|
-
Graphiti: relationship readable:/writable: guards are now enforced.
|
|
24
|
-
|
|
25
|
-
Symbols, strings, and procs passed to a relationship's readable/writable
|
|
26
|
-
guards were always interpreted as true and never actually called before this
|
|
27
|
-
conditional relationship change. They are now evaluated per-request, where
|
|
28
|
-
unreadable relationships are omitted from responses and includes, and unwritable
|
|
29
|
-
relationships reject writes.
|
|
30
|
-
|
|
31
|
-
To list every affected relationship in your app:
|
|
32
|
-
|
|
33
|
-
bin/rails runner 'puts Graphiti.guarded_relationships'
|
|
34
|
-
|
|
35
|
-
Audit these before deploying. Apps using schema.json will also see affected
|
|
36
|
-
relationships flagged as "became guarded" by the schema check.
|
|
37
|
-
MSG
|
|
38
|
-
|
|
39
21
|
spec.add_dependency "jsonapi-serializable", "~> 0.3.0"
|
|
40
22
|
spec.add_dependency "jsonapi-renderer", "~> 0.2", ">= 0.2.2"
|
|
41
23
|
spec.add_dependency "dry-types", ">= 0.15.0", "< 2.0"
|
|
@@ -209,7 +209,9 @@ module Graphiti
|
|
|
209
209
|
end
|
|
210
210
|
|
|
211
211
|
def parse_string_null(filter, value)
|
|
212
|
-
return
|
|
212
|
+
return value unless filter[:allow_nil]
|
|
213
|
+
return value.map { |item| item == "null" ? nil : item } if value.is_a?(Array)
|
|
214
|
+
return if value == "null"
|
|
213
215
|
|
|
214
216
|
value
|
|
215
217
|
end
|
data/lib/graphiti/types.rb
CHANGED
|
@@ -82,6 +82,10 @@ module Graphiti
|
|
|
82
82
|
Dry::Types["params.hash"][input]
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
+
ParamArray = Dry::Types["strict.array"].constructor { |input|
|
|
86
|
+
input.is_a?(String) ? [input] : input
|
|
87
|
+
}
|
|
88
|
+
|
|
85
89
|
REQUIRED_KEYS = [:params, :read, :write, :kind, :description]
|
|
86
90
|
|
|
87
91
|
def self.map
|
|
@@ -193,7 +197,7 @@ module Graphiti
|
|
|
193
197
|
|
|
194
198
|
arrays[:"array_of_#{name.to_s.pluralize}"] = {
|
|
195
199
|
canonical_name: name,
|
|
196
|
-
params:
|
|
200
|
+
params: ParamArray.of(map[:params]),
|
|
197
201
|
read: Dry::Types["strict.array"].of(map[:read]),
|
|
198
202
|
test: Dry::Types["strict.array"].of(map[:test]),
|
|
199
203
|
write: Dry::Types["strict.array"].of(map[:write]),
|
data/lib/graphiti/version.rb
CHANGED
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.13.
|
|
4
|
+
version: 1.13.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Lee Richmond
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-07
|
|
11
|
+
date: 2026-08-07 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: jsonapi-serializable
|
|
@@ -371,14 +371,7 @@ homepage: https://github.com/graphiti-api/graphiti
|
|
|
371
371
|
licenses:
|
|
372
372
|
- MIT
|
|
373
373
|
metadata: {}
|
|
374
|
-
post_install_message:
|
|
375
|
-
strings, and procs passed to a relationship's readable/writable\nguards were always
|
|
376
|
-
interpreted as true and never actually called before this\nconditional relationship
|
|
377
|
-
change. They are now evaluated per-request, where\nunreadable relationships are
|
|
378
|
-
omitted from responses and includes, and unwritable\nrelationships reject writes.\n\nTo
|
|
379
|
-
list every affected relationship in your app:\n\n bin/rails runner 'puts Graphiti.guarded_relationships'\n\nAudit
|
|
380
|
-
these before deploying. Apps using schema.json will also see affected \nrelationships
|
|
381
|
-
flagged as \"became guarded\" by the schema check.\n"
|
|
374
|
+
post_install_message:
|
|
382
375
|
rdoc_options: []
|
|
383
376
|
require_paths:
|
|
384
377
|
- lib
|