activecube-graphql 0.1.17 → 0.1.18
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +4 -4
- data/lib/activecube/graphql/parse_tree.rb +19 -2
- data/lib/activecube/graphql/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: e0a0c3d679275e13036022bd91bc90e45b4ccc5377dbaa5415ad51342bb71d05
|
4
|
+
data.tar.gz: 7e8ee20d8897e6f95cbff7b30ee5b636f9d0e312c0d4c9d70b2975021a2437e1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c403314bb0f2a551eec6f5bb33838d94e800863894e722500ee807606710e3ed78fda64e8db30f466b20657c4b67924efb07a2498018b6c5007e4ff3504191be
|
7
|
+
data.tar.gz: 120af633c5a5dc2de1e0e14d6f2a12fd3858e3a08cb1452c0c3398dc235e7e837cd90b8c00c438079155646e3d0917b1951e14a95d658f5b87944fcbc60f4d83
|
data/Gemfile.lock
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
activecube-graphql (0.1.
|
5
|
-
activecube (~> 0.1.
|
4
|
+
activecube-graphql (0.1.17)
|
5
|
+
activecube (~> 0.1.28)
|
6
6
|
graphql (~> 1.10)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
10
10
|
specs:
|
11
|
-
activecube (0.1.
|
11
|
+
activecube (0.1.29)
|
12
12
|
activerecord (>= 5.2)
|
13
13
|
activemodel (6.0.3.1)
|
14
14
|
activesupport (= 6.0.3.1)
|
@@ -44,7 +44,7 @@ GEM
|
|
44
44
|
thread_safe (0.3.6)
|
45
45
|
tzinfo (1.2.7)
|
46
46
|
thread_safe (~> 0.1)
|
47
|
-
zeitwerk (2.4.
|
47
|
+
zeitwerk (2.4.1)
|
48
48
|
|
49
49
|
PLATFORMS
|
50
50
|
ruby
|
@@ -18,10 +18,11 @@ module Activecube
|
|
18
18
|
@key = parent ? (parent.key ? "#{parent.key}.#{name}" : KEY_FIELD_PREFIX+name ) : nil
|
19
19
|
|
20
20
|
@context_node = context_node
|
21
|
-
@arguments = context_node.arguments.to_h
|
22
|
-
|
23
21
|
@ast_node = context_node.ast_node
|
24
22
|
|
23
|
+
@arguments = sort_node_arguments ast_node, context_node.arguments.to_h
|
24
|
+
|
25
|
+
|
25
26
|
if parent
|
26
27
|
@definition = context_node.definitions.first.name
|
27
28
|
if parent.dimension
|
@@ -43,6 +44,22 @@ module Activecube
|
|
43
44
|
|
44
45
|
end
|
45
46
|
|
47
|
+
def sort_node_arguments ast_node, arguments
|
48
|
+
if (options = arguments['options']).kind_of?(Hash)
|
49
|
+
options_keys = context_node.ast_node.arguments.detect{|x| x.name=='options'}.value.arguments.map{|x|
|
50
|
+
x.name.underscore.to_sym
|
51
|
+
}
|
52
|
+
arguments['options'] = Hash[
|
53
|
+
options_keys.collect{|key|
|
54
|
+
raise "Unmatched key #{key}" unless options[key]
|
55
|
+
[key, options[key]]
|
56
|
+
}
|
57
|
+
|
58
|
+
]
|
59
|
+
end
|
60
|
+
arguments
|
61
|
+
end
|
62
|
+
|
46
63
|
def union?
|
47
64
|
context_node.return_type.kind_of? GraphQL::UnionType
|
48
65
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activecube-graphql
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.18
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aleksey Studnev
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-12-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activecube
|