Do you need Initial Values to Create a Document using client.create()?
Last updated: Apr 15, 2020
Hi! Im creating a document via client.create(). Im purposefully not sending some fields because I have those being set by ‘Initial Values’, But those fields are being left empty when creating the document via client.create. However ‘Initial Values’ is correctly working when I create a new document in the Sanity UI. Can anyone let me know if Im missing something here 😅 Thanks!
Apr 15, 2020, 12:26 PM
Sorry if this wasn't clear from the documentation: Initial values are studio only. You'll need to implement the same values from where you are creating the documents from the API. The datastore is schemaless (for now).
Apr 15, 2020, 12:27 PM
Awesome, I missed that in the docs! That was my next step but I figured I’d double check. Thanks