graphiti-activegraph 0.1.21 → 0.1.22

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 05a0cd339d014d767bb018fde55850dc4c76f745c506abaa41856ef6367bbb53
4
- data.tar.gz: c8afa746774f0b9f16fc10922147d77463cb7701a0a7b1bde67e2b3dd0a2dfdb
3
+ metadata.gz: 19fc48bd574a47fdfb5d601d9781a70eab34e3acf7cb62a45143d9a99119feb2
4
+ data.tar.gz: 797493838affaa7c58e0ee8c03f50b17f37e8e443c4226b0948bdde4f03f020b
5
5
  SHA512:
6
- metadata.gz: 6cb9d79832cecdd55cf598894d237e02bf658b360bf1df6a8ab30f5530acdd6a884b86ae5017ff9b8be77d2676782a431dfca56cf1d387aa78fd908efad19a6c
7
- data.tar.gz: 0a5ab406666834ba416358d9630956319773cf2bec4be1c8c596c8a1222cf51787cd9f3b98f7b047d95ada4189bd4455787d0ccc30c180540b1988080577b74e
6
+ metadata.gz: b9825c5451ec0acdc0e5f94ee5fce3a13b4809b713e7ef2daaec506bedb73fe8b7a5ec70e70126e1cc54cb71cea28726a1c4b5f3bcae440118a3c76c8d49a4a5
7
+ data.tar.gz: b33db9527095d1c8c14d1706b37af78839bce57b3d90f4c27e01b161b0ee8161493a188d3b7294859aec85d948db310390105b22cdc93b44128e6021de4a87bc
@@ -18,7 +18,7 @@ jobs:
18
18
  strategy:
19
19
  fail-fast: false
20
20
  matrix:
21
- ruby-version: [ jruby-9.4.1.0, ruby ]
21
+ ruby-version: [ jruby-9.4.3.0, ruby ]
22
22
 
23
23
  steps:
24
24
  - uses: actions/checkout@v3
data/CHANGELOG.md CHANGED
@@ -38,6 +38,12 @@ Fixes:
38
38
 
39
39
  - Runner#proxy keyword arguments
40
40
 
41
+ ## 0.1.22
42
+
43
+ Fixes:
44
+
45
+ - when rendering preloaded resources, we were not applying scoping. Now we are skipping around_scoping callback too.
46
+
41
47
  <!-- ### [version (DD-MM-YYYY)] -->
42
48
  <!-- Breaking changes:-->
43
49
  <!-- Features:-->
@@ -14,7 +14,7 @@ module Graphiti
14
14
  params[:filter] ||= {}
15
15
  params[:filter][:id] = id if id
16
16
 
17
- build(params, nil, raise_on_missing: false, preloaded: obj, bypass_required_filters: true)
17
+ build(params, nil, raise_on_missing: false, preloaded: obj)
18
18
  end
19
19
 
20
20
  def all_with_preloaded(obj_arr, params)
@@ -40,7 +40,7 @@ module Graphiti::ActiveGraph
40
40
  end
41
41
 
42
42
  def stats
43
- @stats ||= if @query.hash[:stats] && !resource.relation_resource?
43
+ @stats ||= if @query.stats && !resource.relation_resource?
44
44
  payload = ::Graphiti::Stats::Payload.new @resource,
45
45
  @query,
46
46
  @scope.unpaginated_object,
@@ -1,5 +1,18 @@
1
1
  module Graphiti::ActiveGraph
2
2
  module SideloadResolve
3
+ def initialize(object, resource, query, opts = {})
4
+ @object = object
5
+ @resource = resource
6
+ @query = query
7
+ @opts = opts
8
+ @unpaginated_object = opts[:unpaginated_query].presence || @object
9
+
10
+ return if opts[:preloaded]
11
+ @object = @resource.around_scoping(@object, @query.hash) { |scope|
12
+ apply_scoping(scope, opts)
13
+ }
14
+ end
15
+
3
16
  def resolve_sideloads(parents)
4
17
  end
5
18
  end
@@ -1,5 +1,5 @@
1
1
  module Graphiti
2
2
  module ActiveGraph
3
- VERSION = '0.1.21'
3
+ VERSION = '0.1.22'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: graphiti-activegraph
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.21
4
+ version: 0.1.22
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hardik Joshi
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-02-12 00:00:00.000000000 Z
11
+ date: 2023-09-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: graphiti