diff --git a/spec/graphql/schema/input_object_spec.rb b/spec/graphql/schema/input_object_spec.rb index a85b0fb80e..35eec220f1 100644 --- a/spec/graphql/schema/input_object_spec.rb +++ b/spec/graphql/schema/input_object_spec.rb @@ -487,7 +487,7 @@ def self.resolve_type(type, obj, ctx) it "works with empty objects" do res = Jazz::Schema.execute("{ defaultValueTest2 }") - assert_equal "Jazz::InspectableInput -> {}", res["data"]["defaultValueTest2"] + assert_equal "Jazz::FullyOptionalInput -> {}", res["data"]["defaultValueTest2"] end it "introspects in GraphQL language with enums" do diff --git a/spec/support/jazz.rb b/spec/support/jazz.rb index 40c9c7d743..7b4c011acf 100644 --- a/spec/support/jazz.rb +++ b/spec/support/jazz.rb @@ -335,6 +335,10 @@ class LegacyInputType < GraphQL::Schema::InputObject argument :int_value, Int, required: true end + class FullyOptionalInput < GraphQL::Schema::InputObject + argument :optional_value, String, required: false + end + class InspectableInput < GraphQL::Schema::InputObject argument :ensemble_id, ID, required: false, loads: Ensemble argument :string_value, String, required: true, description: "Test description kwarg" @@ -547,7 +551,7 @@ def default_value_test(arg_with_default:) end field :default_value_test_2, String, null: false, resolver_method: :default_value_test do - argument :arg_with_default, InspectableInput, required: false, default_value: {} + argument :arg_with_default, FullyOptionalInput, required: false, default_value: {} end field :complex_hash_key, String, null: false, hash_key: :'foo bar/fizz-buzz'