Skip to main content

Module graphql

Module graphql 

Source
Expand description

A Hasura-compatible GraphQL server for the Deep standard (issue #153), so that DeepClient and deepcase connect to clink --serve --graphql.

Each part is a layer over the one below, which it reaches only through Triplets and NamedTypeLinks:

  • store maps the rows of Deep to triplets, under the permission layer;
  • plan translates where to substitution queries;
  • select, mutate and virtual_tables execute a document;
  • server speaks HTTP and both WebSocket subprotocols.

See docs/GRAPHQL.md for the mapping and for what is left out.

Re-exports§

pub use execute::execute;
pub use execute::Auth;
pub use execute::Settings;
pub use json::Json;
pub use server::GraphqlServer;
pub use server::GraphqlShutdown;
pub use store::DeepStore;

Modules§

crypto
What the wire needs of cryptography: SHA-1 for the WebSocket handshake, base64 and HS256 JSON Web Tokens with the claims Hasura reads.
document
GraphQL documents: operations, selections, fragments and values.
execute
Runs a GraphQL document: authorisation, the root fields and introspection.
json
The JSON of GraphQL over HTTP and WebSocket: a value keeps the order of its object keys, so a response lists its fields in the order they were asked.
mutate
insert_T, update_T and delete_T on links and the tables of values.
plan
Hasura’s links_bool_exp as substitution queries.
select
Reading tables: where over plans and checks, ordering, relations, aggregates and the projection of a selection.
server
HTTP and WebSocket transport of the GraphQL layer.
store
The rows of Deep over triplets.
tables
The tables of the Deep schema: their relations, as Hasura’s metadata declares them, and how rows are compared.
virtual_tables
Tables Deep derives from links with triggers and views. Here they are computed from the links when asked, for as long as nothing is written: values and can always, tree and selectors from the Tree* and Selector* links, mp the same paths under its own column names. handlers is empty, as Deep’s handlers do not run here.