graphql_grpc 0.1.7 → 0.1.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.gitignore +1 -0
- data/Guardfile +1 -1
- data/lib/graphql_grpc/resolver.rb +5 -1
- data/lib/graphql_grpc/schema.rb +2 -1
- data/lib/graphql_grpc/version.rb +1 -1
- metadata +3 -5
- data/Gemfile.lock +0 -167
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 9b55859c768e366b0db45e4df7c81bd16921b219493995ebfe5d7345220db240
|
4
|
+
data.tar.gz: 98576c693daaae01f1ec1bdde5e2596c1bd456fbd5b25db56e545ebb0e7bffcc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 319343686545bfe90899e076fed025f07da73c3b2517a3f919dc899f8f1d55eb7c3bc874b945c13ee81272366325646781ae677677a24646d9f795badf8ca912
|
7
|
+
data.tar.gz: 61ef9ae690a6806b0aed52fb86cf2f91700a083b227688fd40eee3ec0df7a6ee2c1544d1cd038d4f5e9858632d4e5741d2157b77e549ab38bd8cda0b4ac1b170
|
data/.gitignore
CHANGED
data/Guardfile
CHANGED
@@ -64,7 +64,7 @@ guard :rspec, cmd: 'bundle exec rspec' do
|
|
64
64
|
watch(rails.view_dirs) { |m| rspec.spec.call("features/#{m[1]}") }
|
65
65
|
watch(rails.layouts) { |m| rspec.spec.call("features/#{m[1]}") }
|
66
66
|
|
67
|
-
watch(%r{^lib/graphql_grpc
|
67
|
+
watch(%r{^lib/graphql_grpc/**/(.+)\.rb}) { |_m| rspec.spec.call('graphql_grpc') }
|
68
68
|
watch(%r{^doc/(.+)}) { |_m| rspec.spec.call('graphql_grpc') }
|
69
69
|
|
70
70
|
# Turnip features and steps
|
@@ -9,7 +9,11 @@ module GraphqlGrpc
|
|
9
9
|
def call(_type, field, obj, args, ctx)
|
10
10
|
if obj
|
11
11
|
field_sym = field.name.to_sym
|
12
|
-
value = obj.try(field_sym) || obj[field_sym]
|
12
|
+
value = obj.try(field_sym) || obj[field_sym.to_s] || begin
|
13
|
+
obj[field_sym]
|
14
|
+
rescue TypeError => e
|
15
|
+
nil
|
16
|
+
end
|
13
17
|
return value.is_a?(Symbol) ? value.to_s : value
|
14
18
|
end
|
15
19
|
proxy.invoke(field, args, ctx)
|
data/lib/graphql_grpc/schema.rb
CHANGED
@@ -26,9 +26,10 @@ module GraphqlGrpc
|
|
26
26
|
# :nodoc:
|
27
27
|
module Schema
|
28
28
|
# TODO: Find better way to detect queries
|
29
|
-
# Currently look for methods named 'get' or with no args
|
29
|
+
# Currently look for methods named 'get', 'find' or with no args
|
30
30
|
def query?(name_sym, rpc_desc)
|
31
31
|
name_sym.to_s.start_with?('get') ||
|
32
|
+
name_sym.to_s.start_with?('find') ||
|
32
33
|
rpc_desc.rpc_desc.input == Google::Protobuf::Empty
|
33
34
|
end
|
34
35
|
|
data/lib/graphql_grpc/version.rb
CHANGED
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.
|
4
|
+
version: 0.1.8
|
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: 2019-
|
12
|
+
date: 2019-06-20 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|
@@ -177,7 +177,6 @@ files:
|
|
177
177
|
- ".rubocop.yml"
|
178
178
|
- ".rubocop_todo.yml"
|
179
179
|
- Gemfile
|
180
|
-
- Gemfile.lock
|
181
180
|
- Guardfile
|
182
181
|
- LICENSE
|
183
182
|
- README.md
|
@@ -214,8 +213,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
214
213
|
- !ruby/object:Gem::Version
|
215
214
|
version: '0'
|
216
215
|
requirements: []
|
217
|
-
|
218
|
-
rubygems_version: 2.5.1
|
216
|
+
rubygems_version: 3.0.3
|
219
217
|
signing_key:
|
220
218
|
specification_version: 4
|
221
219
|
summary: Gem for building GraphQL-to-gRPC gateways (usually using Ruby on Rails).
|
data/Gemfile.lock
DELETED
@@ -1,167 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
graphql_grpc (0.1.7)
|
5
|
-
activesupport
|
6
|
-
graphql
|
7
|
-
grpc
|
8
|
-
|
9
|
-
GEM
|
10
|
-
remote: https://rubygems.org/
|
11
|
-
specs:
|
12
|
-
activesupport (5.2.1)
|
13
|
-
concurrent-ruby (~> 1.0, >= 1.0.2)
|
14
|
-
i18n (>= 0.7, < 2)
|
15
|
-
minitest (~> 5.1)
|
16
|
-
tzinfo (~> 1.1)
|
17
|
-
addressable (2.5.2)
|
18
|
-
public_suffix (>= 2.0.2, < 4.0)
|
19
|
-
ast (2.4.0)
|
20
|
-
bombshell (0.1.6)
|
21
|
-
byebug (10.0.2)
|
22
|
-
coderay (1.1.2)
|
23
|
-
concurrent-ruby (1.1.4)
|
24
|
-
diff-lcs (1.3)
|
25
|
-
faraday (0.15.3)
|
26
|
-
multipart-post (>= 1.2, < 3)
|
27
|
-
ffi (1.9.25)
|
28
|
-
formatador (0.2.5)
|
29
|
-
google-protobuf (3.6.1)
|
30
|
-
googleapis-common-protos-types (1.0.2)
|
31
|
-
google-protobuf (~> 3.0)
|
32
|
-
googleauth (0.6.7)
|
33
|
-
faraday (~> 0.12)
|
34
|
-
jwt (>= 1.4, < 3.0)
|
35
|
-
memoist (~> 0.16)
|
36
|
-
multi_json (~> 1.11)
|
37
|
-
os (>= 0.9, < 2.0)
|
38
|
-
signet (~> 0.7)
|
39
|
-
graphql (1.8.11)
|
40
|
-
grpc (1.12.0)
|
41
|
-
google-protobuf (~> 3.1)
|
42
|
-
googleapis-common-protos-types (~> 1.0.0)
|
43
|
-
googleauth (>= 0.5.1, < 0.7)
|
44
|
-
guard (2.14.2)
|
45
|
-
formatador (>= 0.2.4)
|
46
|
-
listen (>= 2.7, < 4.0)
|
47
|
-
lumberjack (>= 1.0.12, < 2.0)
|
48
|
-
nenv (~> 0.1)
|
49
|
-
notiffany (~> 0.0)
|
50
|
-
pry (>= 0.9.12)
|
51
|
-
shellany (~> 0.0)
|
52
|
-
thor (>= 0.18.1)
|
53
|
-
guard-bundler (2.1.0)
|
54
|
-
bundler (~> 1.0)
|
55
|
-
guard (~> 2.2)
|
56
|
-
guard-compat (~> 1.1)
|
57
|
-
guard-compat (1.2.1)
|
58
|
-
guard-rspec (4.7.3)
|
59
|
-
guard (~> 2.1)
|
60
|
-
guard-compat (~> 1.1)
|
61
|
-
rspec (>= 2.99.0, < 4.0)
|
62
|
-
i18n (1.3.0)
|
63
|
-
concurrent-ruby (~> 1.0)
|
64
|
-
jaro_winkler (1.5.1)
|
65
|
-
json-schema (2.8.1)
|
66
|
-
addressable (>= 2.4)
|
67
|
-
jwt (2.1.0)
|
68
|
-
listen (3.1.5)
|
69
|
-
rb-fsevent (~> 0.9, >= 0.9.4)
|
70
|
-
rb-inotify (~> 0.9, >= 0.9.7)
|
71
|
-
ruby_dep (~> 1.2)
|
72
|
-
lumberjack (1.0.13)
|
73
|
-
memoist (0.16.0)
|
74
|
-
method_source (0.9.1)
|
75
|
-
minitest (5.11.3)
|
76
|
-
multi_json (1.13.1)
|
77
|
-
multipart-post (2.0.0)
|
78
|
-
mustermann (1.0.3)
|
79
|
-
nenv (0.3.0)
|
80
|
-
notiffany (0.1.1)
|
81
|
-
nenv (~> 0.1)
|
82
|
-
shellany (~> 0.0)
|
83
|
-
os (1.0.0)
|
84
|
-
parallel (1.12.1)
|
85
|
-
parser (2.5.3.0)
|
86
|
-
ast (~> 2.4.0)
|
87
|
-
powerpack (0.1.2)
|
88
|
-
pry (0.12.0)
|
89
|
-
coderay (~> 1.1.0)
|
90
|
-
method_source (~> 0.9.0)
|
91
|
-
pry-byebug (3.6.0)
|
92
|
-
byebug (~> 10.0)
|
93
|
-
pry (~> 0.10)
|
94
|
-
public_suffix (3.0.3)
|
95
|
-
rack (2.0.6)
|
96
|
-
rack-protection (2.0.4)
|
97
|
-
rack
|
98
|
-
rainbow (3.0.0)
|
99
|
-
rake (10.5.0)
|
100
|
-
rb-fsevent (0.10.3)
|
101
|
-
rb-inotify (0.9.10)
|
102
|
-
ffi (>= 0.5.0, < 2)
|
103
|
-
rspec (3.8.0)
|
104
|
-
rspec-core (~> 3.8.0)
|
105
|
-
rspec-expectations (~> 3.8.0)
|
106
|
-
rspec-mocks (~> 3.8.0)
|
107
|
-
rspec-core (3.8.0)
|
108
|
-
rspec-support (~> 3.8.0)
|
109
|
-
rspec-expectations (3.8.2)
|
110
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
111
|
-
rspec-support (~> 3.8.0)
|
112
|
-
rspec-mocks (3.8.0)
|
113
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
114
|
-
rspec-support (~> 3.8.0)
|
115
|
-
rspec-support (3.8.0)
|
116
|
-
rubocop (0.60.0)
|
117
|
-
jaro_winkler (~> 1.5.1)
|
118
|
-
parallel (~> 1.10)
|
119
|
-
parser (>= 2.5, != 2.5.1.1)
|
120
|
-
powerpack (~> 0.1)
|
121
|
-
rainbow (>= 2.2.2, < 4.0)
|
122
|
-
ruby-progressbar (~> 1.7)
|
123
|
-
unicode-display_width (~> 1.4.0)
|
124
|
-
ruby-progressbar (1.10.0)
|
125
|
-
ruby_dep (1.5.0)
|
126
|
-
ruby_robot (0.1.10)
|
127
|
-
bombshell
|
128
|
-
bundler (~> 1.16)
|
129
|
-
grpc
|
130
|
-
json-schema
|
131
|
-
sinatra (~> 2.0)
|
132
|
-
wirble
|
133
|
-
shellany (0.0.1)
|
134
|
-
signet (0.11.0)
|
135
|
-
addressable (~> 2.3)
|
136
|
-
faraday (~> 0.9)
|
137
|
-
jwt (>= 1.5, < 3.0)
|
138
|
-
multi_json (~> 1.10)
|
139
|
-
sinatra (2.0.4)
|
140
|
-
mustermann (~> 1.0)
|
141
|
-
rack (~> 2.0)
|
142
|
-
rack-protection (= 2.0.4)
|
143
|
-
tilt (~> 2.0)
|
144
|
-
thor (0.20.0)
|
145
|
-
thread_safe (0.3.6)
|
146
|
-
tilt (2.0.8)
|
147
|
-
tzinfo (1.2.5)
|
148
|
-
thread_safe (~> 0.1)
|
149
|
-
unicode-display_width (1.4.0)
|
150
|
-
wirble (0.1.3)
|
151
|
-
|
152
|
-
PLATFORMS
|
153
|
-
ruby
|
154
|
-
|
155
|
-
DEPENDENCIES
|
156
|
-
bundler (~> 1.16)
|
157
|
-
graphql_grpc!
|
158
|
-
guard-bundler
|
159
|
-
guard-rspec
|
160
|
-
pry-byebug
|
161
|
-
rake (~> 10.0)
|
162
|
-
rubocop
|
163
|
-
ruby_robot
|
164
|
-
wirble
|
165
|
-
|
166
|
-
BUNDLED WITH
|
167
|
-
1.17.3
|