Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data RootFieldsCustomization = RootFieldsCustomization {
- _rootfcNamespace :: Maybe Name
- _rootfcPrefix :: Maybe Name
- _rootfcSuffix :: Maybe Name
- emptyRootFieldsCustomization :: RootFieldsCustomization
- data SourceTypeCustomization = SourceTypeCustomization {
- _stcPrefix :: Maybe Name
- _stcSuffix :: Maybe Name
- emptySourceTypeCustomization :: SourceTypeCustomization
- mkCustomizedTypename :: Maybe SourceTypeCustomization -> NamingCase -> MkTypename
- mkCustomizedFieldName :: Maybe RootFieldsCustomization -> NamingCase -> MkRootFieldName
- applyTypeCust :: Maybe SourceTypeCustomization -> NamingCase -> Name -> Name
- applyFieldCust :: Maybe RootFieldsCustomization -> NamingCase -> Name -> Name
- applyTypeNameCaseCust :: NamingCase -> Name -> Name
- applyFieldNameCaseCust :: NamingCase -> Name -> Name
- getTextFieldName :: NamingCase -> GQLNameIdentifier -> Text
- applyTypeNameCaseIdentifier :: NamingCase -> GQLNameIdentifier -> Name
- getTextTypeName :: NamingCase -> GQLNameIdentifier -> Text
- applyFieldNameCaseIdentifier :: NamingCase -> GQLNameIdentifier -> Name
- applyEnumValueCase :: NamingCase -> Name -> Name
- applyPrefixSuffix :: Maybe Name -> Maybe Name -> NamingCase -> Bool -> Name -> Name
- concatPrefixSuffix :: NamingCase -> Bool -> NonEmpty (Name, NameOrigin) -> Name
- data SourceCustomization = SourceCustomization {}
- emptySourceCustomization :: SourceCustomization
- getRootFieldsCustomization :: SourceCustomization -> RootFieldsCustomization
- getSourceTypeCustomization :: SourceCustomization -> SourceTypeCustomization
- getNamingConvention :: SourceCustomization -> Maybe NamingCase -> NamingCase
- newtype MkRootFieldName = MkRootFieldName {
- runMkRootFieldName :: Name -> Name
- getRootFieldsCustomizer :: forall m. MonadError QErr m => SourceCustomization -> SupportedNamingCase -> Maybe NamingCase -> m MkRootFieldName
- withSourceCustomization :: forall m r a. (MonadReader r m, Has MkTypename r, Has NamingCase r, MonadError QErr m) => SourceCustomization -> SupportedNamingCase -> Maybe NamingCase -> m a -> m a
- getNamingCase :: forall m. MonadError QErr m => SourceCustomization -> SupportedNamingCase -> Maybe NamingCase -> m NamingCase
- withNamingCaseCustomization :: forall m r a. (MonadReader r m, Has NamingCase r) => NamingCase -> m a -> m a
- newtype CustomizeRemoteFieldName = CustomizeRemoteFieldName {
- runCustomizeRemoteFieldName :: Name -> Name -> Name
- withRemoteFieldNameCustomization :: forall m r a. (MonadReader r m, Has CustomizeRemoteFieldName r) => CustomizeRemoteFieldName -> m a -> m a
- mkSelectField :: GQLNameIdentifier -> GQLNameIdentifier
- mkSelectAggregateField :: GQLNameIdentifier -> GQLNameIdentifier
- mkSelectByPkField :: GQLNameIdentifier -> GQLNameIdentifier
- mkInsertField :: GQLNameIdentifier -> GQLNameIdentifier
- mkInsertOneField :: GQLNameIdentifier -> GQLNameIdentifier
- mkUpdateField :: GQLNameIdentifier -> GQLNameIdentifier
- mkUpdateByPkField :: GQLNameIdentifier -> GQLNameIdentifier
- mkUpdateManyField :: GQLNameIdentifier -> GQLNameIdentifier
- mkDeleteField :: GQLNameIdentifier -> GQLNameIdentifier
- mkDeleteByPkField :: GQLNameIdentifier -> GQLNameIdentifier
- mkRelayConnectionField :: GQLNameIdentifier -> GQLNameIdentifier
- mkSelectStreamField :: GQLNameIdentifier -> GQLNameIdentifier
- mkMultiRowUpdateTypeName :: GQLNameIdentifier -> GQLNameIdentifier
- mkOnConflictTypeName :: GQLNameIdentifier -> GQLNameIdentifier
- mkTableConstraintTypeName :: GQLNameIdentifier -> GQLNameIdentifier
- mkTableAggregateTypeName :: GQLNameIdentifier -> GQLNameIdentifier
- mkTableAggregateFieldTypeName :: GQLNameIdentifier -> GQLNameIdentifier
- mkFunctionArgsTypeName :: Name -> GQLNameIdentifier -> GQLNameIdentifier
- mkTableBoolExpTypeName :: GQLNameIdentifier -> GQLNameIdentifier
- mkTableTypeName :: GQLNameIdentifier -> GQLNameIdentifier
- mkTableInsertInputTypeName :: GQLNameIdentifier -> GQLNameIdentifier
- mkTableObjRelInsertInputTypeName :: GQLNameIdentifier -> GQLNameIdentifier
- mkTableArrRelInsertInputTypeName :: GQLNameIdentifier -> GQLNameIdentifier
- mkTableMutationResponseTypeName :: GQLNameIdentifier -> GQLNameIdentifier
- mkTableOrderByTypeName :: GQLNameIdentifier -> GQLNameIdentifier
- mkTableAggregateOrderByTypeName :: GQLNameIdentifier -> GQLNameIdentifier
- mkTableAggOperatorTypeName :: GQLNameIdentifier -> Name -> GQLNameIdentifier
- mkTableSelectColumnTypeName :: GQLNameIdentifier -> GQLNameIdentifier
- mkTableUpdateColumnTypeName :: GQLNameIdentifier -> GQLNameIdentifier
- mkTableOperatorInputTypeName :: GQLNameIdentifier -> GQLNameIdentifier -> GQLNameIdentifier
- mkTablePkColumnsInputTypeName :: GQLNameIdentifier -> GQLNameIdentifier
- mkEnumTableTypeName :: GQLNameIdentifier -> Maybe Name -> GQLNameIdentifier
Documentation
data RootFieldsCustomization Source #
RootFieldsCustomization | |
|
Instances
data SourceTypeCustomization Source #
SourceTypeCustomization | |
|
Instances
applyTypeCust :: Maybe SourceTypeCustomization -> NamingCase -> Name -> Name Source #
apply prefix and suffix to type name according to the source customization
applyFieldCust :: Maybe RootFieldsCustomization -> NamingCase -> Name -> Name Source #
apply prefix and suffix to field name according to the source customization
applyTypeNameCaseCust :: NamingCase -> Name -> Name Source #
apply naming convention to type name
applyFieldNameCaseCust :: NamingCase -> Name -> Name Source #
apply naming convention to field name
getTextFieldName :: NamingCase -> GQLNameIdentifier -> Text Source #
returns field name according to the naming conventions as Text
applyTypeNameCaseIdentifier :: NamingCase -> GQLNameIdentifier -> Name Source #
applies naming convention and returns field name
Note: This can't possibly fail as GQLNameIdentifier
contains already
validated identifiers
getTextTypeName :: NamingCase -> GQLNameIdentifier -> Text Source #
returns type name according to the naming conventions as Text
applyFieldNameCaseIdentifier :: NamingCase -> GQLNameIdentifier -> Name Source #
applies naming convention and returns type name
Note: This can't possibly fail as GQLNameIdentifier
contains already
validated identifiers
applyEnumValueCase :: NamingCase -> Name -> Name Source #
applyPrefixSuffix :: Maybe Name -> Maybe Name -> NamingCase -> Bool -> Name -> Name Source #
appendprepend the suffixprefix in the graphql name
concatPrefixSuffix :: NamingCase -> Bool -> NonEmpty (Name, NameOrigin) -> Name Source #
data SourceCustomization Source #
Instances
newtype MkRootFieldName Source #
Function to apply root field name customizations.
MkRootFieldName | |
|
Instances
Semigroup MkRootFieldName Source # | |
Defined in Hasura.RQL.Types.SourceCustomization (<>) :: MkRootFieldName -> MkRootFieldName -> MkRootFieldName # sconcat :: NonEmpty MkRootFieldName -> MkRootFieldName # stimes :: Integral b => b -> MkRootFieldName -> MkRootFieldName # | |
Monoid MkRootFieldName Source # | |
Defined in Hasura.RQL.Types.SourceCustomization mappend :: MkRootFieldName -> MkRootFieldName -> MkRootFieldName # mconcat :: [MkRootFieldName] -> MkRootFieldName # |
getRootFieldsCustomizer :: forall m. MonadError QErr m => SourceCustomization -> SupportedNamingCase -> Maybe NamingCase -> m MkRootFieldName Source #
withSourceCustomization :: forall m r a. (MonadReader r m, Has MkTypename r, Has NamingCase r, MonadError QErr m) => SourceCustomization -> SupportedNamingCase -> Maybe NamingCase -> m a -> m a Source #
Inject NamingCase, typename and root field name customizations from SourceCustomization
into
the environment.
getNamingCase :: forall m. MonadError QErr m => SourceCustomization -> SupportedNamingCase -> Maybe NamingCase -> m NamingCase Source #
withNamingCaseCustomization :: forall m r a. (MonadReader r m, Has NamingCase r) => NamingCase -> m a -> m a Source #
newtype CustomizeRemoteFieldName Source #
CustomizeRemoteFieldName | |
|
withRemoteFieldNameCustomization :: forall m r a. (MonadReader r m, Has CustomizeRemoteFieldName r) => CustomizeRemoteFieldName -> m a -> m a Source #
mkFunctionArgsTypeName :: Name -> GQLNameIdentifier -> GQLNameIdentifier Source #
mkTableAggOperatorTypeName :: GQLNameIdentifier -> Name -> GQLNameIdentifier Source #
mkTableOperatorInputTypeName :: GQLNameIdentifier -> GQLNameIdentifier -> GQLNameIdentifier Source #
mkEnumTableTypeName :: GQLNameIdentifier -> Maybe Name -> GQLNameIdentifier Source #