Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose list of atoms #18

Open
wolflee opened this issue Dec 7, 2017 · 0 comments
Open

Expose list of atoms #18

wolflee opened this issue Dec 7, 2017 · 0 comments

Comments

@wolflee
Copy link

wolflee commented Dec 7, 2017

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
@wolflee wolflee changed the title expose list of atoms Expose list of atoms Dec 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant