toRpcSelect
toRpcSelect(
selection?):RpcSelect
Defined in: src/query/selection.ts:258
Converts a selection into the RPC select object — the same request projectSelection
makes without a schema.
Every field is opt-in — anything not explicitly selected is sent as false, including the key.
Sending the full object rather than omitting the falses keeps what the SDK asked for legible in
a request log, and pins the answer even if a node’s defaults change.
undefined or "*" selects everything.
Parameters
Section titled “Parameters”selection?
Section titled “selection?”Returns
Section titled “Returns”Throws
Section titled “Throws”If the selection asks for nothing, or names an attribute outside the name grammar.
Example
Section titled “Example”toRpcSelect() // everythingtoRpcSelect({ $key: true }) // only the keytoRpcSelect({ $key: true, projectId: true }) // the key and one attribute