graphiti 1.10.2 → 1.11.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/.gitignore +2 -0
- data/Appraisals +2 -1
- data/CHANGELOG.md +19 -0
- data/gemfiles/rails_7_1.gemfile +1 -1
- data/graphiti.gemspec +2 -0
- data/lib/graphiti/adapters/active_record.rb +5 -3
- data/lib/graphiti/errors.rb +2 -0
- data/lib/graphiti/version.rb +1 -1
- metadata +16 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 49e9d67548ea3c47b06b7a476124e54506a73736218fb9ed4ff89298f43fffd8
|
|
4
|
+
data.tar.gz: 5cbf075f809a25cf52b3e0db9c80562603bf64b9806aa4c19eee72f63bfc422b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ea57e2be450016ac29ba83297f5fdabd4f39a2240d17441586e6b8ea800b8c3adf204a47e10d7fe806444ffbc05702339c0e02c606523621c1097df0a32330ba
|
|
7
|
+
data.tar.gz: c481af2971fe256dac0e4500c116743ae7261226b2a22b199eb503f8f9570a78c0e14ae21dbb6a0b2edaddad3059317e93f719670518ae75749493739e578d07
|
data/.gitignore
CHANGED
data/Appraisals
CHANGED
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
graphiti changelog
|
|
2
2
|
|
|
3
|
+
# [1.11.0](https://github.com/graphiti-api/graphiti/compare/v1.10.3...v1.11.0) (2026-07-28)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* filter instead of failing for nil string values ([#503](https://github.com/graphiti-api/graphiti/issues/503)) ([44bf76c](https://github.com/graphiti-api/graphiti/commit/44bf76c1d519f3d7bfa31f08e88dfcc61cc56455))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* adds attr_reader to Graphiti::Errors::UnsupportedOperator ([#506](https://github.com/graphiti-api/graphiti/issues/506)) ([315cc30](https://github.com/graphiti-api/graphiti/commit/315cc30bad69485d7c5c5f02a0d515b67382281f))
|
|
14
|
+
|
|
15
|
+
## [1.10.3](https://github.com/graphiti-api/graphiti/compare/v1.10.2...v1.10.3) (2026-07-28)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Bug Fixes
|
|
19
|
+
|
|
20
|
+
* declare ostruct runtime dependency for Ruby 3.5+ ([#508](https://github.com/graphiti-api/graphiti/issues/508)) ([38ef5c5](https://github.com/graphiti-api/graphiti/commit/38ef5c55b437b2cd42049405f8e98e991939b0fb))
|
|
21
|
+
|
|
3
22
|
## [1.10.2](https://github.com/graphiti-api/graphiti/compare/v1.10.1...v1.10.2) (2026-03-18)
|
|
4
23
|
|
|
5
24
|
|
data/gemfiles/rails_7_1.gemfile
CHANGED
data/graphiti.gemspec
CHANGED
|
@@ -24,6 +24,8 @@ Gem::Specification.new do |spec|
|
|
|
24
24
|
spec.add_dependency "graphiti_errors", "~> 1.1.0"
|
|
25
25
|
spec.add_dependency "concurrent-ruby", ">= 1.2", "< 2.0"
|
|
26
26
|
spec.add_dependency "activesupport", ">= 5.2"
|
|
27
|
+
# Bundled (no longer default) as of Ruby 3.5; graphiti uses OpenStruct in lib/
|
|
28
|
+
spec.add_dependency "ostruct", ">= 0.5"
|
|
27
29
|
|
|
28
30
|
spec.add_development_dependency "faraday", "~> 0.15"
|
|
29
31
|
spec.add_development_dependency "kaminari", "~> 0.17"
|
|
@@ -41,22 +41,24 @@ module Graphiti
|
|
|
41
41
|
alias_method :filter_enum_not_eql, :filter_not_eq
|
|
42
42
|
|
|
43
43
|
def filter_string_eq(scope, attribute, value, is_not: false)
|
|
44
|
+
return filter_string_eql(scope, attribute, nil, is_not: is_not) if Array(value).compact.blank?
|
|
45
|
+
|
|
44
46
|
column = column_for(scope, attribute)
|
|
45
47
|
clause = column.lower.eq_any(value.map(&:downcase))
|
|
46
48
|
is_not ? scope.where.not(clause) : scope.where(clause)
|
|
47
49
|
end
|
|
48
50
|
|
|
49
51
|
def filter_string_eql(scope, attribute, value, is_not: false)
|
|
50
|
-
clause = {attribute => value}
|
|
52
|
+
clause = {attribute => value.presence}
|
|
51
53
|
is_not ? scope.where.not(clause) : scope.where(clause)
|
|
52
54
|
end
|
|
53
55
|
|
|
54
56
|
def filter_string_not_eq(scope, attribute, value)
|
|
55
|
-
filter_string_eq(scope, attribute, value, is_not: true)
|
|
57
|
+
filter_string_eq(scope, attribute, value.presence, is_not: true)
|
|
56
58
|
end
|
|
57
59
|
|
|
58
60
|
def filter_string_not_eql(scope, attribute, value)
|
|
59
|
-
filter_string_eql(scope, attribute, value, is_not: true)
|
|
61
|
+
filter_string_eql(scope, attribute, value.presence, is_not: true)
|
|
60
62
|
end
|
|
61
63
|
|
|
62
64
|
# Arel has different match escaping behavior before rails 5.
|
data/lib/graphiti/errors.rb
CHANGED
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.
|
|
4
|
+
version: 1.11.0
|
|
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-
|
|
11
|
+
date: 2026-07-28 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: jsonapi-serializable
|
|
@@ -112,6 +112,20 @@ dependencies:
|
|
|
112
112
|
- - ">="
|
|
113
113
|
- !ruby/object:Gem::Version
|
|
114
114
|
version: '5.2'
|
|
115
|
+
- !ruby/object:Gem::Dependency
|
|
116
|
+
name: ostruct
|
|
117
|
+
requirement: !ruby/object:Gem::Requirement
|
|
118
|
+
requirements:
|
|
119
|
+
- - ">="
|
|
120
|
+
- !ruby/object:Gem::Version
|
|
121
|
+
version: '0.5'
|
|
122
|
+
type: :runtime
|
|
123
|
+
prerelease: false
|
|
124
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
125
|
+
requirements:
|
|
126
|
+
- - ">="
|
|
127
|
+
- !ruby/object:Gem::Version
|
|
128
|
+
version: '0.5'
|
|
115
129
|
- !ruby/object:Gem::Dependency
|
|
116
130
|
name: faraday
|
|
117
131
|
requirement: !ruby/object:Gem::Requirement
|