All Questions

Tagged with
Filter by
Sorted by
Tagged with
3 votes
1 answer
839 views

Sanity IO CMS - What is the difference between sanity.config.js and sanity.json

Working with a Version 3 Sanity project to provide backend data. However, I noticed that there are two files that deals with project settings/configurations. PROJECT_DIR/sanity.config.js - included ...
0x5929's user avatar
  • 440
2 votes
1 answer
4k views

Customizing schema fields in sanity.io

In sanity studio schema I made some object type with one field, dependent of other. If "all" field check to true, then "date" field should be hidden or disabled. But I don't know ...
Daria Moreno-Gogoleva's user avatar
2 votes
1 answer
1k views

Order by random in Sanity.io GROQ query not working?

Sanity.io is awesome! But as I'm just beginning, I cannot find some things yet I know in e.g. MySQL. According to the GROQ cheat sheet I should be able to randomly sort and slice (LIMIT + OFFSET in ...
Jos's user avatar
  • 1,474
1 vote
0 answers
227 views

Update document fields using Sanity.io CLI

I want to bulk update a single field on 100+ documents of the same document type. With the goal of keeping my import file as slim as possible, I want to just be able to include the _id and the key/...
Aidan Seeberg's user avatar
0 votes
1 answer
1k views

React & Sanity - Fetch Error: invalid JSON response body

I have been following a tutorial on youtube to build a twitter-clone website. However, when trying to fetch tweets from Sanity I am getting this error. I even git cloned the repo of the person that ...
Kirsty Richmond's user avatar
0 votes
1 answer
25 views

Typescript - How to extract values from Sanity API Result - JSON

I am trying to get the values from a Sanity Client API call and can't figure out how to get the values from resulting JSON. Here is the result of the api call: [ { slug: { current: "test-...
Don's user avatar
  • 421
0 votes
0 answers
50 views

Not reversing the data when update the one schema in sanity studio

I have two schemas called "Project" and "Employee" in my Sanity studio. I want to establish a reference between them so that I can associate projects with employees and vice versa. ...
Dhivahar M's user avatar
0 votes
0 answers
209 views

What causes 'SyntaxError: Unexpected token u in JSON' when accessing Next.js admin at http://localhost:3000/admin?

I have been following a tutorial on YouTube (https://www.youtube.com/watch?v=OcTPaUfay5I) and I am currently at the 1:07:02 mark. The tutorial is about creating a web application using Next.js and ...
Mateo Ruiz's user avatar
0 votes
1 answer
381 views

undefined variable when fetching query from sanity using json

I am working on a react application, I've set up sanity as my backend and I am using user data via google's authentication login, user data are being successfully stored in sanity database for every ...
Segmentation Fraud's user avatar