mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-18 13:02:11 +03:00
63cff8b731
This commit introduces an "experimental" backend adapter to the GraphQL Engine. It defines a high-level interface which will eventually be used as the basis for implementing separate data source query generation & marshaling services that communicate with the GraphQL Engine Server via some protocol. PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2684 Co-authored-by: awjchen <13142944+awjchen@users.noreply.github.com> Co-authored-by: Chris Parks <592078+cdparks@users.noreply.github.com> GitOrigin-RevId: 4463b682142ad6e069e223b88b14db511f634768
32 lines
1.0 KiB
Haskell
32 lines
1.0 KiB
Haskell
module Hasura.Experimental.Schema.Column
|
|
( Column (..),
|
|
)
|
|
where
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
import Hasura.Experimental.IR.Column qualified as Column (Name)
|
|
import Hasura.Experimental.IR.Scalar.Type qualified as Scalar (Type)
|
|
import Hasura.Prelude
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
-- | A schematic representation which captures common attributes associated
|
|
-- with a piece of data that is stored in a given backend.
|
|
--
|
|
-- These attributes ascribe meaningful semantics to the data that they are
|
|
-- associated with.
|
|
--
|
|
-- cf. https://en.wikipedia.org/wiki/Column_(database)
|
|
-- https://www.postgresql.org/docs/13/ddl-basics.html
|
|
--
|
|
-- NOTE(cdparks): Instead of an isNullable flag, should we instead
|
|
-- add a Nullable constructor to Scalar.Type?
|
|
data Column = Column
|
|
{ name :: Column.Name,
|
|
type_ :: Scalar.Type,
|
|
isNullable :: Bool,
|
|
description :: Maybe Text
|
|
}
|
|
deriving stock (Data, Eq, Generic, Ord, Show)
|