Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data RootFieldsCustomization = RootFieldsCustomization {}
- data SourceTypeCustomization
- emptySourceTypeCustomization :: SourceTypeCustomization
- mkCustomizedTypename :: Maybe SourceTypeCustomization -> NamingCase -> MkTypename
- 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
- setFieldNameCase :: NamingCase -> TableInfo b -> CustomRootField -> (GQLNameIdentifier -> GQLNameIdentifier) -> GQLNameIdentifier -> Name
- data SourceCustomization = SourceCustomization {}
- emptySourceCustomization :: SourceCustomization
- getSourceTypeCustomization :: SourceCustomization -> SourceTypeCustomization
- data ResolvedSourceCustomization = ResolvedSourceCustomization {}
- mkResolvedSourceCustomization :: SourceCustomization -> NamingCase -> ResolvedSourceCustomization
- newtype MkRootFieldName = MkRootFieldName {
- runMkRootFieldName :: Name -> Name
- getNamingCase :: forall m. MonadError QErr m => SourceCustomization -> SupportedNamingCase -> NamingCase -> m NamingCase
- 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
- mkTableAggregateOrderByOpTypeName :: GQLNameIdentifier -> GQLNameIdentifier -> GQLNameIdentifier
- mkTableAggOperatorTypeName :: GQLNameIdentifier -> GQLNameIdentifier -> GQLNameIdentifier
- mkTableSelectColumnTypeName :: GQLNameIdentifier -> GQLNameIdentifier
- mkTableUpdateColumnTypeName :: GQLNameIdentifier -> GQLNameIdentifier
- mkTableOperatorInputTypeName :: GQLNameIdentifier -> GQLNameIdentifier -> GQLNameIdentifier
- mkTablePkColumnsInputTypeName :: GQLNameIdentifier -> GQLNameIdentifier
- mkEnumTableTypeName :: GQLNameIdentifier -> Maybe Name -> GQLNameIdentifier
- mkStreamCursorInputTypeName :: GQLNameIdentifier -> GQLNameIdentifier
- mkStreamCursorValueInputTypeName :: GQLNameIdentifier -> GQLNameIdentifier
- mkSelectColumnPredTypeName :: GQLNameIdentifier -> GQLNameIdentifier -> GQLNameIdentifier
- mkTableAggregateBoolExpTypeName :: GQLNameIdentifier -> GQLNameIdentifier
- mkGroupByTypeName :: GQLNameIdentifier -> GQLNameIdentifier
- mkGroupByKeyTypeName :: GQLNameIdentifier -> GQLNameIdentifier
- mkGroupByKeyFieldsTypeName :: GQLNameIdentifier -> GQLNameIdentifier
- mkRelationFunctionIdentifier :: GQLNameIdentifier -> Name -> GQLNameIdentifier
- mkRelationFunctionArgumentsFieldName :: GQLNameIdentifier -> Name -> GQLNameIdentifier
- updateColumnsFieldName :: GQLNameIdentifier
- affectedRowsFieldName :: GQLNameIdentifier
- pkColumnsFieldName :: GQLNameIdentifier
Documentation
data RootFieldsCustomization Source #
Instances
data SourceTypeCustomization Source #
Instances
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 #
setFieldNameCase :: NamingCase -> TableInfo b -> CustomRootField -> (GQLNameIdentifier -> GQLNameIdentifier) -> GQLNameIdentifier -> Name Source #
Builds field name with proper case. Please note that this is a pure
function as all the validation has already been done while preparing
GQLNameIdentifier
.
data SourceCustomization Source #
Source customization information as it appears in the metadata.
Instances
data ResolvedSourceCustomization Source #
Source customization as it appears in the SchemaCache.
mkResolvedSourceCustomization :: SourceCustomization -> NamingCase -> ResolvedSourceCustomization Source #
newtype MkRootFieldName Source #
Function to apply root field name customizations.
Instances
Monoid MkRootFieldName Source # | |
Defined in Hasura.RQL.Types.SourceCustomization mappend :: MkRootFieldName -> MkRootFieldName -> MkRootFieldName # mconcat :: [MkRootFieldName] -> MkRootFieldName # | |
Semigroup MkRootFieldName Source # | |
Defined in Hasura.RQL.Types.SourceCustomization (<>) :: MkRootFieldName -> MkRootFieldName -> MkRootFieldName # sconcat :: NonEmpty MkRootFieldName -> MkRootFieldName # stimes :: Integral b => b -> MkRootFieldName -> MkRootFieldName # |
getNamingCase :: forall m. MonadError QErr m => SourceCustomization -> SupportedNamingCase -> NamingCase -> m NamingCase Source #
mkTableAggregateOrderByOpTypeName :: GQLNameIdentifier -> GQLNameIdentifier -> GQLNameIdentifier Source #