graphql-engine-1.0.0: GraphQL API over Postgres
Safe HaskellNone
LanguageHaskell2010

Hasura.RQL.DDL.Schema

Description

This module (along with the various Hasura.RQL.DDL.Schema.* modules) provides operations to load and modify the Hasura catalog and schema cache.

  • The catalog refers to the set of PostgreSQL tables and views that store all schema information known by Hasura. This includes any tracked Postgres tables, views, and functions, all remote schemas, and any additionaly Hasura-specific information such as permissions and relationships.

Primitive functions for loading and modifying the catalog are defined in Hasura.RQL.DDL.Schema.Catalog, but most uses are wrapped by other functions to synchronize catalog information with the information in the schema cache.

  • The schema cache is a process-global value of type SchemaCache that stores an in-memory representation of the data stored in the catalog. The in-memory representation is not identical to the data in the catalog, since it has some post-processing applied to it in order to make it easier to consume for other parts of the system, such as GraphQL schema generation. For example, although column information is represented by RawColumnInfo, the schema cache contains “processed” ColumnInfo values, instead.

Ultimately, the catalog is the source of truth for all information contained in the schema cache, but to avoid rebuilding the entire schema cache on every change to the catalog, various functions incrementally update the cache when they modify the catalog.

Documentation

data RunSQLRes Source #

Constructors

RunSQLRes 

Fields

Instances

Instances details
Eq RunSQLRes Source # 
Instance details

Defined in Hasura.RQL.DDL.Schema

Show RunSQLRes Source # 
Instance details

Defined in Hasura.RQL.DDL.Schema

FromJSON RunSQLRes Source # 
Instance details

Defined in Hasura.RQL.DDL.Schema

Methods

parseJSON :: Value -> Parser RunSQLRes

parseJSONList :: Value -> Parser [RunSQLRes]

ToJSON RunSQLRes Source # 
Instance details

Defined in Hasura.RQL.DDL.Schema

Methods

toJSON :: RunSQLRes -> Value

toEncoding :: RunSQLRes -> Encoding

toJSONList :: [RunSQLRes] -> Value

toEncodingList :: [RunSQLRes] -> Encoding

FromRes RunSQLRes Source # 
Instance details

Defined in Hasura.RQL.DDL.Schema

Methods

fromRes :: ResultOk -> ExceptT Text IO RunSQLRes