graphiti-activegraph 1.3.2 → 1.3.3

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: a63f1b1a90940e2048db02a4230724f8f6d1f058b2a282223ea3603d71573ed2
4
- data.tar.gz: b48f9232554ac22a93f02ab64067ca03e5d0a4543e50dde6247cce96efed0487
3
+ metadata.gz: 1a536e8f4ef99e0afb0a76ab5725a367f0642d0825a58ed7d08afdb552a06fe7
4
+ data.tar.gz: 0e6835102537951df5d70f5426339ba7fe8fa83e0be9bea3a310c9f908de9bcb
5
5
  SHA512:
6
- metadata.gz: a226d733cfa0cae9b61d8289cf0d611b319138a942d9aa80592d51931ce412e389d25fc373541e3769bd89a7f022630453ee27d68d6285508ade6b9e9ab60276
7
- data.tar.gz: a7a33a9e87f699b26e2a3703f4c827e100dd1a2d59ac1551f929e67798659f20ab88e5b5718fc1dedbdeca130d86babb506215525ad194db4da2352e7e32c28a
6
+ metadata.gz: 3e58d8b0097c4299f5f418e4ebca415ead2ca75f962dc1dd52e3ed839375de64f6b83beed9accfcd31fb8d9b5f6d22d336ae112d93b4f527c16a41d8b3be31ce
7
+ data.tar.gz: e0f56767adc0a4922ac7fcc2a9c4a1b2fab7efc3bba8f248b18422e89360501f6bd325a95602e45c862eb0831664f4603fa7472cc2fe1f1c79ef2fa49f100568
@@ -20,7 +20,7 @@ jobs:
20
20
  strategy:
21
21
  fail-fast: false
22
22
  matrix:
23
- ruby-version: [ '3.4'] # Removed 'jruby' till https://github.com/jruby/jruby/issues/8642 is fixed
23
+ ruby-version: [ '3.4', '4.0.3' ] # Removed 'jruby' till https://github.com/jruby/jruby/issues/8642 is fixed
24
24
  neo4j: [ '5.26.0', '5.23.0' ]
25
25
  include:
26
26
  - ruby: jruby
data/.rubocop.yml CHANGED
@@ -1,3 +1,6 @@
1
1
  require: standard
2
2
  inherit_gem:
3
3
  standard: config/base.yml
4
+
5
+ Layout/LineLength:
6
+ Max: 120
data/CHANGELOG.md CHANGED
@@ -7,16 +7,28 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [1.3.3] - 2026-05-05
11
+
12
+ ### Changed
13
+
14
+ - **Ruby 4 and Graphiti 1.9.0 support**: Added support for Ruby 4 and Graphiti 1.9.0 and made minor performance improvements.
15
+
10
16
  ## [1.3.2] - 2026-02-11
17
+
11
18
  ### Changed
19
+
12
20
  - **Grouping criteria**: parsing improved to ignore commas inside parentheses, allowing for more complex grouping criteria (e.g. group_by='custom_function(arg1,arg2),another_value'). Previous implementation would split the criteria at the comma inside the parentheses, leading to inability to pass the function call. (PR #51)
13
21
 
14
22
  ## [1.3.1] - 2025-11-5
23
+
15
24
  ### Added
25
+
16
26
  - **Deserializer: relationship id(s) helpers**: introduced `relationship_id` and `relationship_ids` methods in `Deserializer` to fetch relationship id(s) by association name from request payload. (PR #49)
17
27
 
18
28
  ## [1.3.0] - 2025-10-13
29
+
19
30
  ### Added
31
+
20
32
  - **Extra fields preloading in main query**: Support preloading associations for `extra_fields` for main and sideloaded records. Adds `preload` option to `extra_attribute` in resource classes. Example: `extra_attribute :full_post_title, :string, preload: :author`. (PR #45)
21
33
  - **Extra fields preloading in separate query**: Collect IDs from the main query result and run a single separate query to load and calculate `extra_fields` values for all records. does not support preloading for deep sideloads. (PR #47)
22
34
 
@@ -47,6 +59,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
47
59
  - **Sideloading Workflow**: Enhanced scoping mechanisms and added support for eager loading associations to improve data retrieval efficiency and flexibility (#38).
48
60
 
49
61
  ### Changed
62
+
50
63
  - **Resource Class**: Instead of modifying the `Graphiti::Resource` class, we now define `Graphiti::ActiveGraph::Resource`,
51
64
  which must be inherited in all resource classes to enable ActiveGraph support (#38).
52
65
 
@@ -17,7 +17,7 @@ Gem::Specification.new do |spec|
17
17
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
18
18
  spec.require_paths = ['lib']
19
19
 
20
- spec.add_dependency 'graphiti', '>= 1.6.4', '<= 1.8.1'
20
+ spec.add_dependency 'graphiti', '>= 1.6.4', '<= 1.9.0'
21
21
  spec.add_dependency 'activegraph', '>= 12.0.0.beta.5'
22
22
  spec.add_dependency 'parslet', '>= 2.0.0'
23
23
  spec.add_dependency 'activegraph-extensions', '>= 0.1.0'
@@ -31,4 +31,5 @@ Gem::Specification.new do |spec|
31
31
  spec.add_development_dependency 'factory_bot_rails'
32
32
  spec.add_development_dependency 'rake', '>= 10.0'
33
33
  spec.add_development_dependency 'rspec', '>= 3.9.0'
34
+ spec.add_development_dependency 'ostruct'
34
35
  end
@@ -7,7 +7,8 @@ module Graphiti::ActiveGraph
7
7
 
8
8
  def apply_standard_scope
9
9
  return @scope unless eagerload_associations?
10
- if (ids = @scope.collect(&:id)).present?
10
+ ids = @scope.respond_to?(:pluck) ? @scope.pluck(:id) : @scope.collect(&:id)
11
+ if ids.present?
11
12
  @opts[:query_obj].include_hash.each_key do |key|
12
13
  eagerload_association(key, ids)
13
14
  end
@@ -37,7 +37,7 @@ module Graphiti::ActiveGraph
37
37
  path = sort.keys.first.map { |key| { rel_name: key.to_s } }
38
38
  return nil unless (descriptor = PathDescriptor.parse(scope, path))
39
39
 
40
- sort_spec(descriptor, sort.values.first) if valid_sort?(includes_hash.deep_dup, descriptor.path_relationships)
40
+ sort_spec(descriptor, sort.values.first) if valid_sort?(includes_hash, descriptor.path_relationships)
41
41
  end
42
42
 
43
43
  def valid_sort?(hash, rels)
@@ -1,5 +1,5 @@
1
1
  module Graphiti
2
2
  module ActiveGraph
3
- VERSION = '1.3.2'
3
+ VERSION = '1.3.3'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: graphiti-activegraph
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.2
4
+ version: 1.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hardik Joshi
@@ -18,7 +18,7 @@ dependencies:
18
18
  version: 1.6.4
19
19
  - - "<="
20
20
  - !ruby/object:Gem::Version
21
- version: 1.8.1
21
+ version: 1.9.0
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
@@ -28,7 +28,7 @@ dependencies:
28
28
  version: 1.6.4
29
29
  - - "<="
30
30
  - !ruby/object:Gem::Version
31
- version: 1.8.1
31
+ version: 1.9.0
32
32
  - !ruby/object:Gem::Dependency
33
33
  name: activegraph
34
34
  requirement: !ruby/object:Gem::Requirement
@@ -197,6 +197,20 @@ dependencies:
197
197
  - - ">="
198
198
  - !ruby/object:Gem::Version
199
199
  version: 3.9.0
200
+ - !ruby/object:Gem::Dependency
201
+ name: ostruct
202
+ requirement: !ruby/object:Gem::Requirement
203
+ requirements:
204
+ - - ">="
205
+ - !ruby/object:Gem::Version
206
+ version: '0'
207
+ type: :development
208
+ prerelease: false
209
+ version_requirements: !ruby/object:Gem::Requirement
210
+ requirements:
211
+ - - ">="
212
+ - !ruby/object:Gem::Version
213
+ version: '0'
200
214
  email:
201
215
  - hardikjoshi1991@gmail.com
202
216
  executables: []