remove a particular field from a record before persisting
Which function do we use to remove a particular field from a record before persisting it?
For example:
recordType!sampleRecord1(
id: null,
column1: A,
column2: B,
column3: C,
column4: D,
column5: E,
column6: F,
column7: G,
column8: H,
relationA: recordType!relationA(
id: null,
column1: A1,
column2: B2,
column3: C3
)
)
I want to remove the id field from both sampleRecord1 and relationA before persisting them.
Reason: The downstream database does not handle id: null well, but if the field is missing or field have a value, it works fine.
The output I want to save should be:
recordType!sampleRecord1(
column1: A,
column2: B,
column3: C,
column4: D,
column5: E,
column6: F,
column7: G,
column8: H,
relationA: recordType!relationA(
column1: A1,
column2: B2,
column3: C3
)
)
Which function do we use to achieve this? i want to handle it dynamically rather mapping individual fields and then persisting .
