graphiti 2.1.2 → 2.2.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 +4 -4
- data/CHANGELOG.md +14 -0
- data/lib/graphiti/adapters/active_record/many_to_many_sideload.rb +8 -0
- data/lib/graphiti/resource.rb +1 -1
- data/lib/graphiti/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: df6cf17d52242b009350cdbfcee3da740db0eb495d31fcebaa4a64f488e0f847
|
|
4
|
+
data.tar.gz: d76151e67afde1fe2b5767e017aef86a9b1f2764bfed8bf88465f807c6c1c70d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b5afa624af4b2c280d1f818eeed4f9f90a87330494ecebb6995861a4541a4da5979a122168a45da42185ae056210bc1cf75f56682dcb06631a369125719b1bd9
|
|
7
|
+
data.tar.gz: e81fbd136f7e948be6bd77f87869d9d10b7fd96d6aea4fe8b9b435c6da35fb68620a2f8290ce0095028a79a07625b8a9a6b0e13bc9e50c6af6138c1d8112a667
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
graphiti changelog
|
|
2
2
|
|
|
3
|
+
# [2.2.0](https://github.com/graphiti-api/graphiti/compare/v2.1.3...v2.2.0) (2026-10-13)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* an array attribute marked nullable: true accepts null on write, so a resource can save back the null it renders ([3f76cbb](https://github.com/graphiti-api/graphiti/commit/3f76cbb9c3fa15e246f0e99234a608577bec0f07))
|
|
9
|
+
|
|
10
|
+
## [2.1.3](https://github.com/graphiti-api/graphiti/compare/v2.1.2...v2.1.3) (2026-10-12)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
* including a polymorphic many_to_many on a resource that publishes public ids returned nothing ([44127c7](https://github.com/graphiti-api/graphiti/commit/44127c743752e8d7c35f1356bf7ec557ea125c6e))
|
|
16
|
+
|
|
3
17
|
## [2.1.2](https://github.com/graphiti-api/graphiti/compare/v2.1.1...v2.1.2) (2026-10-12)
|
|
4
18
|
|
|
5
19
|
|
|
@@ -45,6 +45,14 @@ class Graphiti::Adapters::ActiveRecord::ManyToManySideload < Graphiti::Sideload:
|
|
|
45
45
|
|
|
46
46
|
private
|
|
47
47
|
|
|
48
|
+
# An internal param skips the :hash typecast that would parse each polymorphic JSON group.
|
|
49
|
+
def internal_parent_filter(parents, filter_name)
|
|
50
|
+
filter = super
|
|
51
|
+
return filter unless polymorphic? && filter.is_a?(Graphiti::Util::InternalParam)
|
|
52
|
+
|
|
53
|
+
Graphiti::Util::InternalParam.new(filter.value.map { |group| JSON.parse(group) })
|
|
54
|
+
end
|
|
55
|
+
|
|
48
56
|
def filter_for(scope, value, type = nil)
|
|
49
57
|
scope
|
|
50
58
|
.includes(through_relationship_name)
|
data/lib/graphiti/resource.rb
CHANGED
|
@@ -112,7 +112,7 @@ module Graphiti
|
|
|
112
112
|
type_name = filters[name][:type]
|
|
113
113
|
end
|
|
114
114
|
type = Graphiti::Types[type_name]
|
|
115
|
-
return if value.nil? && type[:kind] != "array"
|
|
115
|
+
return if value.nil? && (type[:kind] != "array" || (flag == :writable && att[:nullable]))
|
|
116
116
|
begin
|
|
117
117
|
flag = :read if flag == :readable
|
|
118
118
|
flag = :write if flag == :writable
|
data/lib/graphiti/version.rb
CHANGED