graphql 2.4.2 → 2.4.3
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.
Potentially problematic release.
This version of graphql might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/lib/graphql/execution/lookahead.rb +8 -1
- data/lib/graphql/schema/visibility.rb +16 -1
- data/lib/graphql/schema.rb +1 -1
- data/lib/graphql/version.rb +1 -1
- 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: 0dcc846071132cf2d084ff65347dab7c97d0b25b60c1cdb6dfcbe37c55f278e9
|
4
|
+
data.tar.gz: afc95cb5ba89e33974b8b38616bc36c14dcbfd3c9f121b8e65437e7cfc390770
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d1b6ad8fba792ca671246b2d6531f981a2c184adde3e4efc7522a7f38ea659c563dadd50ee208ab406f0ce4c37fc6625c2d59e020b0334cdefd8ea7f5d5eed8a
|
7
|
+
data.tar.gz: 74c1156b7b407b2d687cc74886198d9f2705d7d82e3672e5d5b9b61f2811fa53dfe7b2bdb61ac0dae8e5e83242415ff7d7d1f6e2721f77b90dcda61dff88c815
|
@@ -56,7 +56,14 @@ module GraphQL
|
|
56
56
|
else
|
57
57
|
@arguments = if @field
|
58
58
|
@query.after_lazy(@query.arguments_for(@ast_nodes.first, @field)) do |args|
|
59
|
-
|
59
|
+
case args
|
60
|
+
when Execution::Interpreter::Arguments
|
61
|
+
args.keyword_arguments
|
62
|
+
when GraphQL::ExecutionError
|
63
|
+
EmptyObjects::EMPTY_HASH
|
64
|
+
else
|
65
|
+
args
|
66
|
+
end
|
60
67
|
end
|
61
68
|
else
|
62
69
|
nil
|
@@ -112,7 +112,11 @@ module GraphQL
|
|
112
112
|
if @profiles.any?
|
113
113
|
if visibility_profile.nil?
|
114
114
|
if @dynamic
|
115
|
-
|
115
|
+
if context.is_a?(Query::NullContext)
|
116
|
+
top_level_profile
|
117
|
+
else
|
118
|
+
@schema.visibility_profile_class.new(context: context, schema: @schema)
|
119
|
+
end
|
116
120
|
elsif @profiles.any?
|
117
121
|
raise ArgumentError, "#{@schema} expects a visibility profile, but `visibility_profile:` wasn't passed. Provide a `visibility_profile:` value or add `dynamic: true` to your visibility configuration."
|
118
122
|
end
|
@@ -121,6 +125,8 @@ module GraphQL
|
|
121
125
|
else
|
122
126
|
@cached_profiles[visibility_profile] ||= @schema.visibility_profile_class.new(name: visibility_profile, context: context, schema: @schema)
|
123
127
|
end
|
128
|
+
elsif context.is_a?(Query::NullContext)
|
129
|
+
top_level_profile
|
124
130
|
else
|
125
131
|
@schema.visibility_profile_class.new(context: context, schema: @schema)
|
126
132
|
end
|
@@ -128,6 +134,13 @@ module GraphQL
|
|
128
134
|
|
129
135
|
private
|
130
136
|
|
137
|
+
def top_level_profile(refresh: false)
|
138
|
+
if refresh
|
139
|
+
@top_level_profile = nil
|
140
|
+
end
|
141
|
+
@top_level_profile ||= @schema.visibility_profile_class.new(context: Query::NullContext.instance, schema: @schema)
|
142
|
+
end
|
143
|
+
|
131
144
|
def ensure_all_loaded(types_to_visit)
|
132
145
|
while (type = types_to_visit.shift)
|
133
146
|
if type.kind.fields? && @preloaded_types.add?(type)
|
@@ -137,6 +150,8 @@ module GraphQL
|
|
137
150
|
end
|
138
151
|
end
|
139
152
|
end
|
153
|
+
top_level_profile(refresh: true)
|
154
|
+
nil
|
140
155
|
end
|
141
156
|
end
|
142
157
|
end
|
data/lib/graphql/schema.rb
CHANGED
@@ -492,7 +492,7 @@ module GraphQL
|
|
492
492
|
nil
|
493
493
|
elsif @mutation_object.is_a?(Proc)
|
494
494
|
@mutation_object = @mutation_object.call
|
495
|
-
self.visibility&.mutation_configured(@
|
495
|
+
self.visibility&.mutation_configured(@mutation_object)
|
496
496
|
@mutation_object
|
497
497
|
else
|
498
498
|
@mutation_object || find_inherited_value(:mutation)
|
data/lib/graphql/version.rb
CHANGED
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.3
|
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-11-
|
11
|
+
date: 2024-11-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: base64
|