File tree Expand file tree Collapse file tree 2 files changed +12
-6
lines changed
samples/client/nestedinput Expand file tree Collapse file tree 2 files changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -67,9 +67,9 @@ response::Value ModifiedVariable<Variables::InputABCD>::serialize(Variables::Inp
6767 response::Value result { response::Type::Map };
6868
6969 result.emplace_back (R"js( d)js" s, ModifiedVariable<std::string>::serialize (std::move (inputValue.d )));
70- result.emplace_back (R"js( a)js" s, ModifiedVariable<InputA>::serialize (std::move (inputValue.a )));
71- result.emplace_back (R"js( b)js" s, ModifiedVariable<InputB>::serialize (std::move (inputValue.b )));
72- result.emplace_back (R"js( bc)js" s, ModifiedVariable<InputBC>::serialize<TypeModifier::List>(std::move (inputValue.bc )));
70+ result.emplace_back (R"js( a)js" s, ModifiedVariable<Variables:: InputA>::serialize (std::move (inputValue.a )));
71+ result.emplace_back (R"js( b)js" s, ModifiedVariable<Variables:: InputB>::serialize (std::move (inputValue.b )));
72+ result.emplace_back (R"js( bc)js" s, ModifiedVariable<Variables:: InputBC>::serialize<TypeModifier::List>(std::move (inputValue.bc )));
7373
7474 return result;
7575}
@@ -80,7 +80,7 @@ response::Value ModifiedVariable<Variables::InputBC>::serialize(Variables::Input
8080 response::Value result { response::Type::Map };
8181
8282 result.emplace_back (R"js( c)js" s, ModifiedVariable<response::IdType>::serialize (std::move (inputValue.c )));
83- result.emplace_back (R"js( b)js" s, ModifiedVariable<InputB>::serialize (std::move (inputValue.b )));
83+ result.emplace_back (R"js( b)js" s, ModifiedVariable<Variables:: InputB>::serialize (std::move (inputValue.b )));
8484
8585 return result;
8686}
Original file line number Diff line number Diff line change @@ -559,8 +559,14 @@ response::Value ModifiedVariable<Variables::)cpp"
559559 RequestLoader::unwrapSchemaType (inputField->type ().lock ());
560560
561561 sourceFile << R"cpp( result.emplace_back(R"js()cpp" << inputField->name ()
562- << R"cpp( )js"s, ModifiedVariable<)cpp"
563- << _schemaLoader.getCppType (type->name ()) << R"cpp( >::serialize)cpp"
562+ << R"cpp( )js"s, ModifiedVariable<)cpp" ;
563+
564+ if (type->kind () == introspection::TypeKind::INPUT_OBJECT)
565+ {
566+ sourceFile << R"cpp( Variables::)cpp" ;
567+ }
568+
569+ sourceFile << _schemaLoader.getCppType (type->name ()) << R"cpp( >::serialize)cpp"
564570 << getTypeModifierList (modifiers) << R"cpp( (std::move(inputValue.)cpp"
565571 << SchemaLoader::getSafeCppName (inputField->name ()) << R"cpp( )));
566572)cpp" ;
You can’t perform that action at this time.
0 commit comments