Skip to content

Commit a3a03af

Browse files
committed
Add a test for #199
1 parent 83b41bb commit a3a03af

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
# Copyright (c) Microsoft Corporation. All rights reserved.
22
# Licensed under the MIT License.
33

4-
mutation CompleteTaskMutation($input: CompleteTaskInput! = {id: "ZmFrZVRhc2tJZA==", isComplete: true, clientMutationId: "Hi There!"}) {
4+
mutation CompleteTaskMutation($input: CompleteTaskInput! = {id: "ZmFrZVRhc2tJZA==", isComplete: true, clientMutationId: "Hi There!"}, $skipClientMutationId: Boolean!) {
55
completedTask: completeTask(input: $input) {
66
completedTask: task {
77
completedTaskId: id
88
title
99
isComplete
1010
}
11-
clientMutationId
11+
clientMutationId @skip(if: $skipClientMutationId)
1212
}
1313
}

src/ClientGenerator.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -628,7 +628,10 @@ response::Value serializeVariables(Variables&& variables)
628628
sourceFile << R"cpp( result.emplace_back(R"js()cpp" << variable.name
629629
<< R"cpp()js"s, ModifiedVariable<)cpp";
630630

631-
if (_schemaLoader.getSchemaType(variable.type->name()) != SchemaType::Scalar)
631+
const auto& builtinTypes = _schemaLoader.getBuiltinTypes();
632+
633+
if (builtinTypes.find(variable.type->name()) == builtinTypes.cend()
634+
&& _schemaLoader.getSchemaType(variable.type->name()) != SchemaType::Scalar)
632635
{
633636
sourceFile << R"cpp(Variables::)cpp";
634637
}

0 commit comments

Comments
 (0)