Field | Type | Label | Description |
filter | Filter |
|
|
aggregate | Aggregate |
|
|
field | string |
|
Field | Validations |
filter |
|
field |
|
AuthTarget is the payload/input to Authorizer expressions
Field | Type | Label | Description |
user | Doc | user is the user making the request |
|
target | google.protobuf.Struct | target is the request/response represented as a Struct |
|
headers | AuthTarget.HeadersEntry | repeated | headers are the request headers |
Field | Validations |
user |
|
Field | Type | Label | Description |
key | string |
|
|
value | string |
|
Authorizer is a graph primitive used for authorizing inbound requests and/or responses(see AuthTarget)
Field | Type | Label | Description |
name | string | name is the unique name of the authorizer |
|
method | string | method is the rpc method that will invoke the authorizer |
|
expression | string | expression is the boolean CEL expression that evaluates either the request or response body |
|
target_requests | bool | target_responses sets the authorizer to evaluate request bodies |
|
target_responses | bool | target_responses sets the authorizer to evaluate response bodies |
Field | Validations |
name |
|
method |
|
expression |
|
Authorizers is an array of authorizer
Field | Type | Label | Description |
authorizers | Authorizer | repeated |
|
Boolean is a simple boolean value
Field | Type | Label | Description |
value | bool |
|
ConnectFilter is used to fetch connections related to a single noted
Field | Type | Label | Description |
doc_ref | Ref | doc_ref is the ref to the target doc. (validator.field) = {msg_exists : true}] |
|
gtype | string | gtype is the type of connections to return. (validator.field) = {regex : "^.{1,225}$"} |
|
expression | string | expression is a CEL expression used to filter connections/modes |
|
limit | uint64 | limit is the maximum number of items to return. (validator.field) = {int_gt : 0} |
|
sort | string | custom sorting of the results. (validator.field) = {regex : "((^|, )(|ref.gid|ref.gtype|^attributes.(.*)))+$"} |
|
seek | string | seek to a specific key for pagination |
|
reverse | bool | reverse the results |
Field | Validations |
doc_ref |
|
gtype |
|
limit |
|
sort |
|
Connection is a graph primitive that represents a relationship between two docs
Field | Type | Label | Description |
ref | Ref | ref is the ref to the connection |
|
attributes | google.protobuf.Struct | attributes are k/v pairs |
|
directed | bool | directed is false if the connection is bi-directional |
|
from | Ref | from is the doc ref that is the source of the connection |
|
to | Ref | to is the doc ref that is the destination of the connection |
Field | Validations |
ref |
|
from |
|
to |
|
ConnectionConstructor is used to create an Connection
Field | Type | Label | Description |
ref | RefConstructor | ref is the ref to the new Connection. If an id isn't present, one will be generated. |
|
attributes | google.protobuf.Struct | attributes are k/v pairs |
|
directed | bool | directed is false if the connection is bi-directional |
|
from | Ref | from is the doc ref that is the root of the connection |
|
to | Ref | to is the doc ref that is the destination of the connection |
Field | Validations |
ref |
|
from |
|
to |
|
ConnectionConstructors is an array of ConnectionConstructor
Field | Type | Label | Description |
connections | ConnectionConstructor | repeated |
|
Connections is an array of Connection
Field | Type | Label | Description |
connections | Connection | repeated |
|
seek_next | string |
|
Constraint a graph primitive used to validate custom doc/connection constraints
Field | Type | Label | Description |
name | string |
|
|
gtype | string |
|
|
expression | string |
|
|
target_docs | bool | if target_docs is true, this validator will be applied to documents. |
|
target_connections | bool | if target_connections is true, this validator will be applied to connections. |
Field | Validations |
name |
|
gtype |
|
expression |
|
Field | Type | Label | Description |
constraints | Constraint | repeated |
|
Doc is a Graph primitive representing a single entity/resource. It is connected to other docs via Connections
Field | Type | Label | Description |
ref | Ref | ref is the ref to the doc |
|
attributes | google.protobuf.Struct | k/v pairs |
Field | Validations |
ref |
|
DocConstructor is used to create a doc
Field | Type | Label | Description |
ref | RefConstructor | ref is the ref to the new Doc. If an id isn't present, one will be generated. |
|
attributes | google.protobuf.Struct | arbitrary k/v pairs |
Field | Validations |
ref |
|
DocConstructor is used to create a batch of docs
Field | Type | Label | Description |
docs | DocConstructor | repeated | docs is an array of doc constructors |
Docs is an array of docs
Field | Type | Label | Description |
docs | Doc | repeated | docs is an array of docs |
seek_next | string |
|
Edit patches the attributes of a Doc or Connection
Field | Type | Label | Description |
ref | Ref | ref is the ref to the target doc/connection to patch |
|
attributes | google.protobuf.Struct | attributes are k/v pairs used to overwrite k/v pairs on a doc/connection |
Field | Validations |
ref |
|
EditFilter is used to patch/edit docs/connections
Field | Type | Label | Description |
filter | Filter | filter is used to filter docs/connections to patch |
|
attributes | google.protobuf.Struct | attributes are k/v pairs used to overwrite k/v pairs on all docs/connections that pass the filter |
ExistsFilter is used as input into all Exists(boolean) related queries.
Field | Type | Label | Description |
gtype | string |
|
|
expression | string |
|
|
seek | string | seek to a specific key for pagination |
|
reverse | bool | reverse the results |
|
index | string | search in a specific index |
Field | Validations |
gtype |
|
expression |
|
Field | Type | Label | Description |
expression | string | expression is a CEL expression used to filter connections/nodes |
Filter is a generic filter using Common Expression Language
Field | Type | Label | Description |
gtype | string | gtype is the doc/connection type to be filtered |
|
expression | string | expression is a CEL expression used to filter connections/modes |
|
limit | uint64 | limit is the maximum number of items to return |
|
sort | string | custom sorting of the results. |
|
seek | string | seek to a specific key for pagination |
|
reverse | bool | reverse the results |
|
index | string | search in a specific index |
Field | Validations |
gtype |
|
limit |
|
sort |
|
Field | Type | Label | Description |
open_id_discovery | string | open id connect discovery uri ex: https://accounts.google.com/.well-known/openid-configuration (env: GRAPHIK_OPEN_ID) |
|
storage_path | string | persistant storage ref (env: GRAPHIK_STORAGE_PATH) |
|
allow_headers | string | repeated | cors allow headers (env: GRAPHIK_ALLOW_HEADERS) |
allow_methods | string | repeated | cors allow methods (env: GRAPHIK_ALLOW_METHODS) |
allow_origins | string | repeated | cors allow origins (env: GRAPHIK_ALLOW_ORIGINS) |
root_users | string | repeated | root user is a list of email addresses that bypass authorizers. (env: GRAPHIK_ROOT_USERS) |
tls_cert | string |
|
|
tls_key | string |
|
|
require_request_authorizers | bool |
|
|
require_response_authorizers | bool |
|
|
join_raft | string |
|
|
raft_peer_id | string |
|
|
listen_port | int64 |
|
|
raft_secret | string |
|
|
debug | bool |
|
|
environment | string |
|
|
raft_advertise | string |
|
|
raft_max_pool | int64 |
|
|
mutual_tls | bool |
|
|
ca_cert | string |
|
|
enable_ui | bool |
|
Graph is an array of docs and connections
Field | Type | Label | Description |
docs | Docs | docs are docs present in the graph |
|
connections | Connections | connections are connections present in the graph |
Index is a secondary index
Field | Type | Label | Description |
name | string |
|
|
gtype | string | gtype is the doc/connection type to be filtered |
|
expression | string | expression is a CEL expression used to filter connections/modes |
|
target_docs | bool | if target_docs is true, this index will be applied to documents. |
|
target_connections | bool | if target_connections is true, this index will be applied to connections. |
Field | Validations |
name |
|
gtype |
|
expression |
|
IndexConstructor is used to construct Indexes
Field | Type | Label | Description |
name | string | name is the unique name of the Index |
|
gtype | string | gtype is the doc/connection type to be filtered |
|
expression | string | expression is a CEL expression used to filter connections/modes |
|
target_docs | bool | if target_docs is true, this index will be applied to documents. |
|
target_connections | bool | if target_connections is true, this index will be applied to connections. |
Field | Validations |
name |
|
gtype |
|
expression |
|
Indexes is an array of Index
Field | Type | Label | Description |
indexes | Index | repeated |
|
Message is received on PubSub subscriptions
Field | Type | Label | Description |
channel | string | channel is the channel the message was sent to |
|
data | google.protobuf.Struct | data is the data sent with the message |
|
user | Ref | user is the sender that triggered/sent the message |
|
timestamp | google.protobuf.Timestamp | timestamp is when the message was sent |
|
method | string |
|
Field | Validations |
channel |
|
data |
|
user |
|
timestamp |
|
method |
|
Number is a simple double/float64 value
Field | Type | Label | Description |
value | double |
|
OutboundMessage is a message to be published to a pubsub channel
Field | Type | Label | Description |
channel | string | channel is the target channel to send the message to |
|
data | google.protobuf.Struct | data is the data to send with the message |
Field | Validations |
channel |
|
data |
|
Field | Type | Label | Description |
node_id | string |
|
|
addr | string |
|
Pong returns PONG if the server is healthy
Field | Type | Label | Description |
message | string | message returns PONG if healthy |
Field | Type | Label | Description |
user | Doc |
|
|
method | string |
|
|
set_docs | Doc | repeated |
|
set_connections | Connection | repeated |
|
del_docs | Ref | repeated |
|
del_connections | Ref | repeated |
|
set_indexes | Indexes |
|
|
set_authorizers | Authorizers |
|
|
set_constraints | Constraints |
|
|
send_message | Message |
|
|
set_triggers | Triggers |
|
Field | Type | Label | Description |
leader | string |
|
|
membership | Membership |
|
|
peers | Peer | repeated |
|
stats | RaftState.StatsEntry | repeated |
|
Field | Type | Label | Description |
key | string |
|
|
value | string |
|
Ref describes a doc/connection type & id
Field | Type | Label | Description |
gtype | string | gtype is the type of the doc/connection ex: pet |
|
gid | string | gid is the unique id of the doc/connection within the context of it's type |
Field | Validations |
gtype |
|
gid |
|
RefConstructor creates a new Ref
Field | Type | Label | Description |
gtype | string | gtype is the type of the doc/connection ex: pet |
|
gid | string | gid is the unique id of the doc/connection within the context of it's type |
Field | Validations |
gtype |
|
Refs is an array of refs
Field | Type | Label | Description |
refs | Ref | repeated |
|
Schema returns registered connection & doc types
Field | Type | Label | Description |
connection_types | string | repeated | connection_types are the types of connections in the graph |
doc_types | string | repeated | doc_types are the types of docs in the graph |
authorizers | Authorizers |
|
|
constraints | Constraints |
|
|
indexes | Indexes |
|
|
triggers | Triggers |
|
Field | Type | Label | Description |
filter | Filter |
|
|
gtype | string |
|
|
attributes | google.protobuf.Struct | attributes are k/v pairs |
|
directed | bool | directed is false if the connection is bi-directional |
|
from | Ref | from is the doc ref that is the root of the connection |
Field | Validations |
from |
|
Field | Type | Label | Description |
filter | Filter |
|
|
gtype | string |
|
|
attributes | google.protobuf.Struct | attributes are k/v pairs |
|
directed | bool | directed is false if the connection is bi-directional |
StreamFilter is used to filter messages in a pubsub channel
Field | Type | Label | Description |
channel | string | channel is the target channel to filter from |
|
expression | string | expression is CEL expression used to filter messages |
|
min | google.protobuf.Timestamp | minimum message timestamp to stream (optional) |
|
max | google.protobuf.Timestamp | maximum message timestamp to stream (optional) |
Field | Validations |
channel |
|
Field | Type | Label | Description |
doc | Doc |
|
|
traversal_path | Ref | repeated |
|
depth | uint64 |
|
|
hops | uint64 |
|
Field | Type | Label | Description |
traversals | Traversal | repeated |
|
Field | Type | Label | Description |
root | Ref |
|
|
doc_expression | string |
|
|
connection_expression | string |
|
|
limit | uint64 |
|
|
sort | string | custom sorting of the results. (validator.field) = {regex : "((^|, )(|ref.gid|ref.gtype|^attributes.(.*)))+$"} |
|
reverse | bool |
|
|
algorithm | Algorithm |
|
|
max_depth | uint64 | maximum degree/depth of nodes to be visited during traversal |
|
max_hops | uint64 | maximum number of nodes to be visited during traversal |
Field | Validations |
root |
|
limit |
|
sort |
|
max_depth |
|
max_hops |
|
Field | Type | Label | Description |
doc_expression | string |
|
|
connection_expression | string |
|
|
limit | uint64 |
|
|
sort | string | custom sorting of the results. (validator.field) = {regex : "((^|, )(|ref.gid|ref.gtype|^attributes.(.*)))+$"} |
|
reverse | bool |
|
|
algorithm | Algorithm |
|
|
max_depth | uint64 | maximum degree/depth of nodes to be visited during traversal |
|
max_hops | uint64 | maximum number of nodes to be visited during traversal |
Field | Validations |
limit |
|
sort |
|
max_depth |
|
max_hops |
|
Trigger may be used to automatically mutate the attributes of documents/connections before they are commited to the database
Field | Type | Label | Description |
name | string | name is the unique name of the authorizer |
|
gtype | string | gtype is the type of doc/connection will invoke the trigger |
|
trigger | string | trigger is the arrow syntax expression that mutates the doc/connection before it is stored ref: https://github.com/graphikDB/trigger |
|
target_docs | bool | if target_docs is true, this trigger will be applied to documents. |
|
target_connections | bool | if target_connections is true, this trigger will be applied to connections. |
Field | Validations |
name |
|
gtype |
|
trigger |
|
Triggers is an array of Trigger
Field | Type | Label | Description |
triggers | Trigger | repeated |
|
Field | Type | Label | Description |
oauth_client_id | string |
|
|
oauth_client_secret | string |
|
|
oauth_authorization_url | string |
|
|
oauth_token_url | string |
|
|
oauth_redirect_url | string |
|
|
oauth_scopes | string | repeated |
|
session_secret | string |
|
Name | Number | Description |
COUNT | 0 | |
SUM | 1 | |
AVG | 2 | |
MAX | 3 | |
MIN | 4 | |
PROD | 5 |
Name | Number | Description |
BFS | 0 | BFS is short for the breadth-first search algorithm |
DFS | 1 | DFS is short for the depth-first search algorithm |
Name | Number | Description |
UNKNOWN | 0 | |
FOLLOWER | 1 | |
CANDIDATE | 2 | |
LEADER | 3 | |
SHUTDOWN | 4 |
DatabaseService is the primary database service
Method Name | Request Type | Response Type | Description |
GetSchema | .google.protobuf.Empty | Schema | GetSchema gets schema about the Graph doc & connection types |
SetAuthorizers | Authorizers | .google.protobuf.Empty | SetAuthorizers sets all of the authorizers in the graph database |
SetIndexes | Indexes | .google.protobuf.Empty | SetIndexes sets all of the indexes in the graph database |
SetConstraints | Constraints | .google.protobuf.Empty | SetConstraints sets all of the constraints in the graph database |
SetTriggers | Triggers | .google.protobuf.Empty | SetTriggers sets all of the triggers in the graph database |
Me | .google.protobuf.Empty | Doc | Me returns a Doc of the currently logged in user |
CreateDoc | DocConstructor | Doc | CreateDoc creates a doc in the graph |
CreateDocs | DocConstructors | Docs | CreateDocs creates a batch of docs in the graph |
PutDoc | Doc | Doc | PutDoc create-or-replaces a Doc in the graph |
PutDocs | Docs | Docs | PutDocs puts a batch of docs in the graph |
GetDoc | Ref | Doc | GetDoc gets a single doc in the graph |
SearchDocs | Filter | Docs | SearchDocs searches the graph for docs |
Traverse | TraverseFilter | Traversals | Traverse executes a depth first search of the graph for docs |
TraverseMe | TraverseMeFilter | Traversals | TraverseMe executes a graph traversal searching for docs related to the currently logged in user |
EditDoc | Edit | Doc | EditDoc patches/edits a docs attributes |
EditDocs | EditFilter | Docs | EditDocs patches a batch of docs attributes that pass the patch filter |
DelDoc | Ref | .google.protobuf.Empty | DelDoc deletes a doc & all of it's connected connections |
DelDocs | Filter | .google.protobuf.Empty | DelDocs deletes a batch of docs that pass the filter |
ExistsDoc | ExistsFilter | Boolean | ExistsDoc searches for a Doc and returns a Boolean indicating if it exists in the graph |
ExistsConnection | ExistsFilter | Boolean | ExistsConnection searches for a Connection and returns a Boolean indicating if it exists in the graph |
HasDoc | Ref | Boolean | HasDoc searches for the Doc by Ref returns a Boolean indicating if it exists in the graph |
HasConnection | Ref | Boolean | HasConnection searches for the Connection by Ref returns a Boolean indicating if it exists in the graph |
CreateConnection | ConnectionConstructor | Connection | CreateConnection creates an connection in the graph |
CreateConnections | ConnectionConstructors | Connections | CreateConnections creates a batch of connections in the graph |
PutConnection | Connection | Connection | PutConnection create-or-replaces a Connection in the graph |
PutConnections | Connections | Connections | PutConnections puts a batch of connections in the graph |
SearchAndConnect | SearchConnectFilter | Connections | searches for documents and forms connections based on whether they pass a filter |
SearchAndConnectMe | SearchConnectMeFilter | Connections | SearchAndConnectMe searches for documents and forms connections from the origin user to the document based on whether they pass a filter |
GetConnection | Ref | Connection | GetConnection gets a single connection in the graph |
SearchConnections | Filter | Connections | SearchConnections searches the graph for connections |
EditConnection | Edit | Connection | EditConnection patches an connections attributes |
EditConnections | EditFilter | Connections | EditConnections patches a batch of connections attributes that pass the patch filter |
DelConnection | Ref | .google.protobuf.Empty | DelConnection deletes an connection from the graph |
DelConnections | Filter | .google.protobuf.Empty | DelConnections deletes a batch of connections that pass the filter |
ConnectionsFrom | ConnectFilter | Connections | ConnectionsFrom returns connections that source from the given doc ref that pass the filter |
ConnectionsTo | ConnectFilter | Connections | ConnectionsTo returns connections that point to the given doc ref that pass the filter |
AggregateDocs | AggFilter | Number | AggregateDocs executes an aggregation function against the graph |
AggregateConnections | AggFilter | Number | |
Broadcast | OutboundMessage | .google.protobuf.Empty | Broadcast broadcasts a message to a pubsub channel |
Stream | StreamFilter | Message stream | Stream subscribes to messages on a pubsub channel |
PushDocConstructors | DocConstructor stream | Doc stream | PushDocConstructors streams DocConstructor to the server, creating them as they're sent and streaming the new doc to the client |
PushConnectionConstructors | ConnectionConstructor stream | Connection stream | PushConnectionConstructors streams ConnectionConstructor to the server, creating them as they're sent and streaming the new connection to the client |
SeedDocs | Doc stream | .google.protobuf.Empty | |
SeedConnections | Connection stream | .google.protobuf.Empty |
Method Name | Request Type | Response Type | Description |
Ping | .google.protobuf.Empty | Pong | Ping returns PONG if the server is health |
JoinCluster | Peer | .google.protobuf.Empty | |
ClusterState | .google.protobuf.Empty | RaftState |
.proto Type | Notes | C++ | Java | Python | Go | C# | PHP | Ruby |
double | double | double | float | float64 | double | float | Float | |
float | float | float | float | float32 | float | float | Float | |
int32 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) |
int64 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. | int64 | long | int/long | int64 | long | integer/string | Bignum |
uint32 | Uses variable-length encoding. | uint32 | int | int/long | uint32 | uint | integer | Bignum or Fixnum (as required) |
uint64 | Uses variable-length encoding. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum or Fixnum (as required) |
sint32 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) |
sint64 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long | int/long | int64 | long | integer/string | Bignum |
fixed32 | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int | int | uint32 | uint | integer | Bignum or Fixnum (as required) |
fixed64 | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum |
sfixed32 | Always four bytes. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) |
sfixed64 | Always eight bytes. | int64 | long | int/long | int64 | long | integer/string | Bignum |
bool | bool | boolean | boolean | bool | bool | boolean | TrueClass/FalseClass | |
string | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String | str/unicode | string | string | string | String (UTF-8) |
bytes | May contain any arbitrary sequence of bytes. | string | ByteString | str | []byte | ByteString | string | String (ASCII-8BIT) |