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

Virtual fields in batch not included in graph's metadata #27

Open
fishtreesugar opened this issue Feb 1, 2025 · 0 comments
Open

Virtual fields in batch not included in graph's metadata #27

fishtreesugar opened this issue Feb 1, 2025 · 0 comments

Comments

@fishtreesugar
Copy link

fishtreesugar commented Feb 1, 2025

reproduce:

Mix.install([
  {:pacer, "~> 0.1.6"}
])

defmodule Foo do
  use Pacer.Workflow

  graph do
    field(:foo, virtual?: true)
    batch :bar do
      field(:baz, resolver: &__MODULE__.one/1, default: nil, virtual?: true)
      field(:quux, resolver: &__MODULE__.one/1, default: nil, virtual?: true)
    end
  end

  def one(_), do: 1
end

 [:foo] = Foo.__graph__(:virtual_fields) # matched
 [:foo, :baz, :quux] = Foo.__graph__(:virtual_fields) # MatchError
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