graphiti_graphql 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 +4 -4
- data/lib/graphiti_graphql/engine.rb +9 -7
- data/lib/graphiti_graphql/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 40128f0eaf0ad7859fa35c67bb73b2a2fccf51829bb3914877ce0c19730def91
|
4
|
+
data.tar.gz: 6f3fe80c618aaa093dd2daec4aa726621c32d2228bb92ddfdfd00f6a610490af
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f957bb6f2092f052d683c94008940823a29cb0a995d4741eaadbf2b87f0e3585268e01819a7fde057afd0a99c0f2b4dd14d2fc76903f3e44cc51c05724a0bd69
|
7
|
+
data.tar.gz: 30c3b26190d74c0559553458d05fdd36367fb9742b320322138d0f7a9ac503775d14edddb3a25b28276b5c099588186554f6ac686da0095175c557a921c1029e
|
@@ -64,13 +64,15 @@ module GraphitiGraphQL
|
|
64
64
|
end
|
65
65
|
|
66
66
|
initializer "graphiti_graphql.define_controller" do
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
67
|
+
GraphitiGraphQL::Engine.reloader_class.to_prepare do
|
68
|
+
app_controller = GraphitiGraphQL.config.federation_application_controller || ::ApplicationController
|
69
|
+
# rubocop:disable Lint/ConstantDefinitionInBlock(Standard)
|
70
|
+
class GraphitiGraphQL::ExecutionController < app_controller
|
71
|
+
register_exception Graphiti::Errors::UnreadableAttribute, message: true
|
72
|
+
def execute
|
73
|
+
params = request.params # avoid strong_parameters
|
74
|
+
render json: Graphiti.gql(params[:query], params[:variables])
|
75
|
+
end
|
74
76
|
end
|
75
77
|
end
|
76
78
|
end
|