Expand description
The two INPUT FACES a unit’s types wear — InputType over the filter’s struct and over the
order-by’s enum — written once for every front end that emits one.
§Why the faces are HAND-WRITTEN at all
#[derive(InputObject)] and #[derive(OneofObject)] are attached to a DECLARATION, and both of
these types are emitted: their fields carry projections through the marker layer, their names come
from a naming tower, and their __-pinned Rust idents are not the words a client reads. So what
is written here is those derives’ own output, at the one place a derive could not be attached.
§And why it is ONE emitter for two front ends
The STRUCT halves already are — super::filter and super::order_by serve a record, an
interface and a standalone #[derive(ingraph::Filter)] alike. The faces were a record’s alone
until B-27 asked an interface to publish a root field, which is what a filter and an order-by are
spent by. A second copy of forty lines of registry construction is where the two would come to
disagree about a byte of somebody’s SDL.
What a caller supplies is exactly what it knows: the type’s Rust name, the name a CLIENT reads, and one row per column already resolved through whichever naming layers that front end has.
§The one flag that separates the two
oneof. A predicate narrows by every field a client writes; an order term names exactly ONE
column — and oneof: true is what makes exactly one the VALIDATOR’s rule rather than a
resolver’s, refused before anything runs, through a literal and through a variable alike.
Structs§
- Filter
Field - One column, as the FILTER’s face reads it.
- Input
Face - What both faces need before they read a single column.
- Order
Field - One column, as the ORDER-BY’s face reads it.
- Relation
Position - One REVERSE relation position, as the FILTER’s face reads it.
Functions§
- filter_
face - The FILTER as an ordinary input object: one NULLABLE field per column, each carrying that column’s own filter, and any number of them supplied.
- order_
by_ face - The ORDER-BY as a
@oneOfinput object: one nullable field per orderable column, exactly one of them supplied.