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"
206
206
{
207
207
pendingSeparator.reset ();
208
208
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(
210
211
{
211
212
)cpp" ;
212
213
for (const auto & enumValue : enumType->enumValues ())
@@ -605,8 +606,14 @@ response::Value serializeVariables(Variables&& variables)
605
606
for (const auto & variable : variables)
606
607
{
607
608
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"
610
617
<< getTypeModifierList (variable.modifiers )
611
618
<< R"cpp( (std::move(variables.)cpp" << variable.cppName << R"cpp( )));
612
619
)cpp" ;
You can’t perform that action at this time.
0 commit comments