ghostos 0.1.16 → 0.1.17

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/README.md CHANGED
@@ -11,7 +11,29 @@ npm i ghostos
11
11
  ## getting graph data from leafgon.com
12
12
 
13
13
  ```bash
14
- gq https://gdb.leafgon.com/qmgraphql -q 'query {graph: getGraph(domain: "breezyforest", appid: "testbed", filter: {}) {domain appid nodes {uuid leafnodetype out_edges {uuid source {uuid} target {uuid} data} data} edges { uuid source {uuid} target {uuid} } }}' > ./tests/breezyforest-testbed.json
14
+ gq https://www.leafgon.com/qmgraphql -q 'query {graph: getGraph(domain: "breezyforest", appid: "testbed", filter: {}) {domain appid nodes {uuid leafnodetype out_edges {uuid source {uuid} target {uuid} data} data} edges { uuid source {uuid} target {uuid} } }}' > ./tests/breezyforest-testbed.json
15
+ ```
16
+
17
+ ## Override Endpoint URIs
18
+
19
+ You can override the default GraphQL URIs at runtime:
20
+
21
+ ```js
22
+ import { setLEAFgqlEndpoints, initializeLEAFlakeGQLClient } from "ghostos/core";
23
+
24
+ setLEAFgqlEndpoints({
25
+ endpoint_subs: "https://example.com/sgraphql",
26
+ websocket_subs: "wss://example.com/sgraphql",
27
+ endpoint_qm: "https://example.com/qmgraphql",
28
+ });
29
+
30
+ initializeLEAFlakeGQLClient({
31
+ _clientConfig: {
32
+ dburi_subs: "https://example.com/sgraphql",
33
+ dburi_subs_ws: "wss://example.com/sgraphql",
34
+ dburi_qm: "https://example.com/qmgraphql",
35
+ },
36
+ });
15
37
  ```
16
38
 
17
39
  ## GitHub-hosted leafgraphs
@@ -1,3 +1,13 @@
1
+ export function getLEAFgqlEndpoints(): {
2
+ endpoint_subs: string;
3
+ websocket_subs: string;
4
+ endpoint_qm: string;
5
+ };
6
+ export function setLEAFgqlEndpoints({ endpoint_subs: nextEndpointSubs, websocket_subs: nextWebsocketSubs, endpoint_qm: nextEndpointQm, }?: {}): {
7
+ endpoint_subs: string;
8
+ websocket_subs: string;
9
+ endpoint_qm: string;
10
+ };
1
11
  export function getLEAFgqlStrAddNode(node_input: any): string;
2
12
  export function getLEAFgqlStrUpdateNode(node_input: any): string;
3
13
  export function getLEAFgqlStrDelNode(node_uuid: any): string;
@@ -25,6 +35,6 @@ export function mutateDelEdge({ edge_uuid, endpoint }: {
25
35
  export const MUT_UPDATENODE: "mutation UpdateNode($uuid: String!, $data: String!) {\n updateNode(input: {filter: {uuid: {eq: $uuid}}, set: {data: $data}}) {node {uuid}}\n}";
26
36
  export const MUT_ADDNODE: "mutation AddNode($uuid: String!, $leafnodetype: String, $data: String!, $graphdomain: String!, $graphappid: String!, $provdomain: String!, $provappid: String!) {\n addNode(input: [{uuid: $uuid, leafnodetype: $leafnodetype, graph: {domain: $graphdomain, appid: $graphappid}, provenance: {domain: $provdomain, appid: $provappid}, data: $data}]) {node {uuid}}\n}";
27
37
  export const MUT_DELNODE: "mutation DeleteNode($uuid: String!) {\n deleteNode(nfilter: {uuid: {eq: $uuid}}) {node {uuid}}\n}";
28
- export const endpoint_subs: string;
29
- export const websocket_subs: string;
30
- export const endpoint_qm: string;
38
+ export let endpoint_subs: string;
39
+ export let websocket_subs: string;
40
+ export let endpoint_qm: string;
@@ -1,8 +1,8 @@
1
1
  export function initializeLEAFlakeGQLClient({ _clientConfig, _metamodel, _sessionid, }?: {
2
2
  _clientConfig?: {
3
- dburi_subs: string | undefined;
4
- dburi_subs_ws: string | undefined;
5
- dburi_qm: string | undefined;
3
+ dburi_subs: string;
4
+ dburi_subs_ws: string;
5
+ dburi_qm: string;
6
6
  } | undefined;
7
7
  _metamodel?: {
8
8
  _version: string;
@@ -33,9 +33,11 @@ import { mutateAddNode } from "./index.core.js";
33
33
  import { mutateDelNode } from "./index.core.js";
34
34
  import { mutateAddEdge } from "./index.core.js";
35
35
  import { mutateDelEdge } from "./index.core.js";
36
+ import { getLEAFgqlEndpoints } from "./index.core.js";
37
+ import { setLEAFgqlEndpoints } from "./index.core.js";
36
38
  import { _breezyforeststdlib_name } from "./index.core.js";
37
39
  import { _edge_handle_dict } from "./index.core.js";
38
40
  import { _edge_style_dict } from "./index.core.js";
39
41
  import { _leafgraph } from "./index.core.js";
40
42
  import { _leafelement } from "./index.core.js";
41
- export { executeLEAFLogic, executeLEAFLogicInSync, subscribeToLEAFLogic, driveDataflowByCtrlflow, parseAddressableGraph, initializeLEAFlakeGQLClient, init_gRuntimeLEAFlisp, runtimeEtaTree, etaReduceDataflowComponent, initLEAFIOapi, initializeMasterSubsDirectory, initializeSubsMain, reconstructLEAFGraph, analyzeLEAFGraph, LEAFIOmetamodel, _leafstdlib_dataflow_api, _breezyforeststdlib_hierarchy, createGQLClient, doBottle, doUnbottle, destroySoundStageNode, initializeSoundStage, parseJsonToLEAFlisp, runLEAFlispcode, SHA1, etaTreeForest, encodeUnicode, decodeUnicode, fetchMultiKeyedData, setMultiKeyedData, mutateUpdateNode, mutateAddNode, mutateDelNode, mutateAddEdge, mutateDelEdge, _breezyforeststdlib_name, _edge_handle_dict, _edge_style_dict, _leafgraph, _leafelement };
43
+ export { executeLEAFLogic, executeLEAFLogicInSync, subscribeToLEAFLogic, driveDataflowByCtrlflow, parseAddressableGraph, initializeLEAFlakeGQLClient, init_gRuntimeLEAFlisp, runtimeEtaTree, etaReduceDataflowComponent, initLEAFIOapi, initializeMasterSubsDirectory, initializeSubsMain, reconstructLEAFGraph, analyzeLEAFGraph, LEAFIOmetamodel, _leafstdlib_dataflow_api, _breezyforeststdlib_hierarchy, createGQLClient, doBottle, doUnbottle, destroySoundStageNode, initializeSoundStage, parseJsonToLEAFlisp, runLEAFlispcode, SHA1, etaTreeForest, encodeUnicode, decodeUnicode, fetchMultiKeyedData, setMultiKeyedData, mutateUpdateNode, mutateAddNode, mutateDelNode, mutateAddEdge, mutateDelEdge, getLEAFgqlEndpoints, setLEAFgqlEndpoints, _breezyforeststdlib_name, _edge_handle_dict, _edge_style_dict, _leafgraph, _leafelement };