Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
A collection of types and utilities around the Node
GraphQL
type exposed by the Relay API.
Synopsis
- data NodeId
- data V1NodeId = V1NodeId {}
- data V2NodeId b = V2NodeId {
- _ni2Source :: SourceName
- _ni2Table :: TableName b
- _ni2Columns :: NESeq Value
- 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
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.
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.
V2NodeId | |
|
data NodeIdVersion Source #
Enum representing the supported versions of the API.
Instances
Show NodeIdVersion Source # | |
Defined in Hasura.GraphQL.Schema.Node showsPrec :: Int -> NodeIdVersion -> ShowS # show :: NodeIdVersion -> String # showList :: [NodeIdVersion] -> ShowS # | |
Eq NodeIdVersion Source # | |
Defined in Hasura.GraphQL.Schema.Node (==) :: NodeIdVersion -> NodeIdVersion -> Bool # (/=) :: NodeIdVersion -> NodeIdVersion -> Bool # |
nodeIdVersionInt :: NodeIdVersion -> Int Source #
type NodeMap = HashMap SourceName (AnyBackend TableMap) Source #
All the information required to craft a query to a row pointed to by a
NodeId
.