@arcgis/core
Version:
ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API
45 lines (43 loc) • 2.06 kB
TypeScript
import type Accessor from "../../core/Accessor.js";
export interface GraphQueryProperties extends Partial<Pick<GraphQuery, "openCypherQuery">> {}
/**
* Defines the query operation performed on a knowledge graph service's
* [graph](https://developers.arcgis.com/javascript/latest/references/core/rest/knowledgeGraph/KnowledgeGraph/) resource.
* The [entities](https://developers.arcgis.com/javascript/latest/references/core/rest/knowledgeGraph/Entity/) and [relationships](https://developers.arcgis.com/javascript/latest/references/core/rest/knowledgeGraph/Relationship/)
* in the graph are queried by sending an Esri implementation of [openCypher](https://opencypher.org/) query.
*
* > [!WARNING]
* >
* > **Notes**
* >
* > ArcGIS Knowledge does not support write capabilities of the openCypher query language. All openCypher queries must be read-only.
*
* @since 4.25
* @see [Sample - Query an knowledge graph](https://developers.arcgis.com/javascript/latest/sample-code/knowledgegraph-query/)
* @see [executeQuery()](https://developers.arcgis.com/javascript/latest/references/core/rest/knowledgeGraphService/#executeQuery)
* @see [executeQueryStreaming()](https://developers.arcgis.com/javascript/latest/references/core/rest/knowledgeGraphService/#executeQueryStreaming)
* @example
* //typical use case
* KnowledgeGraphModule.executeQuery(
* knowledgeGraph, //graph
* { //queryArguments
* openCypherQuery: "MATCH (n) RETURN n LIMIT 1", //query
* }).then((queryResult) => {
* //do something with the result
* });
*/
export default class GraphQuery extends Accessor {
constructor(properties?: GraphQueryProperties);
/**
* The Esri implementation of [openCypher](https://opencypher.org/) query to be executed against the knowledge graph.
*
* > [!WARNING]
* >
* > **Required**
* >
* > [executeQuery()](https://developers.arcgis.com/javascript/latest/references/core/rest/knowledgeGraphService/#executeQuery) will fail if not provided.
*
* @default ""
*/
accessor openCypherQuery: string;
}