graphiql-rails 1.10.1 → 1.10.4

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.
@@ -3,17 +3,16 @@
3
3
  <head>
4
4
  <title><%= GraphiQL::Rails.config.title || 'GraphiQL' %></title>
5
5
  <% if defined?(Propshaft) %>
6
- <%= stylesheet_link_tag("graphiql/rails/graphiql-3.1.1") %>
6
+ <%= stylesheet_link_tag("graphiql/rails/graphiql-3.8.3") %>
7
7
  <%= stylesheet_link_tag("graphiql/rails/application") %>
8
- <%= javascript_include_tag("graphiql/rails/react-18.2.0", nonce: true ) %>
9
- <%= javascript_include_tag("graphiql/rails/react-dom-18.2.0", nonce: true ) %>
10
- <%= javascript_include_tag("graphiql/rails/graphiql-3.1.1", nonce: true ) %>
11
- <%= javascript_include_tag("graphiql/rails/graphiql_show", nonce: true ) %>
8
+ <%= javascript_include_tag("graphiql/rails/application", nonce: true ) %>
12
9
  <% elsif defined?(Sprockets) %>
13
10
  <%= stylesheet_link_tag("graphiql/rails/application") %>
14
11
  <%= javascript_include_tag("graphiql/rails/application", nonce: true ) %>
15
12
  <% else %>
16
- <% raise "GraphiQL::Rails requires either Propshaft or Sprockets. Use `$ bundle add propshaft` or `$ bundle add sprockets-rails` to add one of them to your app." %>
13
+ <%= stylesheet_link_tag("/graphiql-rails/stylesheets/graphiql-3.8.3.css") %>
14
+ <%= stylesheet_link_tag("/graphiql-rails/stylesheets/application.css?v=#{GraphiQL::Rails::VERSION}") %>
15
+ <%= javascript_include_tag("/graphiql-rails/javascripts/application.js?v=#{GraphiQL::Rails::VERSION}", nonce: true) %>
17
16
  <% end %>
18
17
  </head>
19
18
  <body>
@@ -24,7 +23,8 @@
24
23
  headers: GraphiQL::Rails.config.resolve_headers(self),
25
24
  query_params: GraphiQL::Rails.config.query_params,
26
25
  header_editor_enabled: GraphiQL::Rails.config.header_editor_enabled,
27
- input_value_deprecation: GraphiQL::Rails.config.input_value_deprecation
26
+ input_value_deprecation: GraphiQL::Rails.config.input_value_deprecation,
27
+ should_persist_headers: GraphiQL::Rails.config.should_persist_headers
28
28
  } %>
29
29
  </body>
30
30
  </html>
@@ -7,7 +7,7 @@ module GraphiQL
7
7
  # @return [Hash<String => Proc>] Keys are headers to include in GraphQL requests, values are `->(view_context) { ... }` procs to determin values
8
8
  attr_accessor :headers
9
9
 
10
- attr_accessor :query_params, :initial_query, :csrf, :title, :logo, :header_editor_enabled, :input_value_deprecation
10
+ attr_accessor :query_params, :initial_query, :csrf, :title, :logo, :header_editor_enabled, :input_value_deprecation, :should_persist_headers
11
11
 
12
12
  DEFAULT_HEADERS = {
13
13
  'Content-Type' => ->(_) { 'application/json' },
@@ -5,10 +5,13 @@ module GraphiQL
5
5
 
6
6
  if defined?(Sprockets) && Sprockets::VERSION.chr.to_i >= 4
7
7
  initializer 'graphiql.assets.precompile' do |app|
8
- app.config.assets.precompile += %w(
9
- graphiql/rails/application.css
10
- graphiql/rails/application.js
11
- )
8
+ app.config.assets.precompile += ["graphiql/rails/application.css"]
9
+ end
10
+ end
11
+
12
+ if !defined?(Sprockets) && !defined?(Propshaft)
13
+ initializer 'graphiql.assets.public' do |app|
14
+ app.middleware.insert_after(ActionDispatch::Static, ActionDispatch::Static, "#{root}/public")
12
15
  end
13
16
  end
14
17
  end
@@ -1,5 +1,5 @@
1
1
  module GraphiQL
2
2
  module Rails
3
- VERSION = "1.10.1"
3
+ VERSION = "1.10.4"
4
4
  end
5
5
  end
@@ -0,0 +1 @@
1
+ ../../app/assets/javascripts/graphiql/rails
@@ -0,0 +1 @@
1
+ ../../app/assets/stylesheets/graphiql/rails
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: graphiql-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.10.1
4
+ version: 1.10.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert Mosolgo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-08-15 00:00:00.000000000 Z
11
+ date: 2025-02-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
@@ -122,6 +122,20 @@ dependencies:
122
122
  - - ">="
123
123
  - !ruby/object:Gem::Version
124
124
  version: '0'
125
+ - !ruby/object:Gem::Dependency
126
+ name: puma
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ">="
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ">="
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
125
139
  description: Use the GraphiQL IDE for GraphQL with Ruby on Rails. This gem includes
126
140
  an engine, a controller and a view for integrating GraphiQL with your app.
127
141
  email:
@@ -131,12 +145,8 @@ extensions: []
131
145
  extra_rdoc_files: []
132
146
  files:
133
147
  - app/assets/javascripts/graphiql/rails/application.js
134
- - app/assets/javascripts/graphiql/rails/graphiql-3.1.1.js
135
- - app/assets/javascripts/graphiql/rails/graphiql_show.js
136
- - app/assets/javascripts/graphiql/rails/react-18.2.0.js
137
- - app/assets/javascripts/graphiql/rails/react-dom-18.2.0.js
138
148
  - app/assets/stylesheets/graphiql/rails/application.css
139
- - app/assets/stylesheets/graphiql/rails/graphiql-3.1.1.css
149
+ - app/assets/stylesheets/graphiql/rails/graphiql-3.8.3.css
140
150
  - app/controllers/graphiql/rails/editors_controller.rb
141
151
  - app/views/graphiql/rails/editors/show.html.erb
142
152
  - config/routes.rb
@@ -144,6 +154,8 @@ files:
144
154
  - lib/graphiql/rails/config.rb
145
155
  - lib/graphiql/rails/engine.rb
146
156
  - lib/graphiql/rails/version.rb
157
+ - public/graphiql-rails/javascripts
158
+ - public/graphiql-rails/stylesheets
147
159
  homepage: http://github.com/rmosolgo/graphiql-rails
148
160
  licenses:
149
161
  - MIT