Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data RootFieldAlias = RootFieldAlias {
- _rfaNamespace :: !(Maybe Name)
- _rfaAlias :: !Name
- mkUnNamespacedRootFieldAlias :: Name -> RootFieldAlias
- mkNamespacedRootFieldAlias :: Name -> Name -> RootFieldAlias
- type RootFieldMap = InsOrdHashMap RootFieldAlias
- data NamespacedField a
- = NotNamespaced a
- | Namespaced (InsOrdHashMap Name a)
- namespacedField :: (a -> b) -> (InsOrdHashMap Name a -> b) -> NamespacedField a -> b
- type NamespacedFieldMap a = InsOrdHashMap Name (NamespacedField a)
- flattenNamespaces :: forall a. NamespacedFieldMap a -> RootFieldMap a
- unflattenNamespaces :: RootFieldMap a -> NamespacedFieldMap a
- customizeNamespace :: forall n a. MonadParse n => Maybe Name -> (Name -> ParsedSelection a -> a) -> MkTypename -> [FieldParser n a] -> [FieldParser n (NamespacedField a)]
Documentation
data RootFieldAlias Source #
RootFieldAlias | |
|
Instances
mkUnNamespacedRootFieldAlias :: Name -> RootFieldAlias Source #
mkNamespacedRootFieldAlias :: Name -> Name -> RootFieldAlias Source #
type RootFieldMap = InsOrdHashMap RootFieldAlias Source #
data NamespacedField a Source #
NotNamespaced a | Normal field |
Namespaced (InsOrdHashMap Name a) | Namespace field with other fields nested within |
Instances
Functor NamespacedField Source # | |
Defined in Hasura.GraphQL.Namespace fmap :: (a -> b) -> NamespacedField a -> NamespacedField b # (<$) :: a -> NamespacedField b -> NamespacedField a # | |
Eq a => Eq (NamespacedField a) Source # | |
Defined in Hasura.GraphQL.Namespace (==) :: NamespacedField a -> NamespacedField a -> Bool # (/=) :: NamespacedField a -> NamespacedField a -> Bool # | |
Show a => Show (NamespacedField a) Source # | |
Defined in Hasura.GraphQL.Namespace showsPrec :: Int -> NamespacedField a -> ShowS # show :: NamespacedField a -> String # showList :: [NamespacedField a] -> ShowS # |
namespacedField :: (a -> b) -> (InsOrdHashMap Name a -> b) -> NamespacedField a -> b Source #
type NamespacedFieldMap a = InsOrdHashMap Name (NamespacedField a) Source #
flattenNamespaces :: forall a. NamespacedFieldMap a -> RootFieldMap a Source #
unflattenNamespaces :: RootFieldMap a -> NamespacedFieldMap a Source #
customizeNamespace :: forall n a. MonadParse n => Maybe Name -> (Name -> ParsedSelection a -> a) -> MkTypename -> [FieldParser n a] -> [FieldParser n (NamespacedField a)] Source #
Wrap the field parser results in NamespacedField