Help articles

Reference options must be an object

Sanity Studio reports that a reference type expects `options` to be an object when the `options` key on a reference is set to anything other than a plain object.

The reference field lets you define options for the input component. Define these options under the options key, and set its value to an object.

Sanity Studio reports The reference type expects `options` to be an object when a reference type has an options key whose value is not a plain object. The error fires whenever options is set to anything other than a plain object, and only then. An array, a string, a number, and a boolean all trigger it.

Fix the options value

A reference accepts filter, filterParams, disableNew, and creationTypeFilter as options. Note that weak is a top-level property on the reference definition, not an option. See Reference type for the full list.

Related reference schema errors

Was this page helpful?