graphiti-activegraph 0.1.20 → 0.1.22

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: 79f25c472d8becc7f194ffe8a43395e95c3419d9aa545d5cb6f6fc0f0266e1a2
4
- data.tar.gz: 9e39773e46342901adb5b47426ebfc7f28af3e50ef25966df09531a934e2dabb
3
+ metadata.gz: 19fc48bd574a47fdfb5d601d9781a70eab34e3acf7cb62a45143d9a99119feb2
4
+ data.tar.gz: 797493838affaa7c58e0ee8c03f50b17f37e8e443c4226b0948bdde4f03f020b
5
5
  SHA512:
6
- metadata.gz: b67f798771e0908d933b9dcd90ef68842e0447b16ac085e1e612b8f0b139b63b43554e73e4e5a943dcdde17aa5f23d77ebc33de6a08f75a715b426abf7eb847c
7
- data.tar.gz: a96c79383cd517a5012fcb5a4b91dce14f5555cfbcc6fcf7ff5f77ba2c390482185852b2270aab4a8ada23b73ce88583209da8594c7e0d86df506556d63b9dd2
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.3.9.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
@@ -32,6 +32,18 @@ Features:
32
32
 
33
33
  - With graphiti config variable "allow_sidepost" you can allow/disallow sideposting, by default it is allowed.
34
34
 
35
+ ## 0.1.21
36
+
37
+ Fixes:
38
+
39
+ - Runner#proxy keyword arguments
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
+
35
47
  <!-- ### [version (DD-MM-YYYY)] -->
36
48
  <!-- Breaking changes:-->
37
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,
@@ -32,7 +32,7 @@ module Graphiti::ActiveGraph
32
32
  ::Graphiti::ResourceProxy.new jsonapi_resource,
33
33
  scope,
34
34
  query,
35
- options
35
+ **options
36
36
  end
37
37
  end
38
38
  end
@@ -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.20'
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.20
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: 2022-12-10 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