DocsFQL syntax reference
On this page

Expressions reference

Look up fallbacks, logic and expression operators.

Before you begin: Event bindings reference.

Fallbacks

FQL state configuration

Add this configuration inside your page’s {STATE} declaration. Inspect state shows its configuration; live queries and saved data run against your local site. Try a complete FQL page →

Use || for truthy fallbacks and ?? when only null or undefined should fall back. When a fallback mixes ?? with || or &&, add parentheses so the expression says exactly which branch should resolve first.

Use && for truthy gating. It evaluates left to right, returns the first falsy value, and returns the last value when all values are truthy. && has higher precedence than ||.

Expression Operators

GroupOperators
Fallback and logic??, ||, &&
Equality==, !=
Comparison>, >=, <, <=
Arithmetic+, -, *, /, %
Unary!, unary +, unary -
Conditionalcondition ? whenTrue : whenFalse

Parentheses control grouping. Arithmetic follows normal precedence. FQL equality is type-strict, so 1 == '1' is false.

Continue with Data roots reference.