MCPcopy
hub / github.com/redwoodjs/graphql / fieldsToString

Function fieldsToString

packages/api/src/validations/validations.ts:527–533  ·  view source on GitHub ↗
(fields: Record<string, unknown>)

Source from the content-addressed store, hash-verified

525//
526// { email: 'rob@redwood.com', name: 'Rob' } => 'email, name'
527const fieldsToString = (fields: Record<string, unknown>) => {
528 const output = []
529 for (const [key, _value] of Object.entries(fields)) {
530 output.push(key)
531 }
532 return output.join(', ')
533}
534
535// Throws the requisite error message for a failed validation
536const validationError = (

Callers 1

validateUniquenessFunction · 0.85

Calls 1

entriesMethod · 0.80

Tested by

no test coverage detected