graphiti_graphql 0.1.14 → 0.1.17
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +11 -11
- data/README.md +2 -0
- data/lib/graphiti_graphql/engine.rb +11 -9
- data/lib/graphiti_graphql/runner.rb +3 -3
- data/lib/graphiti_graphql/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 49e4ed0eddc59317af012abe48c74dfdd76eb9d62c4d39db10c35182cd483eed
|
4
|
+
data.tar.gz: 4dd34829225d165bf1222a1ce75f052dc8aad990b949909a96c4fc1f96d9df14
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 29c21714fe8d1e488315ab4d184eafe9a70f40360b57c8f455e972536f52949e2197461f10cc1d91cd627ef2cc270c3dbc0a4c6e30efc8708d666ef9fcd5b7a5
|
7
|
+
data.tar.gz: 7a14fa1c503cc31d05eb1082286689009de08c9d7fbc156e6813dc8d447fcbe34eba5360939c82682cca760dfe42d08331c1a25da4e6af5e76af689567d087df
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
graphiti_graphql (0.1.
|
4
|
+
graphiti_graphql (0.1.15)
|
5
5
|
activesupport (>= 4.1)
|
6
6
|
graphiti (~> 1.3)
|
7
7
|
graphql (~> 1.12)
|
@@ -23,14 +23,14 @@ GEM
|
|
23
23
|
ast (2.4.2)
|
24
24
|
byebug (11.1.3)
|
25
25
|
coderay (1.1.3)
|
26
|
-
concurrent-ruby (1.1.
|
26
|
+
concurrent-ruby (1.1.10)
|
27
27
|
diff-lcs (1.4.4)
|
28
|
-
dry-configurable (0.
|
28
|
+
dry-configurable (0.15.0)
|
29
29
|
concurrent-ruby (~> 1.0)
|
30
|
-
dry-core (~> 0.
|
31
|
-
dry-container (0.
|
30
|
+
dry-core (~> 0.6)
|
31
|
+
dry-container (0.9.0)
|
32
32
|
concurrent-ruby (~> 1.0)
|
33
|
-
dry-configurable (~> 0.
|
33
|
+
dry-configurable (~> 0.13, >= 0.13.0)
|
34
34
|
dry-core (0.7.1)
|
35
35
|
concurrent-ruby (~> 1.0)
|
36
36
|
dry-inflector (0.2.1)
|
@@ -44,8 +44,8 @@ GEM
|
|
44
44
|
dry-inflector (~> 0.1, >= 0.1.2)
|
45
45
|
dry-logic (~> 1.0, >= 1.0.2)
|
46
46
|
google-protobuf (3.17.3)
|
47
|
-
graphiti (1.3.
|
48
|
-
activesupport (>=
|
47
|
+
graphiti (1.3.7)
|
48
|
+
activesupport (>= 5.2)
|
49
49
|
concurrent-ruby (~> 1.0)
|
50
50
|
dry-types (>= 0.15.0, < 2.0)
|
51
51
|
graphiti_errors (~> 1.1.0)
|
@@ -60,13 +60,13 @@ GEM
|
|
60
60
|
graphql-batch (0.4.3)
|
61
61
|
graphql (>= 1.3, < 2)
|
62
62
|
promise.rb (~> 0.7.2)
|
63
|
-
i18n (1.
|
63
|
+
i18n (1.10.0)
|
64
64
|
concurrent-ruby (~> 1.0)
|
65
65
|
jsonapi-renderer (0.2.2)
|
66
66
|
jsonapi-serializable (0.3.1)
|
67
67
|
jsonapi-renderer (~> 0.2.0)
|
68
68
|
method_source (1.0.0)
|
69
|
-
minitest (5.
|
69
|
+
minitest (5.15.0)
|
70
70
|
parallel (1.20.1)
|
71
71
|
parser (3.0.2.0)
|
72
72
|
ast (~> 2.4.1)
|
@@ -117,7 +117,7 @@ GEM
|
|
117
117
|
tzinfo (2.0.4)
|
118
118
|
concurrent-ruby (~> 1.0)
|
119
119
|
unicode-display_width (2.0.0)
|
120
|
-
zeitwerk (2.4
|
120
|
+
zeitwerk (2.5.4)
|
121
121
|
|
122
122
|
PLATFORMS
|
123
123
|
ruby
|
data/README.md
CHANGED
@@ -21,7 +21,8 @@ module GraphitiGraphQL
|
|
21
21
|
case Rails::VERSION::MAJOR
|
22
22
|
when 4 then ActionDispatch::Reloader
|
23
23
|
when 5 then ActiveSupport::Reloader
|
24
|
-
|
24
|
+
else
|
25
|
+
::Rails.application.reloader
|
25
26
|
end
|
26
27
|
end
|
27
28
|
|
@@ -64,15 +65,16 @@ module GraphitiGraphQL
|
|
64
65
|
end
|
65
66
|
|
66
67
|
initializer "graphiti_graphql.define_controller" do
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
68
|
+
require "#{Rails.root}/app/controllers/application_controller"
|
69
|
+
app_controller = GraphitiGraphQL.config.federation_application_controller || ::ApplicationController
|
70
|
+
# rubocop:disable Lint/ConstantDefinitionInBlock(Standard)
|
71
|
+
class GraphitiGraphQL::ExecutionController < app_controller
|
72
|
+
register_exception Graphiti::Errors::UnreadableAttribute, message: true
|
73
|
+
def execute
|
74
|
+
params = request.params # avoid strong_parameters
|
75
|
+
render json: Graphiti.gql(params[:query], params[:variables])
|
75
76
|
end
|
77
|
+
end
|
76
78
|
end
|
77
79
|
|
78
80
|
initializer "graphiti_graphql.federation" do
|
@@ -326,13 +326,13 @@ module GraphitiGraphQL
|
|
326
326
|
end
|
327
327
|
|
328
328
|
def gather_stats(params, selection, variable_hash, chained_name = nil)
|
329
|
-
stats = selection.children.find { |c| c.name == "stats" }
|
330
|
-
nodes = selection.children.find { |c| c.name == "nodes" }
|
329
|
+
stats = selection.children.find { |c| c.respond_to?(:name) && c.name == "stats" }
|
330
|
+
nodes = selection.children.find { |c| c.respond_to?(:name) && c.name == "nodes" }
|
331
331
|
|
332
332
|
if stats
|
333
333
|
stat_param = {}
|
334
334
|
stats.children.each do |stat_node|
|
335
|
-
stat_name = stat_node.name
|
335
|
+
stat_name = stat_node.name.underscore
|
336
336
|
calculations = stat_node.children.map(&:name)
|
337
337
|
stat_param[stat_name.to_sym] = calculations.join(",")
|
338
338
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: graphiti_graphql
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.17
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lee Richmond
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-04-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: graphiti
|
@@ -259,7 +259,7 @@ homepage: https://www.graphiti.dev
|
|
259
259
|
licenses: []
|
260
260
|
metadata:
|
261
261
|
homepage_uri: https://www.graphiti.dev
|
262
|
-
post_install_message:
|
262
|
+
post_install_message:
|
263
263
|
rdoc_options: []
|
264
264
|
require_paths:
|
265
265
|
- lib
|
@@ -274,8 +274,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
274
274
|
- !ruby/object:Gem::Version
|
275
275
|
version: '0'
|
276
276
|
requirements: []
|
277
|
-
rubygems_version: 3.
|
278
|
-
signing_key:
|
277
|
+
rubygems_version: 3.0.3.1
|
278
|
+
signing_key:
|
279
279
|
specification_version: 4
|
280
280
|
summary: GraphQL support for Graphiti
|
281
281
|
test_files: []
|