
Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag storeI can totally see why this is confusing! The good news is your schema looks correct. The issue is likely that you're looking at an existing document that was created before you added the initialValue: true to your schema.
Here's what's happening: initialValue only applies when a new document is created. It doesn't retroactively update documents that already exist in your dataset. So if you had already created this document before adding initialValue: true to your schema, the field would still be false (or undefined, which displays as unchecked).
Option 1: Create a New Document (quickest way to verify) Delete the existing document (or just create a new one) and you should see the toggle is checked by default.
Option 2: Update Existing Documents
If you need existing documents to have this field set to true, you'll need to update them. You can do this in a few ways:
import {getCliClient} from 'sanity/cli'
const client = getCliClient()
// Fetch all documents of your type that need updating
const documents = await client.fetch(`*[_type == "yourDocumentType" && !defined(showProductReviews)]`)
// Update them
const transaction = client.transaction()
documents.forEach(doc => {
transaction.patch(doc._id, {set: {showProductReviews: true}})
})
await transaction.commit()To confirm your initialValue is working correctly:
According to the Initial Value Templates documentation, field-level initialValue settings like yours apply to all new documents of that type when created through the Studio. Your syntax is spot-on:
{
title: 'Show Product Reviews',
name: 'showProductReviews',
type: 'boolean',
group: 'shopModule',
initialValue: true // ✅ This is correct
}The key takeaway: initialValue is about initialization, not migration. It sets the default for new documents, but doesn't change existing ones. This is actually a good thing - you wouldn't want your schema changes to unexpectedly modify existing content!
Sanity is the developer-first content operating system that gives you complete control. Schema-as-code, GROQ queries, and real-time APIs mean no more workarounds or waiting for deployments. Free to start, scale as you grow.
Content operations
Content backend


The only platform powering content operations
By Industry


Tecovas strengthens their customer connections
Build and Share

Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag store