graphql-engine-1.0.0: GraphQL API over Postgres
Safe HaskellNone
LanguageHaskell2010

Hasura.GraphQL.Schema.Node

Description

A collection of types and utilities around the Node GraphQL type exposed by the Relay API.

Synopsis

Documentation

data NodeId Source #

Instances

Instances details
FromJSON NodeId Source # 
Instance details

Defined in Hasura.GraphQL.Schema.Node

Methods

parseJSON :: Value -> Parser NodeId

parseJSONList :: Value -> Parser [NodeId]

data V1NodeId Source #

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

data V2NodeId b Source #

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

Instances details
Eq NodeIdVersion Source # 
Instance details

Defined in Hasura.GraphQL.Schema.Node

Show NodeIdVersion Source # 
Instance details

Defined in Hasura.GraphQL.Schema.Node

data NodeInfo b Source #

All the information required to craft a query to a row pointed to by a NodeId.

newtype TableMap b Source #

Constructors

TableMap (HashMap (TableName b) (NodeInfo b)) 

findNode :: forall b. Backend b => SourceName -> TableName b -> NodeMap -> Maybe (NodeInfo b) Source #

Given a source name and table name, peform the double lookup within a NodeMap.