activegraphql 0.4.2 → 0.4.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/activegraphql/query.rb +12 -1
- data/lib/activegraphql/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ab84b9f3584d4df9c5853fa08e269ad644f348fb
|
4
|
+
data.tar.gz: 17651f7849934be016f8957692fe0a29625d25e7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7bee9a23c0fae2cf78f79ae6d874a67c7d693aba2267a3783ebe75e3dc7a739dd65a741146d4d657e192f081e8cb61b768ebf6c2295f455ee172dd05baf3bd55
|
7
|
+
data.tar.gz: 1104aabae41cda5282cf92d678849d57611e947b9ba17bf59d7e5e6d7956bec7de8ee5115f3b845d3810f124c07ef86835dbc526988a4c87ead5e3bd9f13cac6
|
data/lib/activegraphql/query.rb
CHANGED
@@ -64,12 +64,23 @@ module ActiveGraphQL
|
|
64
64
|
return if params.blank?
|
65
65
|
|
66
66
|
param_strings = params.map do |k, v|
|
67
|
-
"#{k.to_s.camelize(:lower)}:
|
67
|
+
"#{k.to_s.camelize(:lower)}: #{qargument(v)}"
|
68
68
|
end
|
69
69
|
|
70
70
|
param_strings.join(', ')
|
71
71
|
end
|
72
72
|
|
73
|
+
def qargument(value)
|
74
|
+
case value
|
75
|
+
when Array
|
76
|
+
"[#{value.map{ |v| qargument(v) }.join(', ')}]"
|
77
|
+
when String
|
78
|
+
"\"#{value}\""
|
79
|
+
else
|
80
|
+
value.to_s
|
81
|
+
end
|
82
|
+
end
|
83
|
+
|
73
84
|
def qgraph(graph)
|
74
85
|
graph_strings = graph.map do |item|
|
75
86
|
case item
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activegraphql
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Wakoopa
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-06-
|
11
|
+
date: 2017-06-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|