graphiti_gql 0.2.6 → 0.2.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/probots.yml +2 -0
- data/lib/graphiti_gql/active_resource.rb +6 -3
- data/lib/graphiti_gql/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d38c8d27dc214efd323ee98932bcb858bca8553e45c5e4428858b3b5503db44d
|
4
|
+
data.tar.gz: ae38e08ba55f6c38b464ed9a3cbd592394568c080aac2361d0549adea259b9fe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d50257d774787869a18187e76e924503fb34dfad8c4d93fd73d99289fc203626d120585448bc646175cb9ff80e607df5c374a6207a95732aeccedb2d20ea9d39
|
7
|
+
data.tar.gz: e1f1ff11574682dd8946907f2e76e3b9279c08039e29e4bc1f53436f184c1e6bd0e04f2ef52f391526abd1d837ef6a9dbd3f1a8a617528ee90942857b66d9706
|
data/.github/probots.yml
ADDED
@@ -17,6 +17,8 @@ module GraphitiGql
|
|
17
17
|
Node.new(edge.except(:node).merge(node_id: node_id))
|
18
18
|
end
|
19
19
|
hash[key] = value[:edges].map { |v| Node.new(v[:node], sideload.resource.class) }
|
20
|
+
elsif value.key?(:nodes)
|
21
|
+
hash[key] = value[:nodes].map { |n| Node.new(n, sideload.resource.class) }
|
20
22
|
else
|
21
23
|
hash[key] = Node.new(value, sideload.resource.class)
|
22
24
|
end
|
@@ -115,8 +117,9 @@ module GraphitiGql
|
|
115
117
|
return @query if @query
|
116
118
|
|
117
119
|
name = Schema.registry.key_for(@resource)
|
118
|
-
filter_bang = "!" if @resource.filters.values.any? { |f| f[:required] }
|
119
120
|
sortvar = "$sort: [#{name}Sort!]," if @resource.sorts.any?
|
121
|
+
filter_bang = "!" if @resource.filters.values.any? { |f| f[:required] }
|
122
|
+
filtervar = "$filter: #{name}Filter#{filter_bang}," if @resource.filters.any?
|
120
123
|
|
121
124
|
if !(fields = @params[:fields])
|
122
125
|
fields = []
|
@@ -127,7 +130,7 @@ module GraphitiGql
|
|
127
130
|
|
128
131
|
q = %|
|
129
132
|
query #{name} (
|
130
|
-
|
133
|
+
#{filtervar}
|
131
134
|
#{sortvar}
|
132
135
|
$first: Int,
|
133
136
|
$last: Int,
|
@@ -135,7 +138,7 @@ module GraphitiGql
|
|
135
138
|
$after: String,
|
136
139
|
) {
|
137
140
|
#{@resource.graphql_entrypoint} (
|
138
|
-
filter: $filter,
|
141
|
+
#{ 'filter: $filter,' if filtervar }
|
139
142
|
#{ 'sort: $sort,' if sortvar }
|
140
143
|
first: $first,
|
141
144
|
last: $last,
|
data/lib/graphiti_gql/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: graphiti_gql
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lee Richmond
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-07-
|
11
|
+
date: 2022-07-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: graphql
|
@@ -115,6 +115,7 @@ executables: []
|
|
115
115
|
extensions: []
|
116
116
|
extra_rdoc_files: []
|
117
117
|
files:
|
118
|
+
- ".github/probots.yml"
|
118
119
|
- ".gitignore"
|
119
120
|
- ".rspec"
|
120
121
|
- ".travis.yml"
|