graphiti 1.10.3 → 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0f7dc2f6e3154be149cfdd3d7b43d76bc51a9382dcfbaf1b73911d8a85bcdbd4
4
- data.tar.gz: 8301d7b23a79d3969a98d52b84a90ff90b93fe1ea6d319d54cd1c70edb800680
3
+ metadata.gz: 49e9d67548ea3c47b06b7a476124e54506a73736218fb9ed4ff89298f43fffd8
4
+ data.tar.gz: 5cbf075f809a25cf52b3e0db9c80562603bf64b9806aa4c19eee72f63bfc422b
5
5
  SHA512:
6
- metadata.gz: 9de6bb2a1aa205cd29797fa1b8df39969d098e9b8e3a0c4eeeb1401db2eadb5faf7121fa8100408773055f47fc01fc0e249560321fa4d4a0ae298464f7ff4f04
7
- data.tar.gz: f3dd4d5d7e2f8cf36c8916322197b62309c145cc25ac92a59ee328bac42315419e4b5f47b359336d25842c01f1ef3d817f239f266d6ecfc6709e1f0b9ab25f40
6
+ metadata.gz: ea57e2be450016ac29ba83297f5fdabd4f39a2240d17441586e6b8ea800b8c3adf204a47e10d7fe806444ffbc05702339c0e02c606523621c1097df0a32330ba
7
+ data.tar.gz: c481af2971fe256dac0e4500c116743ae7261226b2a22b199eb503f8f9570a78c0e14ae21dbb6a0b2edaddad3059317e93f719670518ae75749493739e578d07
data/.gitignore CHANGED
@@ -7,6 +7,8 @@
7
7
  /spec/reports/
8
8
  /gemfiles/*.lock
9
9
  /tmp/
10
+ # railties generates local_secret.txt under the dummy app root, which is spec/
11
+ /spec/tmp/
10
12
  node_modules
11
13
  .byebug_history
12
14
  spec/.rspec-examples
data/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
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
+
3
15
  ## [1.10.3](https://github.com/graphiti-api/graphiti/compare/v1.10.2...v1.10.3) (2026-07-28)
4
16
 
5
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.
@@ -97,6 +97,8 @@ module Graphiti
97
97
  end
98
98
 
99
99
  class UnsupportedOperator < Base
100
+ attr_reader :resource, :filter_name, :supported, :operator
101
+
100
102
  def initialize(resource, filter_name, supported, operator)
101
103
  @resource = resource
102
104
  @filter_name = filter_name
@@ -1,3 +1,3 @@
1
1
  module Graphiti
2
- VERSION = "1.10.3"
2
+ VERSION = "1.11.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: graphiti
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.10.3
4
+ version: 1.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lee Richmond