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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a0558a0d0edaf2e03b09fe28ce603afb10eb0cbd02e8aa56be43cfd1044bebab
4
- data.tar.gz: 69660d61a4191bd6428a2ad33d2f9e3e6a4227c31d4be636a6b886af543f35f3
3
+ metadata.gz: d38c8d27dc214efd323ee98932bcb858bca8553e45c5e4428858b3b5503db44d
4
+ data.tar.gz: ae38e08ba55f6c38b464ed9a3cbd592394568c080aac2361d0549adea259b9fe
5
5
  SHA512:
6
- metadata.gz: 892b44992e36645282bd7003218067d248e04ac6f440feaac137afa1449f9b01017d7bcb577bbaf3bd8dc7f1c808b7f9b6eaf6e0c4474b4f1d6910dabb49ad3e
7
- data.tar.gz: 3d29b975b6748e292e4420707c2f8e4825a8e743c197f70126863c230a22ad75f0efece663a2400704716d2c7621d8cdd90732185ee7540c317c23708004a4d0
6
+ metadata.gz: d50257d774787869a18187e76e924503fb34dfad8c4d93fd73d99289fc203626d120585448bc646175cb9ff80e607df5c374a6207a95732aeccedb2d20ea9d39
7
+ data.tar.gz: e1f1ff11574682dd8946907f2e76e3b9279c08039e29e4bc1f53436f184c1e6bd0e04f2ef52f391526abd1d837ef6a9dbd3f1a8a617528ee90942857b66d9706
@@ -0,0 +1,2 @@
1
+ enabled:
2
+ - cla
@@ -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
- $filter: #{name}Filter#{filter_bang},
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,
@@ -1,3 +1,3 @@
1
1
  module GraphitiGql
2
- VERSION = "0.2.6"
2
+ VERSION = "0.2.7"
3
3
  end
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.6
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-08 00:00:00.000000000 Z
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"