graphql-client 0.0.4 → 0.0.5
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f327b5063c82073f7208c75d7a8e178694b67ce5
|
4
|
+
data.tar.gz: 2fba5fd397e36ff3f3cd81cc1515a9dd2573476a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 55bf804e30c3d080d899d49c2016aab6932699565a95d0eae7e90a16bfcd645077a179ac11c08aba366bb583b4ee7ddf73dafad57bea2c0851f081587a6a0191
|
7
|
+
data.tar.gz: f1fe23003faefe5a176c696cfe6fb68b63cb2edc6c0c14bfb65ffb12c823943e4518bffb39b718d5f04270f3f8e8be224280a4990e3e527212b83ba83dcee97c
|
@@ -90,6 +90,18 @@ module GraphQL
|
|
90
90
|
end
|
91
91
|
end
|
92
92
|
|
93
|
+
def self.|(other)
|
94
|
+
new_fields = self.fields.dup
|
95
|
+
other.fields.each do |name, value|
|
96
|
+
if new_fields[name]
|
97
|
+
new_fields[name] |= value
|
98
|
+
else
|
99
|
+
new_fields[name] = value
|
100
|
+
end
|
101
|
+
end
|
102
|
+
define(fields: new_fields)
|
103
|
+
end
|
104
|
+
|
93
105
|
attr_reader :data
|
94
106
|
alias_method :to_h, :data
|
95
107
|
|
@@ -25,11 +25,12 @@ module GraphQL
|
|
25
25
|
self.selections.inject({}) do |h, selection|
|
26
26
|
case selection
|
27
27
|
when Selection
|
28
|
-
if shadow.include?(selection)
|
29
|
-
|
30
|
-
|
31
|
-
|
28
|
+
if !shadow.include?(selection)
|
29
|
+
selection.selection_query_result_classes(shadow: shadow, **kargs).each do |name, klass|
|
30
|
+
h[name] ? h[name] |= klass : h[name] = klass
|
31
|
+
end
|
32
32
|
end
|
33
|
+
h
|
33
34
|
else
|
34
35
|
raise TypeError, "expected selection to be of type Selection, but was #{selection.class}"
|
35
36
|
end
|