Closed KashubaK closed 1 year ago
There were two routes I could've taken with this:
data
property, and offer a get
method to access the data_
in cases where an object type has fields that conflict with the auto-generated methodsI'm choosing the latter, as I imagine it'd be pretty rare for this to happen. I don't want to add friction just to address the 0.01% of cases where this happens.
class BeepBoopBaseModel {
@Selectable() set!: string;
// This function has a `_` prefix since it conflicts with a GraphQL field.
_set() {
// ...
}
}
If someone's type has a field with a name within this list:
set
selectedData
assign
store
We could just prefix them with
__
, though I'd hate to have to dothis.__set('name', 'asdf');
everywhere :\ I'd be fine with prefixing the other keys, though.