@@ -319,7 +319,7 @@ static_assert(graphql::internal::MinorVersion == )cpp"
319319 headerFile << R"cpp( )cpp"
320320 << _requestLoader.getInputCppType (inputField->type ().lock ())
321321 << R"cpp( )cpp" << SchemaLoader::getSafeCppName (inputField->name ())
322- << R"cpp( {} ;
322+ << R"cpp( ;
323323)cpp" ;
324324 }
325325
@@ -648,15 +648,28 @@ using namespace std::literals;
648648
649649 pendingSeparator.reset ();
650650
651- sourceFile << cppType << R"cpp( ::)cpp" << cppType << R"cpp( () noexcept
651+ sourceFile << cppType << R"cpp( ::)cpp" << cppType << R"cpp( () noexcept)cpp" ;
652+
653+ bool firstField = true ;
654+
655+ for (const auto & inputField : inputType.type ->inputFields ())
656+ {
657+ sourceFile << R"cpp(
658+ )cpp" << (firstField ? R"cpp( :)cpp" : R"cpp( ,)cpp" )
659+ << R"cpp( )cpp" << SchemaLoader::getSafeCppName (inputField->name ())
660+ << R"cpp( {})cpp" ;
661+ firstField = false ;
662+ }
663+
664+ sourceFile << R"cpp(
652665{
653666 // Explicit definition to prevent ODR violations when LTO is enabled.
654667}
655668
656669)cpp" << cppType << R"cpp( ::)cpp"
657670 << cppType << R"cpp( ()cpp" ;
658671
659- bool firstField = true ;
672+ firstField = true ;
660673
661674 for (const auto & inputField : inputType.type ->inputFields ())
662675 {
@@ -854,8 +867,7 @@ response::Value Variable<)cpp"
854867
855868 sourceFile << R"cpp( template <>
856869response::Value Variable<)cpp"
857- << cppType << R"cpp( >::serialize()cpp" << cppType
858- << R"cpp( && inputValue)
870+ << cppType << R"cpp( >::serialize()cpp" << cppType << R"cpp( && inputValue)
859871{
860872 response::Value result { response::Type::Map };
861873
0 commit comments