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
Working with Sanity?
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.
What it is
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.
The honest version
No technology is all upside. This is where Sanity earns its place and where it tends to cause trouble.
Sound familiar?
The Sanity problems that bring people to us, and what you have once each one is fixed.
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
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
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
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
Unused image assets accumulating, old document revisions kept forever, or imports from a previous CMS that were never cleaned up.
Dataset trimmed, growth measured
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
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
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
Reach out for one broken Studio, or hand us the dataset and the front end together.
How it works
Tell us what's going wrong. We look at it, then tell you plainly what's wrong and what it will cost.
We fix the cause, not the symptom. If something is down, getting it back up comes first.
Backups, monitoring, updates and access, so the same problem can't quietly come back.
You get a plain-language write-up. Or we stay on for hosting, upkeep and new work.
Often found together
We work on the whole stack, so the problem can be wherever it actually is.
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.
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.
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.
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.
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.
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
Tell us what you're running and what's going wrong. A person reads it and comes back with an estimate.
Your message is with a real person, and we'll get back to you soon.
Rather talk now? Call us: