👀 See Sanity in action: Watch product demo now →

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.io – build remarkable experiences at scale

Sanity is a customizable solution that treats content as data to power your digital business. Free to get started, and pay-as-you-go on all plans.

Categorized in