@matdata/yasqe 5.17.0 → 5.18.0

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@matdata/yasqe",
3
3
  "description": "Yet Another SPARQL Query Editor",
4
- "version": "5.17.0",
4
+ "version": "5.18.0",
5
5
  "main": "build/yasqe.min.js",
6
6
  "types": "build/ts/src/index.d.ts",
7
7
  "license": "MIT",
package/src/sparql.ts CHANGED
@@ -251,8 +251,9 @@ export async function executeQuery(
251
251
 
252
252
  // Use custom query if provided, otherwise use the args from config
253
253
  if (options?.customQuery) {
254
- const queryArg = getQueryParameterName(populatedConfig.args);
255
- searchParams.append(queryArg, options.customQuery);
254
+ // A custom query is always a SPARQL read query (CONSTRUCT/DESCRIBE/SELECT/ASK),
255
+ // never an update — always use the "query" parameter regardless of editor mode.
256
+ searchParams.append("query", options.customQuery);
256
257
 
257
258
  // Add other args except the query/update parameter
258
259
  appendArgsToParams(populatedConfig.args, ["query", "update"]);