🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

sanity-plugin-schema-visualizer

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sanity-plugin-schema-visualizer

Visualize the schema registered to your Sanity Studio

1.1.1
latest
Source
npm
Version published
Weekly downloads
24
-41.46%
Maintainers
1
Weekly downloads
 
Created
Source

Sanity Plugin Schema Visualizer

A basic Studio Tool to visually represent schema registered in a Sanity Studio.

Not intended to be feature complete or as a schema builder/editor.

There are known issues:

  • Full schema is not displayed, and some inner fields are not retrieved
  • On the initial load, the "card" for each document schema is shown in a horizontal bar, not grouped, but can be dragged into position
  • The arrows aren't great :/

Screenshot 2023-03-14 at 09 08 29

Installation

npm install sanity-plugin-schema-visualizer

Usage

Add it as a plugin in sanity.config.ts (or .js):

import {defineConfig} from 'sanity'
import {schemaVisualizer} from 'sanity-plugin-schema-visualizer'

export default defineConfig({
  // ...
  plugins: [
    // ...all other plugins
    schemaVisualizer()
  ],
})

Optionally, you can configure some defaults for displayed and hidden document cards.

schemaVisualizer({
  defaultSchemaTypes: ['movie'],
  hiddenSchemaTypes: ['person'],
})

License

MIT © Simeon Griggs

Develop & test

This plugin uses @sanity/plugin-kit with default configuration for build & watch scripts.

See Testing a plugin in Sanity Studio on how to run this plugin with hotreload in the studio.

Release new version

Run "CI & Release" workflow. Make sure to select the main branch and check "Release new version".

Semantic release will only release on configured branches, so it is safe to run release on any branch.

Keywords

sanity

FAQs

Package last updated on 14 Mar 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts