@ctil/gql 1.0.7 → 1.0.9

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 CHANGED
@@ -3677,16 +3677,13 @@ function buildWhere(where) {
3677
3677
  const sub = buildWhere(value);
3678
3678
  if (sub) parts.push(`${key}: { ${sub} }`);
3679
3679
  } else if (typeof value === "object" && value !== null) {
3680
- const conds = Object.entries(value).map(([op, val]) => {
3681
- if (typeof val === "string" && val.startsWith("$")) return `${op}: ${val}`;
3682
- return `${op}: ${JSON.stringify(String(val))}`;
3683
- }).join(", ");
3684
- parts.push(`${key}: { ${conds} }`);
3680
+ const sub = buildWhere(value);
3681
+ parts.push(`${key}: { ${sub} }`);
3685
3682
  } else {
3686
3683
  if (typeof value === "string" && value.startsWith("$")) {
3687
3684
  parts.push(`${key}: ${value}`);
3688
3685
  } else {
3689
- parts.push(`${key}: ${JSON.stringify(String(value))}`);
3686
+ parts.push(`${key}: ${JSON.stringify(value)}`);
3690
3687
  }
3691
3688
  }
3692
3689
  }