How do you set the batch_size in a api stream call?

I have a stream call from my api and I want to change the default batch size of 250 to a higher number, but when I try to set it like this:

Raw.Record
  |> Ash.Query.new()
  |> Ash.Query.for_read(:all_new, %{last_processed_id: last_processed_id})
  |> Raw.stream!(batch_size: 10_000)

I see in the terminal that it still do a bunch of queries limited by 250. Is this a bug or an I just not putting the batch_size option in the correct place?

This looks like a bug to me. Please open an issue and I’ll take a look

fixed in main :slight_smile:

1 Like