Is it possible to connect @sanity/client to local studio when developing?

5 replies
Last updated: Sep 9, 2020

Hello! Quick question: Is it possible to connect

@sanity/client
to local studio when developing? I want to try out some schema changes before deploying it.

Sep 9, 2020, 3:43 PM

Is this what I want to learn and use or is there some best practise way to test schema changes while developing? https://www.sanity.io/blog/getting-started-with-sanity-as-a-headless-cms#migrating-your-content-is-easy-c204f379a409

Sep 9, 2020, 3:48 PM

Exporting and importing your dataset can make a lot of sense for testing in this way. You’ll want to make a “development” dataset on your project and when you’re working locally, you can use a different dataset (https://www.sanity.io/docs/sanity-json#environments-933842c25dea )
When you’ve got that, you can import your production data into the development dataset to have a close approximation to your live data before testing your schema

Sep 9, 2020, 5:42 PM

Exporting and importing your dataset can make a lot of sense for testing in this way. You’ll want to make a “development” dataset on your project and when you’re working locally, you can use a different dataset (https://www.sanity.io/docs/sanity-json#environments-933842c25dea )
When you’ve got that, you can import your production data into the development dataset to have a close approximation to your live data before testing your schema

Sep 9, 2020, 5:42 PM

That makes sense! Awesome, I'm gonna try it and also set up nightly backups to S3 and I'll sleep better 😄 Thanks! 🙏

Sep 9, 2020, 6:02 PM

Data Redundancy = better sleep 😄

Sep 9, 2020, 6:03 PM

Sanity.io: Get the most out of your content

Sanity.io is a platform to build websites and applications. It comes with great APIs that let you treat content like data. Give your team exactly what they need to edit and publish their content with the customizable Sanity Studio. Get real-time collaboration out of the box. Sanity.io comes with a hosted datastore for JSON documents, query languages like GROQ and GraphQL, CDNs, on-demand asset transformations, presentation agnostic rich text, plugins, and much more.

Don't compromise on developer experience. Join thousands of developers and trusted companies and power your content with Sanity.io. Free to get started, pay-as-you-go on all plans.