lib/graphql/schema/argument.rb in graphql-1.10.10 vs lib/graphql/schema/argument.rb in graphql-1.10.11
- old
+ new
@@ -152,9 +152,15 @@
@type ||= Member::BuildType.parse_type(@type_expr, null: @null)
rescue StandardError => err
raise ArgumentError, "Couldn't build type for Argument #{@owner.name}.#{name}: #{err.class.name}: #{err.message}", err.backtrace
end
+ def statically_coercible?
+ return @statically_coercible if defined?(@statically_coercible)
+
+ @statically_coercible = !@prepare.is_a?(String) && !@prepare.is_a?(Symbol)
+ end
+
# Apply the {prepare} configuration to `value`, using methods from `obj`.
# Used by the runtime.
# @api private
def prepare_value(obj, value, context: nil)
if value.is_a?(GraphQL::Schema::InputObject)