File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -206,7 +206,8 @@ static_assert(graphql::internal::MinorVersion == )cpp"
206206 {
207207 pendingSeparator.reset ();
208208
209- headerFile << R"cpp( enum class )cpp" << _schemaLoader.getCppType (enumType->name ()) << R"cpp(
209+ headerFile << R"cpp( enum class )cpp" << _schemaLoader.getCppType (enumType->name ())
210+ << R"cpp(
210211{
211212)cpp" ;
212213 for (const auto & enumValue : enumType->enumValues ())
@@ -605,8 +606,14 @@ response::Value serializeVariables(Variables&& variables)
605606 for (const auto & variable : variables)
606607 {
607608 sourceFile << R"cpp( result.emplace_back(R"js()cpp" << variable.name
608- << R"cpp( )js"s, ModifiedVariable<Variables::)cpp"
609- << _schemaLoader.getCppType (variable.type ->name ()) << R"cpp( >::serialize)cpp"
609+ << R"cpp( )js"s, ModifiedVariable<)cpp" ;
610+
611+ if (_schemaLoader.getSchemaType (variable.type ->name ()) != SchemaType::Scalar)
612+ {
613+ sourceFile << R"cpp( Variables::)cpp" ;
614+ }
615+
616+ sourceFile << _schemaLoader.getCppType (variable.type ->name ()) << R"cpp( >::serialize)cpp"
610617 << getTypeModifierList (variable.modifiers )
611618 << R"cpp( (std::move(variables.)cpp" << variable.cppName << R"cpp( )));
612619)cpp" ;
You can’t perform that action at this time.
0 commit comments