Open benloh opened 2 months ago
How do we programmatically distinguish between the required fields and the optional "attribute" fields?
isRequired
.weight
Built-in fields are currently defined in app/system/util/enum.js
app/system/util/enum.js
id
label
degrees
created
createdby
updated
updatedby
revision
type
select
notes
markdown
date
source
target
weight
citation
string
Currently we use a filter to retrieve attributes fields from the full list of node definitions:
attributes
const attributes = Object.keys(nodeDefs).filter( k => !BUILTIN_FIELDS_NODE.includes(k) );
How do we programmatically distinguish between the required fields and the optional "attribute" fields?
isRequired
is set in template, but not clear how consistently it's used. Mostly with.weight
?Built-in fields are currently defined in
app/system/util/enum.js
Nodes
Required
id
label
degrees
created
createdby
updated
updatedby
revision
Attributes/Optional (not required, can be removed or new ones added)
type
-- type:select
notes
-- type:markdown
date
-- type: 'date`Edges
Required
id
source
-- id numbertarget
-- id numberweight
degrees
created
createdby
updated
updatedby
revision
Attributes/Optional (not required, can be removed or new ones added)
type
-- type:select
citation
-- type:string
Use
Currently we use a filter to retrieve
attributes
fields from the full list of node definitions: