Safe Haskell | None |
---|---|
Language | Haskell2010 |
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
Instances
FromJSON NodeId Source # | |
Defined in Hasura.GraphQL.Schema.Node parseJSON :: Value -> Parser NodeId parseJSONList :: Value -> Parser [NodeId] |
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.
V1NodeId | |
|
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 | |
|
parseNodeIdV1 :: [Value] -> Parser V1NodeId Source #
data NodeIdVersion Source #
Enum representing the supported versions of the API.
Instances
Eq NodeIdVersion Source # | |
Defined in Hasura.GraphQL.Schema.Node (==) :: NodeIdVersion -> NodeIdVersion -> Bool # (/=) :: NodeIdVersion -> NodeIdVersion -> Bool # | |
Show NodeIdVersion Source # | |
Defined in Hasura.GraphQL.Schema.Node showsPrec :: Int -> NodeIdVersion -> ShowS # show :: NodeIdVersion -> String # showList :: [NodeIdVersion] -> ShowS # |
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
.