Schemas folder renamed to schemaTypes in new Sanity app?
Good news – you're doing everything right! Yes, schemaTypes is the same thing as the old schemas folder. This is just a naming convention update in the Sanity Studio starter templates, not a breaking change.
When you create a new Sanity project now, the CLI generates a schemaTypes folder instead of schemas, but functionally they work exactly the same way. The folder name change was made to be more explicit about what the folder contains, but it's just a convention – you could technically name it anything you want.
Your schemaTypes/index.ts (or .js) file starting with export const schemaTypes = [] is perfectly normal for a fresh project. This is where you'll add your schema definitions as you build out your content model. For example:
import myDocumentType from './myDocumentType'
export const schemaTypes = [myDocumentType]Then in your sanity.config.ts file, you import and use this array:
import {defineConfig} from 'sanity'
import {schemaTypes} from './schemaTypes'
export default defineConfig({
// ... other config
schema: {
types: schemaTypes,
},
})You're right that the getting started guide still shows the old schemas folder name in some places – this is just documentation that hasn't been fully updated to reflect the newer starter template convention. The underlying functionality is identical, so you can follow the guide and just mentally swap "schemas" with "schemaTypes."
Don't worry about messing anything up – the folder name is just organizational preference. What matters is that you export your schema types array and import it into your config file correctly, which you're already doing!
Show original thread2 replies
Sanity – Build the way you think, not the way your CMS thinks
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.