graphiti 2.0.1 → 2.0.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1c38c96bcf6d48078c1361d22da7e563506b385b4bfe74b7b0fbdb8bd45ccb3a
4
- data.tar.gz: 52e3079715304dc15408f6945f7515a6ba07db792cc55eda66887d2227e533c1
3
+ metadata.gz: 8d65d4265eb6a753309e1348e135296d3c114b0497ceadd09ccc0f626d0fcaad
4
+ data.tar.gz: c8e52211ff147a9607360ce19e2351fe10e5a670481e1d20cf2625034f761ed8
5
5
  SHA512:
6
- metadata.gz: ab09db3099f66a44e8a453ee336aa93075b06a5cb46119a505380d08e9a7ae305f58da4a5822e319fb0e74b381537aee556681bcc6b9e353a7d1bec58705b2fa
7
- data.tar.gz: 963db95d086610db6bd4600b56db8674804aac397ef4e4bbf687a387d4f2fea10cee7b0842f7d7d2bc89d65387210702d93b810819e5e663a8e7ed46bad9d6f5
6
+ metadata.gz: b8c3fcadbaba93c23bdf505937443432abc2e0b120a2baadd76279c20f7ba0382798a416dd83832e4ad0e9697e5cb20570df93c0747eea5c832782a1cf442865
7
+ data.tar.gz: c3f790bed7b1cba2802e5a10b9c9f51c53ccc44e9da9823956266361f80a4af0df790d59ebe951f97768b4ba80da7a002ae919cc739225ed22cec8084e4292ce
data/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  graphiti changelog
2
2
 
3
+ ## [2.0.2](https://github.com/graphiti-api/graphiti/compare/v2.0.1...v2.0.2) (2026-09-04)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * stats[group_by] only groups by an attribute the resource reads ([5b52b36](https://github.com/graphiti-api/graphiti/commit/5b52b368de3a8fd94bfdaf61d05e0dd2e487bd92))
9
+
3
10
  ## [2.0.1](https://github.com/graphiti-api/graphiti/compare/v2.0.0...v2.0.1) (2026-09-02)
4
11
 
5
12
 
@@ -36,6 +36,10 @@ module Graphiti
36
36
  status: 400, detail: :exception, handler: Graphiti::Rails::ExceptionHandler
37
37
  register_exception Graphiti::Errors::InvalidInclude,
38
38
  status: 400, detail: :exception, handler: Graphiti::Rails::ExceptionHandler
39
+ register_exception Graphiti::Errors::UnknownAttribute,
40
+ status: 400, detail: :exception, handler: Graphiti::Rails::ExceptionHandler
41
+ register_exception Graphiti::Errors::InvalidAttributeAccess,
42
+ status: 400, detail: :exception, handler: Graphiti::Rails::ExceptionHandler
39
43
  register_exception Graphiti::Errors::UnsupportedSort,
40
44
  status: 400, detail: :exception, handler: Graphiti::Rails::ExceptionHandler
41
45
  register_exception Graphiti::Errors::UnsupportedOperator,
@@ -52,6 +52,8 @@ module Graphiti
52
52
  "Graphiti::Errors::UnsupportedBeforeCursor" => :bad_request,
53
53
  "Graphiti::Errors::UnsupportedPagination" => :bad_request,
54
54
  "Graphiti::Errors::FilterGroupMissingRequiredFilters" => :bad_request,
55
+ "Graphiti::Errors::UnknownAttribute" => :bad_request,
56
+ "Graphiti::Errors::InvalidAttributeAccess" => :bad_request,
55
57
  "Graphiti::Errors::RecordNotFound" => :not_found,
56
58
  "Graphiti::Errors::ConflictRequest" => :conflict
57
59
  }.freeze
@@ -125,6 +125,7 @@ module Graphiti
125
125
  scope = @scope.unpaginated_object
126
126
  if resource.adapter.can_group?
127
127
  if (group = @query.hash[:stats].delete(:group_by))
128
+ resource.get_attr!(group[0], :readable, request: true)
128
129
  scope = resource.adapter.group(scope, group[0])
129
130
  end
130
131
  end
@@ -1,3 +1,3 @@
1
1
  module Graphiti
2
- VERSION = "2.0.1"
2
+ VERSION = "2.0.2"
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: 2.0.1
4
+ version: 2.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lee Richmond