graphql_grpc 0.1.5 → 0.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 86651ef5d4cf1df930ce2ad7969ec8a1efa4bb58df4a0ad52d87d70ebcfa3181
4
- data.tar.gz: 07103b09212d3a89c6c0b13e925d9f28aca57ce752b1fd5bc7de554e04767c93
3
+ metadata.gz: 593b582c7e454dbcf1849b16d5daa512c4abfa7d3d9b04d151a870725085733a
4
+ data.tar.gz: 17b255ab2f960b8ec6732896be4040284079ddf0f5d8ad8cca9b9740b418fdae
5
5
  SHA512:
6
- metadata.gz: ba420a9f79fe8fd4bd56810355d69a9b3f5ff58b62582b820b142dc6097703a98c7701677325042ee0c236a71a3324976b8c885bb3384877abd160b82077deb8
7
- data.tar.gz: 7126155980b0526133ef7d26db9e10851fb7ed28c9870f32a9ddae562fe0a8d38e6ca6ba70ee339e8650e5fdf50e7c1585e06fd3c2ddbccd1d67b41afd55b4f3
6
+ metadata.gz: c29bd0da85d80e02ad9152461751ad67f744b16b2636253d4fc13c5e8929b62b01c5a6b9964139d644ee04145d3b55ed6f3f2cb8b3360ce2be4f66813a0f763a
7
+ data.tar.gz: 2fd992ef70fa8ca9fa56bdc36795605f9fcd88a4b029bf3d1797d4add4116bb105dccb434ec612b5b536236cd32ebb673a67c793c2de28e9d0910690db866bba
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- graphql_grpc (0.1.5)
4
+ graphql_grpc (0.1.6)
5
5
  activesupport
6
6
  graphql
7
7
  grpc
@@ -32,12 +32,20 @@ module GraphqlGrpc
32
32
  rpc_desc.rpc_desc.input == Google::Protobuf::Empty
33
33
  end
34
34
 
35
+ def streaming_response?(rpc_desc)
36
+ rpc_desc&.rpc_desc&.output.class == GRPC::RpcDesc::Stream
37
+ end
38
+
35
39
  def gql_mutations
36
- @function_map.reject { |name_sym, rpc_desc| query?(name_sym, rpc_desc) }
40
+ @function_map.reject do |name_sym, rpc_desc|
41
+ query?(name_sym, rpc_desc) || streaming_response?(rpc_desc)
42
+ end
37
43
  end
38
44
 
39
45
  def gql_queries
40
- @function_map.select { |name_sym, rpc_desc| query?(name_sym, rpc_desc) }
46
+ @function_map.select do |name_sym, rpc_desc|
47
+ query?(name_sym, rpc_desc) && !streaming_response?(rpc_desc)
48
+ end
41
49
  end
42
50
 
43
51
  def to_schema_types
@@ -211,9 +211,9 @@ module GraphqlGrpc
211
211
  end
212
212
 
213
213
  def to_schema_types
214
- @descriptors.values.map do |t|
214
+ @descriptors.values.compact.map do |t|
215
215
  t.to_gql_type(type_prefix)
216
- end.compact.sort.uniq.join("\n")
216
+ end.sort.uniq.join("\n")
217
217
  end
218
218
  end
219
219
 
@@ -1,3 +1,3 @@
1
1
  module GraphqlGrpc
2
- VERSION = '0.1.5'.freeze
2
+ VERSION = '0.1.6'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: graphql_grpc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zane Claes
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2018-12-20 00:00:00.000000000 Z
12
+ date: 2019-01-08 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport