@synapcores/sdk 0.2.0 → 0.2.1
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.d.mts +5 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +7 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1975,10 +1975,15 @@ var GraphClient = class {
|
|
|
1975
1975
|
}
|
|
1976
1976
|
/**
|
|
1977
1977
|
* Run a Cypher / MATCH query.
|
|
1978
|
+
*
|
|
1979
|
+
* The gateway's MatchRequest expects `sql: String` (see
|
|
1980
|
+
* crates/aidb-gateway/src/routes/graph.rs MatchRequest); we keep the
|
|
1981
|
+
* SDK-facing parameter named `query` because every caller writes
|
|
1982
|
+
* Cypher, not SQL — the gateway's field name is a historical artifact.
|
|
1978
1983
|
*/
|
|
1979
1984
|
async cypher(query, params = {}, graph) {
|
|
1980
1985
|
const { data } = await this.synapCores._getHttpClient().post("/graph/match", {
|
|
1981
|
-
query,
|
|
1986
|
+
sql: query,
|
|
1982
1987
|
params,
|
|
1983
1988
|
graph
|
|
1984
1989
|
});
|
|
@@ -1989,7 +1994,7 @@ var GraphClient = class {
|
|
|
1989
1994
|
*/
|
|
1990
1995
|
async cypherProfile(query, params = {}, graph) {
|
|
1991
1996
|
const { data } = await this.synapCores._getHttpClient().post("/graph/match/profile", {
|
|
1992
|
-
query,
|
|
1997
|
+
sql: query,
|
|
1993
1998
|
params,
|
|
1994
1999
|
graph
|
|
1995
2000
|
});
|