Skip to content

Expose list of atoms #18

@wolflee

Description

@wolflee

Exposing a list of atoms as in https://github.com/elixir-maru/maru_entity#example does not work.

For example,

defmodule PostEntity do
  use Maru.Entity

  expose [:id, :title]
  expose :comments, using: List[CommentEntity], batch: PostCommentBatchHelper
end

will cause compilation error like:

== Compilation error in file lib/entity/serializers.ex ==
** (FunctionClauseError) no function clause matching in Maru.Entity.expose/1
    expanding macro: Maru.Entity.expose/1
    lib/entity/serializers.ex:19: PostEntity (module)
    (elixir) lib/kernel/parallel_compiler.ex:198: anonymous fn/4 in Kernel.ParallelCompiler.spawn_workers/6

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions