@ctil/gql 1.1.1 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1153,7 +1153,7 @@ function buildGraphQLQueryAggregate(input) {
|
|
|
1153
1153
|
|
|
1154
1154
|
// src/builders/mutation.ts
|
|
1155
1155
|
function buildGraphQLMutation(input) {
|
|
1156
|
-
const { operationName, fields, datas, _set, where, variables } = input;
|
|
1156
|
+
const { operationName, fields, datas, _set, where, variables, variableName } = input;
|
|
1157
1157
|
if (!operationName) {
|
|
1158
1158
|
throw new Error("operationName is required");
|
|
1159
1159
|
}
|
|
@@ -1168,7 +1168,7 @@ function buildGraphQLMutation(input) {
|
|
|
1168
1168
|
finalVariables.datas = dataArray;
|
|
1169
1169
|
const datasArg = "$datas";
|
|
1170
1170
|
const query2 = `mutation ${operationName}${varDefs ? `(${varDefs})` : ""} {
|
|
1171
|
-
${operationName}(${
|
|
1171
|
+
${operationName}(${variableName ? variableName : "datas"}: ${datasArg}) {
|
|
1172
1172
|
affected_rows
|
|
1173
1173
|
returning { ${fieldsStr} }
|
|
1174
1174
|
}
|