#[query_error]Expand description
mutation_error for the READ path — the same skeleton, over an author’s own query failure.
ⓘ
#[ingraph::query_error]
pub enum LookupError {
#[ingraph(code = "NO_SUCH_SHELF", error = "there is no shelf called `{0}`")]
NoSuchShelf(String),
}§TWO WORDS FOR ONE EMISSION, and that is deliberate
The items are identical, and deduplicating the two macros into one would delete the only thing a
declaration says by choosing between them: which half of the line this failure belongs to. A
reader of #[ingraph::query_error] knows they are looking at something a read path can raise
without going to find out. And the day the two roads want different faces — a ToErrorCode row
on one of them, a wire attachment on the other — the word is already written and no declaration
has to change.
Every attribute, every emitted item and every refusal is mutation_error’s; see it for all of
them.