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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e99c86540776f6e5aa93eaa422f4919cf4434f6116bb040267bd37f3a0036ba8
4
- data.tar.gz: bfac34b9d8b0f5e5e96e9169d969b5a3efbe6d01d0c3da964d27649a6b7514be
3
+ metadata.gz: 49e4ed0eddc59317af012abe48c74dfdd76eb9d62c4d39db10c35182cd483eed
4
+ data.tar.gz: 4dd34829225d165bf1222a1ce75f052dc8aad990b949909a96c4fc1f96d9df14
5
5
  SHA512:
6
- metadata.gz: 4c8d515d95e749457c887dadfaaedab1e8d9367d57565364a7a5ef969843ad13486f530a4e61623003198c7d099aa571cba2e4269b9e29a4f7941a7b700631ae
7
- data.tar.gz: edfe5d07374179c3cceb6dc1fbfd05a6de8cc124759e65b659204f03eb5e0ee1c4980d0515f9b9cccb1ec6095706d7373283435804f5f618e94fb29e045d4b88
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.12)
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.9)
26
+ concurrent-ruby (1.1.10)
27
27
  diff-lcs (1.4.4)
28
- dry-configurable (0.12.1)
28
+ dry-configurable (0.15.0)
29
29
  concurrent-ruby (~> 1.0)
30
- dry-core (~> 0.5, >= 0.5.0)
31
- dry-container (0.8.0)
30
+ dry-core (~> 0.6)
31
+ dry-container (0.9.0)
32
32
  concurrent-ruby (~> 1.0)
33
- dry-configurable (~> 0.1, >= 0.1.3)
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.2)
48
- activesupport (>= 4.1)
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.8.10)
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.14.4)
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.2)
120
+ zeitwerk (2.5.4)
121
121
 
122
122
  PLATFORMS
123
123
  ruby
data/README.md CHANGED
@@ -50,6 +50,8 @@ And then in `config/application.rb`:
50
50
  # require "sprockets/railtie"
51
51
  ```
52
52
 
53
+ Alternatively, follow [this comment](https://github.com/rmosolgo/graphiql-rails/issues/53#issuecomment-877819958).
54
+
53
55
  ## Usage
54
56
 
55
57
  #### Blending with graphql-ruby
@@ -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
- when 6 then ::Rails.application.reloader
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
- app_controller = GraphitiGraphQL.config.federation_application_controller || ::ApplicationController
68
- # rubocop:disable Lint/ConstantDefinitionInBlock(Standard)
69
- class GraphitiGraphQL::ExecutionController < app_controller
70
- register_exception Graphiti::Errors::UnreadableAttribute, message: true
71
- def execute
72
- params = request.params # avoid strong_parameters
73
- render json: Graphiti.gql(params[:query], params[:variables])
74
- end
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
@@ -1,3 +1,3 @@
1
1
  module GraphitiGraphQL
2
- VERSION = "0.1.14"
2
+ VERSION = "0.1.17"
3
3
  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.14
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: 2021-08-31 00:00:00.000000000 Z
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.2.22
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: []