graphiti-activegraph 0.1.7 → 0.1.8
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 27f568c2558fd90927efbdfe9a027deaec2bbfa78e4661cef40e3cfd69513580
|
4
|
+
data.tar.gz: 9601ee6142701b1a412b3c93975b97877fec63e8ab11cc1d4fc327837ef580eb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e8f536280c38952208a5e5c1d4355799b9e8fe46dfaf14f83678031cf6d23149341093860d7fb822cf23daad5658bf07561daa547e23befb5fab253b76219c8f
|
7
|
+
data.tar.gz: 760b8d94785cdae51b83c7604ee4a5cadc4c8c88a9c7704a33466f86de2965634a68d0aaf792d403ff418f5ecfca9f8dbac69089afba42151fd98ff4fa7088a6
|
data/CHANGELOG.md
CHANGED
@@ -4,7 +4,9 @@ module Graphiti::ActiveGraph
|
|
4
4
|
def self.sideloading_classes
|
5
5
|
{
|
6
6
|
has_many: Graphiti::ActiveGraph::Adapters::ActiveGraph::HasManySideload,
|
7
|
-
has_one: Graphiti::ActiveGraph::Adapters::ActiveGraph::HasOneSideload
|
7
|
+
has_one: Graphiti::ActiveGraph::Adapters::ActiveGraph::HasOneSideload,
|
8
|
+
polymorphic_belongs_to: Graphiti::ActiveGraph::Adapters::ActiveGraph::PolymorphicBelongsTo,
|
9
|
+
belongs_to: Graphiti::ActiveGraph::Adapters::ActiveGraph::HasOneSideload,
|
8
10
|
}
|
9
11
|
end
|
10
12
|
|
@@ -0,0 +1,15 @@
|
|
1
|
+
class Graphiti::ActiveGraph::Adapters::ActiveGraph::PolymorphicBelongsTo < Graphiti::Sideload::PolymorphicBelongsTo
|
2
|
+
include Graphiti::ActiveGraph::Adapters::ActiveGraph::Sideload
|
3
|
+
|
4
|
+
def default_base_scope
|
5
|
+
resource_class.model.all
|
6
|
+
end
|
7
|
+
|
8
|
+
def infer_foreign_key
|
9
|
+
association_name.to_sym
|
10
|
+
end
|
11
|
+
|
12
|
+
def default_value_when_empty
|
13
|
+
nil
|
14
|
+
end
|
15
|
+
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.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hardik Joshi
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-06-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: graphiti
|
@@ -196,6 +196,7 @@ files:
|
|
196
196
|
- lib/graphiti/active_graph/adapters/active_graph.rb
|
197
197
|
- lib/graphiti/active_graph/adapters/active_graph/has_many_sideload.rb
|
198
198
|
- lib/graphiti/active_graph/adapters/active_graph/has_one_sideload.rb
|
199
|
+
- lib/graphiti/active_graph/adapters/active_graph/polymorphic_belongs_to.rb
|
199
200
|
- lib/graphiti/active_graph/adapters/active_graph/sideload.rb
|
200
201
|
- lib/graphiti/active_graph/deserializer.rb
|
201
202
|
- lib/graphiti/active_graph/query.rb
|