felixbuchholz

felixbuchholz

book-ash-framework: AshFramework B6: Seed Albums (page 38)

Hi,

Thanks for this great book!

Not sure if I missed something, if it’s even worth mentioning, or if this was even an intentional side quest to discover how awesomely descriptive errors in Ash can be, but wanted to share in case it’s useful.

After uncommenting the command to run the seed file script for albums and then running mix seed, I got the following error:

** (Ash.Error.Invalid) 
Invalid Error

* Tunez.Music.Artist.read had no matching bulk strategy that could be used.

Requested strategies: [:stream]

Could not use `:stream`: could not stream the query
Could not use `:atomic_batches`: Not in requested strategies
Could not use `:atomic`: Not in requested strategies



Non stream reason:

Action Tunez.Music.Artist.read does not support streaming with one of [:keyset].

There are two ways to handle this.

1.) Use the `allow_stream_with` or `stream_with` options to control what strategies are allowed.
2.) Enable the respective required pagination type on the action read, for example:

    # allow keyset
    pagination keyset?: true, required?: false

    # allow offset
    pagination offset?: true, required?: false

    # allow both
    pagination offset?: true, keyset?: true, required?: false

I fixed it with the first recommendation of number 2.) and it was only a tiny obstacle, so up to you if that warrants a small note mentioning this.

Best,
Felix

Where Next?

Popular Pragmatic Bookshelf topics Top

jimmykiang
This test is broken right out of the box… — FAIL: TestAgent (7.82s) agent_test.go:77: Error Trace: agent_test.go:77 agent_test.go:...
New
jeffmcompsci
Title: Design and Build Great Web APIs - typo “https://company-atk.herokuapp.com/2258ie4t68jv” (page 19, third bullet in URL list) Typo:...
New
jdufour
Hello! On page xix of the preface, it says there is a community forum "… for help if your’re stuck on one of the exercises in this book… ...
New
raul
Page 28: It implements io.ReaderAt on the store type. Sorry if it’s a dumb question but was the io.ReaderAt supposed to be io.ReadAt? ...
New
conradwt
First, the code resources: Page 237: rumbl_umbrella/apps/rumbl/mix.exs Note: That this file is missing. Page 238: rumbl_umbrella/app...
New
brunogirin
When running tox for the first time, I got the following error: ERROR: InterpreterNotFound: python3.10 I realised that I was running ...
New
creminology
Skimming ahead, much of the following is explained in Chapter 3, but new readers (like me!) will hit a roadblock in Chapter 2 with their ...
New
rainforest
Hi, I’ve got a question about the implementation of PubSub when using a Phoenix.Socket.Transport behaviour rather than channels. Before ...
New
New
roadbike
From page 13: On Python 3.7, you can install the libraries with pip by running these commands inside a Python venv using Visual Studio ...
New

Other popular topics Top

New
malloryerik
Any thoughts on Svelte? Svelte is a radical new approach to building user interfaces. Whereas traditional frameworks like React and Vue...
New
PragmaticBookshelf
Design and develop sophisticated 2D games that are as much fun to make as they are to play. From particle effects and pathfinding to soci...
New
AstonJ
Inspired by this post from @Carter, which languages, frameworks or other tech or tools do you think is killing it right now? :upside_down...
New
Exadra37
Oh just spent so much time on this to discover now that RancherOS is in end of life but Rancher is refusing to mark the Github repo as su...
New
AstonJ
If you are experiencing Rails console using 100% CPU on your dev machine, then updating your development and test gems might fix the issu...
New
PragmaticBookshelf
Author Spotlight Jamis Buck @jamis This month, we have the pleasure of spotlighting author Jamis Buck, who has written Mazes for Prog...
New
New
PragmaticBookshelf
Author Spotlight: Karl Stolley @karlstolley Logic! Rhetoric! Prag! Wow, what a combination. In this spotlight, we sit down with Karl ...
New
RobertRichards
Hair Salon Games for Girls Fun Girls Hair Saloon game is mainly developed for kids. This game allows users to select virtual avatars to ...
New

Sub Categories: