Help articles

Schema type is missing a required property

Every schema type needs both a type and a name property. Studio reports one of these problems when either is missing or has the wrong shape:

  • Missing type name — the type has no name property.
  • Type is missing a type. — the type has no type property.
  • Type has an invalid "type"-property - should be a string. — the type property is set to something that isn't a string.

The type property says which type your schema type builds on — for example a document, an object, or a string. The name is what you use to refer to this type elsewhere in your schema. To add a field that references one of your own types, you refer to it by name:

Studio's schema errors screen names the type each problem belongs to, so start there. Declaring your types with defineType and defineField catches all three problems in your editor, before Studio starts.

Was this page helpful?