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 +4 -4
- data/.github/workflows/specs.yml +1 -1
- data/CHANGELOG.md +6 -0
- data/lib/graphiti/active_graph/resource.rb +1 -1
- data/lib/graphiti/active_graph/resource_proxy.rb +1 -1
- data/lib/graphiti/active_graph/sideload_resolve.rb +13 -0
- data/lib/graphiti/active_graph/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 19fc48bd574a47fdfb5d601d9781a70eab34e3acf7cb62a45143d9a99119feb2
|
4
|
+
data.tar.gz: 797493838affaa7c58e0ee8c03f50b17f37e8e443c4226b0948bdde4f03f020b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b9825c5451ec0acdc0e5f94ee5fce3a13b4809b713e7ef2daaec506bedb73fe8b7a5ec70e70126e1cc54cb71cea28726a1c4b5f3bcae440118a3c76c8d49a4a5
|
7
|
+
data.tar.gz: b33db9527095d1c8c14d1706b37af78839bce57b3d90f4c27e01b161b0ee8161493a188d3b7294859aec85d948db310390105b22cdc93b44128e6021de4a87bc
|
data/.github/workflows/specs.yml
CHANGED
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
|
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.
|
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
|
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.
|
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-
|
11
|
+
date: 2023-09-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: graphiti
|