bynk.index.bad_argument
Error An @indexed argument is not a by: <field> label.
@indexed says which field of the map's value type to maintain a secondary index on, and the only form it takes is by: <field>. A bare name, another label or an expression leaves the compiler without a field to index. Write by: followed by the field's name. A name that is not a field of the value type is bynk.index.unknown_key.
Example
type Order = { id: String, customerId: String }
store orders: Map[String, Order] @indexed(customerId) // ✗ not a `by:` label
store orders: Map[String, Order] @indexed(by: customerId) // ✓In the Book
See also
- Every code in its category, Other, on the diagnostic index.
bynk explain bynk.index.bad_argumentshows the same from the installed toolchain, without a network.