| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Hasura.GraphQL.Schema.Node
Description
A collection of types and utilities around the Node GraphQL
type exposed by the Relay API.
Synopsis
- data NodeId
- data V1NodeId = V1NodeId {
- _ni1Table :: QualifiedTable
- _ni1Columns :: NESeq Value
- data V2NodeId b = V2NodeId {
- _ni2Source :: SourceName
- _ni2Table :: TableName b
- _ni2Columns :: NESeq Value
- parseNodeIdV1 :: [Value] -> Parser V1NodeId
- data NodeIdVersion
- nodeIdVersionInt :: NodeIdVersion -> Int
- currentNodeIdVersion :: NodeIdVersion
- type NodeMap = HashMap SourceName (AnyBackend TableMap)
- data NodeInfo b = NodeInfo {}
- newtype TableMap b = TableMap (HashMap (TableName b) (NodeInfo b))
- findNode :: forall b. Backend b => SourceName -> TableName b -> NodeMap -> Maybe (NodeInfo b)
Documentation
Constructors
| NodeIdV1 V1NodeId | |
| NodeIdV2 (AnyBackend V2NodeId) |
Instances
| FromJSON NodeId Source # | |
Defined in Hasura.GraphQL.Schema.Node | |
V1 format of a node.
This id does NOT uniquely identify the table properly, as it only knows the table's name, but doesn't store a source name.
Constructors
| V1NodeId | |
Fields
| |
V2 format of a node.
Uniquely identifies a table with source name and table name, and uniquely identifies a row within that table with a list of primary key values.
Constructors
| V2NodeId | |
Fields
| |
parseNodeIdV1 :: [Value] -> Parser V1NodeId Source #
data NodeIdVersion Source #
Enum representing the supported versions of the API.
Constructors
| NIVersion1 | |
| NIVersion2 |
Instances
| Eq NodeIdVersion Source # | |
Defined in Hasura.GraphQL.Schema.Node Methods (==) :: NodeIdVersion -> NodeIdVersion -> Bool # (/=) :: NodeIdVersion -> NodeIdVersion -> Bool # | |
| Show NodeIdVersion Source # | |
Defined in Hasura.GraphQL.Schema.Node Methods showsPrec :: Int -> NodeIdVersion -> ShowS # show :: NodeIdVersion -> String # showList :: [NodeIdVersion] -> ShowS # | |
nodeIdVersionInt :: NodeIdVersion -> Int Source #
type NodeMap = HashMap SourceName (AnyBackend TableMap) Source #