Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@bjoerge
Last active August 22, 2023 08:56
Show Gist options
  • Star 10 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save bjoerge/b4369aa6ae0ed5c64029b9cdd41198dc to your computer and use it in GitHub Desktop.
Save bjoerge/b4369aa6ae0ed5c64029b9cdd41198dc to your computer and use it in GitHub Desktop.
How to recover lost schema from *.sanity.studio.md

First, go to https://<yourname>.sanity.studio (or to the url of your studio if it's hosted elsewhere). Then open the developer console (usually by one of the keyboard shortcuts Command+Option+I, F12 or Control+Shift+I depending on what browser/platform you are using)

Steps

  1. Open the Sources tab
  2. Find the app.bundle.js file in the sidebar tree view.
  3. Hit the pretty print source button
  4. Locate your schema types by searching (e.g. try searching for one of your custom types) it in the source view.

You should be able to recover most of your schema type definitions this way, although you may need to reformat and rewrite from the minified code.

@nomanjavaid821
Copy link

got 404 error with message "Studio Not Found" how to resolove this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment