Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
nalchevanidze committed Apr 21, 2024
1 parent b629ff6 commit 6831419
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,16 +91,16 @@ getFieldTypeName name = checkTypeExistence name $> packName (toHaskellTypeName n
getFieldName :: (CodeGenM m) => FieldName -> m FieldName
getFieldName fieldName = do
ServerCodeGenContext {hasNamespace, currentTypeName} <- ask
pure
$ if hasNamespace
pure $
if hasNamespace
then maybe fieldName (`camelCaseFieldName` fieldName) currentTypeName
else fieldName

getEnumName :: (MonadReader ServerCodeGenContext m) => TypeName -> m CodeGenTypeName
getEnumName enumName = do
ServerCodeGenContext {hasNamespace, currentTypeName} <- ask
pure
$ if hasNamespace
pure $
if hasNamespace
then CodeGenTypeName (map coerce $ maybeToList currentTypeName) [] enumName
else fromTypeName enumName

Expand Down

0 comments on commit 6831419

Please sign in to comment.