Skip to content

Commit 32b3290

Browse files
committed
Add a test for #199
1 parent a46c6cb commit 32b3290

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
@@ -608,7 +608,10 @@ response::Value serializeVariables(Variables&& variables)
608608
sourceFile << R"cpp( result.emplace_back(R"js()cpp" << variable.name
609609
<< R"cpp()js"s, ModifiedVariable<)cpp";
610610

611-
if (_schemaLoader.getSchemaType(variable.type->name()) != SchemaType::Scalar)
611+
const auto& builtinTypes = _schemaLoader.getBuiltinTypes();
612+
613+
if (builtinTypes.find(variable.type->name()) == builtinTypes.cend()
614+
&& _schemaLoader.getSchemaType(variable.type->name()) != SchemaType::Scalar)
612615
{
613616
sourceFile << R"cpp(Variables::)cpp";
614617
}

0 commit comments

Comments
 (0)