* fix for supporting hasMany property in text field * Updated docs * handle text case types for schema and graphql schema * fix unit test for required failing * add unit test for has many text field * add end to end test for has many on text field creation * support has many feature for text field on postgres --------- Co-authored-by: Chris Heinz <chrisi.heinz@web.de>
16 lines
288 B
TypeScript
16 lines
288 B
TypeScript
type Args = {
|
|
baseRow: Record<string, unknown>
|
|
data: unknown[]
|
|
texts: Record<string, unknown>[]
|
|
}
|
|
|
|
export const transformTexts = ({ baseRow, data, texts }: Args) => {
|
|
data.forEach((val, i) => {
|
|
texts.push({
|
|
...baseRow,
|
|
text: val,
|
|
order: i + 1,
|
|
})
|
|
})
|
|
}
|