Structured Content 2022: Join our conference to explore fresh perspectives on content and digital experiences →

Object type has a invalid value for fields

Documents or object types must define which fields they have. The fields property must be an array of field definitions, where both name and type are required, and each field having a unique name.

Additionally, field names must start with a letter from A-Z, and can can only include A-Z, numbers and underscore. We recommend using camel case convention for field names.

{
  type: 'object',
  name: 'myObject',
fields: [ // fields must be defined, and it must be an array
{
name: 'myField', // field name is required and must be unique
type: 'string' // field type is required
}, // ... {
name: 'myField', // 💥 ERROR a field named "myField" is already defined on this object
type: 'string' } ] }

Was this article helpful?