Safe Haskell | None |
---|---|
Language | Haskell2010 |
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 byRawColumnInfo
, 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
RunSQLRes | |
|
Instances
Eq RunSQLRes Source # | |
Show RunSQLRes Source # | |
FromJSON RunSQLRes Source # | |
Defined in Hasura.RQL.DDL.Schema parseJSON :: Value -> Parser RunSQLRes parseJSONList :: Value -> Parser [RunSQLRes] | |
ToJSON RunSQLRes Source # | |
Defined in Hasura.RQL.DDL.Schema toEncoding :: RunSQLRes -> Encoding toJSONList :: [RunSQLRes] -> Value toEncodingList :: [RunSQLRes] -> Encoding | |
FromRes RunSQLRes Source # | |
Defined in Hasura.RQL.DDL.Schema |