Boolean
The Boolean scalar type representstrue
orfalse
. Response formats should use a built‐in boolean type if supported; otherwise, they should use their representation of the integers1
and0
.
Result Coercion
GraphQL servers should coerce non‐boolean raw values to Boolean when possible otherwise they must raise a field error. Examples of this may include returningtrue
for any non‐zero number.
Input Coercion
When expected as an input type, only boolean input values are accepted. All other input values must raise a query error indicating an incorrect type.