Skip to content

Commit 653d610

Browse files
authored
Fix dataconnect:execute --vars / --variables parsing. (#9327)
1 parent f7d8af5 commit 653d610

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/commands/dataconnect-execute.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,14 +115,14 @@ export const command = new Command("dataconnect:execute [file] [operationName]")
115115
serviceName = (await getServiceInfo()).serviceName;
116116
}
117117
}
118-
if (!options.vars && !process.stdin.isTTY && !stdinUsedFor) {
119-
options.vars = "@-";
118+
if (!options.variables && !process.stdin.isTTY && !stdinUsedFor) {
119+
options.variables = "@-";
120120
}
121-
const unparsedVars = await literalOrFile(options.vars, "--vars");
121+
const unparsedVars = await literalOrFile(options.variables, "--variables");
122122
const response = await executeGraphQL(apiClient, serviceName, {
123123
query,
124124
operationName,
125-
variables: parseJsonObject(unparsedVars, "--vars"),
125+
variables: parseJsonObject(unparsedVars, "--variables"),
126126
});
127127

128128
// If the status code isn't OK or the top-level `error` field is set, this

0 commit comments

Comments
 (0)