Working with Sanity?

Sanity Studio tangled or queries slowing the site? We ship it properly.

Sanity is a developer-first CMS, and the places it tends to hurt are places developers made it hurt: a Studio schema that grew without a plan, a GROQ query that fans out five joins per page, a Portable Text renderer that chokes on a custom block. We clean the schema, write the queries honestly, and leave the editors with a Studio that behaves.

  • Since 2015Fixing technology
  • FreeEstimates
  • US teamReal engineers

sanity-studio.log

still broken

What it is

Sanity at a glance

Sanity is a headless CMS from Oslo, first released publicly in 2017 by Sanity.io AS. Content lives in a schemaless document store called a dataset, queried with GROQ, and edited through the Sanity Studio, a customisable React application that teams host themselves or on Sanity's own hosting.

The platform is a common choice behind Next.js, Nuxt, Astro and Remix sites, because the Studio deploys like any other React app and the data is queried from the front end with a single client. Features include real-time collaborative editing, portable text for rich content, image pipeline with hotspots and crops, references with reverse-lookup, and GraphQL on top of GROQ when you want it.

Type
Headless CMS with real-time collaborative Studio
First released
2017
License
MIT for the Studio, proprietary SaaS for the API and hosting
Maintained by
Sanity.io AS
Typically used for
Jamstack sites, marketing content, product catalogues, design-led teams on Next.js, Astro, Nuxt and Remix

The honest version

Sanity pros and cons

No technology is all upside. This is where Sanity earns its place and where it tends to cause trouble.

Where Sanity is strong

  • The Studio is an app you ownSanity Studio is React code in your repository, extensible with custom input components, previews and plugins. Editors get a workflow tailored to the content, not a generic admin.
  • GROQ is powerful once you learn itProjections, joins, filters and ordering happen in one query instead of many round trips. Front ends end up with less glue code than a REST-first CMS encourages.
  • Real-time collaboration out of the boxMultiple editors on the same document see each other's cursors and changes live. Review workflows are much easier to run when nobody is overwriting anyone.
  • Portable Text for rich contentRich text is a JSON array of blocks, not HTML, which keeps rendering in the hands of the front end and makes custom marks and inline references practical.
  • Good image pipelineHotspots, crops, generated URLs for every resolution and format. Front ends do not need a separate image service for most sites.
  • A generous free tierThree users, two datasets and reasonable bandwidth on the free tier is enough for a small site to run in production without paying for a year.

Where Sanity bites

  • The schema is code, which cuts both waysSchema lives in JavaScript or TypeScript in the Studio repo. Editors cannot make a new field, and schema changes need a deploy. For developer-led teams this is a feature; for editor-led teams it is friction.
  • GROQ has a learning curveIt is not SQL, not GraphQL, not MongoDB's language. Developers new to it write correct queries that perform badly until they understand projection and dereferencing.
  • Costs can creep on API requestsThe CDN API has generous limits and the Live API is billed on usage. A busy site that stops caching, or a build that queries per page without pagination, pushes the invoice up quickly.
  • Portable Text rendering needs maintenanceEvery custom block or mark needs a renderer on the front end. A Studio change that nobody mirrored on the website shows up as missing content or a crash during build.
  • References can go staleDeleting a referenced document does not automatically rewrite documents that pointed at it. Broken references accumulate unless the team is disciplined.
  • Tooling is thinner on the edgesBackups, migrations and multi-dataset workflows exist but are code-driven. Teams expecting a mature UI for every operation sometimes find themselves writing scripts.

Sound familiar?

Common Sanity problems we fix

The Sanity problems that bring people to us, and what you have once each one is fixed.

Query took 2,840 ms

GROQ queries are slowing the page down

A query without projection pulling back entire documents, references dereferenced five levels deep, or an OR filter that cannot use indexes.

Queries under budget, projection honest

PortableText: unknown block type

Portable Text renders with gaps

A new block type added in the Studio that the front end renderer does not know about, or a mark renamed without updating the renderer map, leading to silently missing content.

Renderer in step with the schema

Reference integrity: 48 broken

Broken references pile up

Documents deleted without checking what referenced them, or imports that overwrote the ID of a document that was still pointed at from other content.

References repaired, deletes safer

duplicate field name 'slug'

The Studio refuses to start

A schema with a duplicate field name, a circular reference in a validation rule, or a plugin version that is no longer compatible with the Studio version in package.json.

Studio starts cleanly on every machine

Dataset approaching 5 GB limit

The dataset is outgrowing its plan

Unused image assets accumulating, old document revisions kept forever, or imports from a previous CMS that were never cleaned up.

Dataset trimmed, growth measured

insufficient permissions for 'editor'

Editors cannot publish

A role recently tightened by a developer, or a plugin that assumes an admin role for a write path. Editors see a cryptic error and raise a ticket instead of a correction.

Roles match the editor workflow

draft and published diverged: 212

Drafts drift from published for weeks

An editor who started a draft, got distracted, and never published it, leaving the public site behind while the Studio looks up to date.

Draft hygiene, dashboards editors trust

schema not in version control

The Studio was deployed from somebody's laptop

A Studio deployed from a developer who has since left, with schema changes made on their machine that were never checked in. Rebuilding it is a puzzle.

Studio reproducible from a clean checkout

What we do

Sanity help, from rescue to upkeep

Reach out for one broken Studio, or hand us the dataset and the front end together.

Rescue
Studio refusing to start, queries failing, Portable Text crashing a build. We get the stack working and then explain what broke it.
Schema review
Content types and references audited with the editors in the room, unused fields retired, validations tuned so bad content cannot be published.
GROQ performance
Slow queries found, projections tightened, and the hot paths moved onto the CDN API where they belong.
Studio customisation
Custom input components, preview panes and desk structure built so the editors' workflow is in the Studio rather than in a shared document.
Migrations
Moving content from WordPress, Contentful or custom stores with asset URLs preserved and references rebuilt, with both sides running in parallel for a safety window.
Managed Tech
Regular reviews of dataset size, API usage and query performance, with somebody on call for the Studio deploys that need a human eye.

How it works

From first message to fixed

  1. Look Free estimate

    Tell us what's going wrong. We look at it, then tell you plainly what's wrong and what it will cost.

  2. Fix

    We fix the cause, not the symptom. If something is down, getting it back up comes first.

  3. Harden

    Backups, monitoring, updates and access, so the same problem can't quietly come back.

  4. Hand back or stay on

    You get a plain-language write-up. Or we stay on for hosting, upkeep and new work.

Often found together

Running Sanity alongside something else?

We work on the whole stack, so the problem can be wherever it actually is.

Questions

Sanity questions

Something else? Call+1 737 727 7327

Why is our Sanity site slow to build on Next.js?

Usually a GROQ query per page that pulls back entire documents without projection, or references being dereferenced many levels deep. We rewrite the queries to ask for exactly the fields the page uses, move hot paths onto the CDN API, and page through long lists in batches instead of one big fetch during build.

How do we add a new block type without breaking the site?

Add the block in the Studio schema, extend the Portable Text renderer on the front end to handle it, and only then publish a document that uses it. Deploy the renderer first, Studio second, content third. Skipping the renderer step is how most teams end up with visibly missing content on a Monday morning.

Can we move content from Contentful to Sanity?

Yes, and we have done it both directions. We define the Sanity schema to match the shape you actually want, export from Contentful with the Management API, transform to Sanity's NDJSON format and import with the CLI, rewriting references and reuploading assets along the way. The site runs on Sanity at a staging domain before any DNS moves.

Should we pick Sanity or Contentful?

Sanity fits teams who treat the CMS as part of the codebase and want a custom editor experience. Contentful fits teams with large editor groups, strict permissions and procurement that prefers an enterprise contract. Neither is wrong; the answer depends on who the people using the CMS actually are.

Why are editors complaining that drafts disappear?

Usually a real-time collaboration race where one editor's draft was published by another without a review step, or a version of the Studio where the autosave behaviour changed. We walk through the actual case with the editor, show what the system is doing, and either adjust the desk structure or add a review workflow so it cannot happen again.

How much does Sanity help cost?

The estimate is free. Send the Studio URL or the dataset name and the symptom you are seeing, and we come back with a scope and a number before we ask for any access.

Free estimate

Sanity giving you grief?

Tell us what you're running and what's going wrong. A person reads it and comes back with an estimate.

  • No charge to find out what it will take
  • If it's urgent, say so

Replies come from a person. By sending, you authorize us to email you back. No marketing.