Watch a live product demo 👀 See how Sanity powers richer commerce experiences

When Creating a New Document Schema, how can we see the Fields for the First Time?

31 replies
Last updated: May 4, 2021
When creating a new document schema, how can we see the fields for the first time?
May 4, 2021, 7:59 PM
Are your documents visible on the left-hand side (probably under “Content”)?
May 4, 2021, 8:02 PM
Yeah the heading is
May 4, 2021, 8:03 PM
But there's no actual content because I can't see the fields to input data.
May 4, 2021, 8:04 PM
I rember I had to something like hardcoding an id or something to be able to see it for the first time
May 4, 2021, 8:05 PM
to see the empty fields I mean
May 4, 2021, 8:05 PM
(After selecting a document on the left side,) in the top-right corner of your studio, do you have a pencil and paper icon?
May 4, 2021, 8:07 PM
I do - but when I open it I don't see the new schema I added...think I missed a step.
May 4, 2021, 8:09 PM
Are you running locally (
sanity start
) and accessing via localhost:3333?
May 4, 2021, 8:10 PM
yup
May 4, 2021, 8:10 PM
I see all my document schemas except for this latest one I added.
May 4, 2021, 8:11 PM
Has it been imported and concat’d in schema.js?
May 4, 2021, 8:11 PM
Sorry, I jumped over that step before. I bet that’s what you meant by hardcoding something for the first time.
May 4, 2021, 8:13 PM
I did missed that step!
May 4, 2021, 8:13 PM
Fixing it
May 4, 2021, 8:13 PM
I need a reminder todo list of steps to take when adding a new schema
May 4, 2021, 8:14 PM
🙂
May 4, 2021, 8:14 PM
might be missing something else...
May 4, 2021, 8:19 PM
is not there yet
May 4, 2021, 8:19 PM
already deployed the schema change too
May 4, 2021, 8:20 PM
Did you run
sanity start
again (or is it still running from before)?
May 4, 2021, 8:20 PM
multiple times
May 4, 2021, 8:20 PM
Is the new schema you added of
type: 'document'
?
May 4, 2021, 8:21 PM
yes
May 4, 2021, 8:21 PM
fixed
May 4, 2021, 8:24 PM
In schema.js, did you import the file and add it down below (inside
types: schemaTypes.concat([ … ])
)?
May 4, 2021, 8:24 PM
Oh good!
May 4, 2021, 8:24 PM
I had some leftover code from a copy/paste
May 4, 2021, 8:24 PM
__experimental_actions: ['update', 'publish'],
May 4, 2021, 8:24 PM
sorry about that
May 4, 2021, 8:25 PM
Don’t be! Glad you got it working! 😄
May 4, 2021, 8:25 PM
thanks for the help 🙂
May 4, 2021, 8:25 PM

Sanity– build remarkable experiences at scale

The Sanity Composable Content Cloud is the modern headless CMS that treats content as data to power your digital business. Free to get started, and pay-as-you-go on all plans.

Categorized in

Related answers

Get more help in the community Slack

TopicCategoriesFeaturedRepliesLast Updated
After adding the subtitle and running this code npm run graphql-deploy It does nothingSep 15, 2020
how to limit a reference to just one entry in Studio reference input side versus the default as-many-entries-as-you-fill-in-an-array...Sep 18, 2020
Is it possible to fetch more than one "_type" using GROQ?Nov 2, 2020
I want to add a view with the Structure builder (S.view.component) where I list similar documents based on the title. What...Sep 23, 2020
Is there a structure builder example where the format of each preview for the document list is modified?Feb 3, 2021
I have an array of references to a country schema type but it always just returns NULL values for meJan 30, 2021
Hi, I need help with a query for getting the url of an image asset. Here is what I've been trying, but I only get the _ref...Dec 1, 2020
Sanity UI looks brilliant :smiley: Is something like the current date picker possible at the moment? I’m not sure if anicon...Dec 21, 2020
Hey everyone. I have been coding and may have potentially accidentally deleted something. Does anyone know how to resolve...Dec 26, 2020
Hello everyone and happy new year :raised_hands::skin-tone-2:, I have a problem with outputting Portable Text :disappointed:...Jan 1, 2021

Related contributions

Clean Next.js + Sanity app
- Template

Official(made by Sanity team)

A clean example of Next.js with embedded Sanity ready for recomposition.

Cody Olsen
Go to Clean Next.js + Sanity app

Blog with Built-in Content Editing
- Template

Official(made by Sanity team)

A Sanity-powered blog with built-in content editing and instant previews.

Go to Blog with Built-in Content Editing