Skip to main content

boolean_text

Function boolean_text 

Source
pub fn boolean_text(value: &str) -> Option<bool>
Expand description

What Hasura reads as true and false in a header, and the words it uses when a header is neither.

Not Rust’s bool parser and not a truthiness test: the accepted texts are a closed set Hasura documents in the refusal itself, and 1 is not among them. A value outside it is a client mistake, and answering it as false would send a backend-only write down the path meant for everyone else – silently, on a header the client thought it had set.