Command Line¶
graphctl runs directly, or in a container with deploy/scripts/ctl.sh, which mounts the current directory at /work and reaches the service as http://graphd:8080.
| Command | Purpose |
|---|---|
validate -file F |
Check a segment file |
follows -relay U ... [-author K ...] -out F |
Write follow lists from relays as a segment |
query -q TEXT [-param name=json ...] [-graph G ...] |
Run a pattern query |
get -op OP [-arg name=value ...] [-graph G ...] |
Call an endpoint: node, neighbors, traverse, path, common, suggest, rank, components or proof |
audit -graph G -relay U ... [-watchdog K ...] [-quorum N] |
Rebuild the graph and compare its root |
Flags and environment¶
| Flag | Environment | Meaning |
|---|---|---|
-endpoint |
GRAPH_URL |
Address of the service |
-service |
GRAPH_SERVICE |
Public key the service must sign with |
GRAPH_TOKEN |
Bearer token, if the service requires one | |
ALLOW_PRIVATE |
true allows private and loopback addresses. Off by default |
|
-quorum |
Indexers consulted by audit. 2 by default |
Answers are printed only after their signature, nonce, request and time were checked. Errors go to standard error and the exit status is 1.
Building¶
cd src/data-graph
go build -o . ./cmd/graphd ./cmd/graphctl