graphql 2.4.6 → 2.4.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/graphql/autoload.rb +1 -0
- data/lib/graphql/railtie.rb +2 -4
- data/lib/graphql/schema.rb +0 -2
- data/lib/graphql/subscriptions/serialize.rb +2 -0
- data/lib/graphql/version.rb +1 -1
- data/lib/graphql.rb +0 -29
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 69f8b4084adf0530a973073bcacf76e536975b385e4927525504b648762e496e
|
4
|
+
data.tar.gz: ef8e532575d445e0e96c1e5cccb2f6518d4a8759127ba8f27fd4d2aca4ef877a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c9522e680f06a1810e019c64656fba5dd7d7d95e098f136e2f656837c928829eab7a1be5656c7c4c9fd68bf8f262ca9b7ed415d87c12997dc613c9f600e8994b
|
7
|
+
data.tar.gz: 99a5a17272d80d555c98f8f091799e5b84656bfd42310e79d64b65140c7b2786e9f23f4759dfefb5b09c8ffc913349bfd0db3bcff5f6475087b350122aadd066
|
data/lib/graphql/autoload.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
module GraphQL
|
4
|
+
# @see GraphQL::Railtie for automatic Rails integration
|
4
5
|
module Autoload
|
5
6
|
# Register a constant named `const_name` to be loaded from `path`.
|
6
7
|
# This is like `Kernel#autoload` but it tracks the constants so they can be eager-loaded with {#eager_load!}
|
data/lib/graphql/railtie.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
module GraphQL
|
4
|
-
# Support {GraphQL::Parser::Cache}
|
4
|
+
# Support {GraphQL::Parser::Cache} and {GraphQL.eager_load!}
|
5
5
|
#
|
6
6
|
# @example Enable the parser cache with default directory
|
7
7
|
#
|
@@ -10,9 +10,7 @@ module GraphQL
|
|
10
10
|
class Railtie < Rails::Railtie
|
11
11
|
config.graphql = ActiveSupport::OrderedOptions.new
|
12
12
|
config.graphql.parser_cache = false
|
13
|
-
config.
|
14
|
-
GraphQL.eager_load!
|
15
|
-
end
|
13
|
+
config.eager_load_namespaces << GraphQL
|
16
14
|
|
17
15
|
initializer("graphql.cache") do |app|
|
18
16
|
if config.graphql.parser_cache
|
data/lib/graphql/schema.rb
CHANGED
data/lib/graphql/version.rb
CHANGED
data/lib/graphql.rb
CHANGED
@@ -82,35 +82,6 @@ This is probably a bug in GraphQL-Ruby, please report this error on GitHub: http
|
|
82
82
|
class << self
|
83
83
|
# If true, the parser should raise when an integer or float is followed immediately by an identifier (instead of a space or punctuation)
|
84
84
|
attr_accessor :reject_numbers_followed_by_names
|
85
|
-
|
86
|
-
# If `production?` is detected but `eager_load!` wasn't called, emit a warning.
|
87
|
-
# @return [void]
|
88
|
-
def ensure_eager_load!
|
89
|
-
if production? && !eager_loading?
|
90
|
-
warn <<~WARNING
|
91
|
-
GraphQL-Ruby thinks this is a production deployment but didn't eager-load its constants. Address this by:
|
92
|
-
|
93
|
-
- Calling `GraphQL.eager_load!` in a production-only initializer or setup hook
|
94
|
-
- Assign `GraphQL.env = "..."` to something _other_ than `"production"` (for example, `GraphQL.env = "development"`)
|
95
|
-
|
96
|
-
More details: https://graphql-ruby.org/schema/definition#production-considerations
|
97
|
-
WARNING
|
98
|
-
end
|
99
|
-
end
|
100
|
-
|
101
|
-
attr_accessor :env
|
102
|
-
|
103
|
-
private
|
104
|
-
|
105
|
-
# Detect whether this is a production deployment or not
|
106
|
-
def production?
|
107
|
-
if env
|
108
|
-
# Manually assigned to production?
|
109
|
-
env == "production"
|
110
|
-
else
|
111
|
-
(detected_env = ENV["RACK_ENV"] || ENV["RAILS_ENV"] || ENV["HANAMI_ENV"] || ENV["APP_ENV"]) && detected_env.to_s.downcase == "production"
|
112
|
-
end
|
113
|
-
end
|
114
85
|
end
|
115
86
|
|
116
87
|
self.reject_numbers_followed_by_names = false
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: graphql
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.4.
|
4
|
+
version: 2.4.7
|
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-12-
|
11
|
+
date: 2024-12-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: base64
|