
Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag storeGood news - your createClient configuration looks perfectly fine! The error "ClientError: expected '}' following object body" is actually coming from a malformed GROQ query, not from your client setup.
This error almost always means there's a syntax issue in one of your GROQ queries. Based on similar cases in the Sanity community, the most common culprit is a missing comma in your query projection.
Check your GROQ queries - especially the one in your [slug] page. Every field in a projection needs a trailing comma, including before nested projections. For example:
*[_type == "property" && slug.current == $pageSlug][0]{
title,
location,
propertyType,
mainImage,
modalidad, // ← Make sure this comma is here!
owner->{
_id,
name,
slug,
image
},
}If you have something like:
modalidad
owner->{Without a comma after modalidad, you'll get the "expected '}' following object body" error.
This error can also happen if you write:
{ slug.current } instead of { "slug": slug.current } (shorthand syntax without proper field naming)The apiVersion you added is correct and necessary - that's not causing the issue. The error is thrown by Sanity's query parser when it encounters malformed GROQ syntax, so look through all your .fetch() calls and double-check the query syntax.
Your client configuration is solid, so once you fix the query syntax, everything should work!
Sanity is the developer-first content operating system that gives you complete control. Schema-as-code, GROQ queries, and real-time APIs mean no more workarounds or waiting for deployments. Free to start, scale as you grow.
Content operations
Content backend


The only platform powering content operations
By Industry


Tecovas strengthens their customer connections
Build and Share

Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag store