Understanding attribute limits in Sanity projects

6 replies
Last updated: Jun 14, 2023
Hi there šŸ‘‹ I have reached the attribute limit on a project. I am trying to remove some content we no longer need in the hope it will bring the attribute count down, but isnā€™t going down. Am I missing the point of attributes here? Any suggestions would be great, thank you šŸ™
Jun 6, 2023, 7:15 AM
Removing content will only be effective if youā€™re removing all of the content that uses a particular unique path. If one document still uses that path the attribute limit wonā€™t go down.
Jun 6, 2023, 3:24 PM
I assumed this might be the case after pondering over it. Thank you for coming back to me I appreciate the confirmation šŸ™‚
Jun 6, 2023, 3:25 PM
For sure! Itā€™s tricky wrap your head around.
Jun 6, 2023, 3:25 PM
Hey
user M
- I was wondering if I could seek help with this again please? We have removed the content from the respective fields but the attribute limit hasnā€™t changed (Iā€™m fairly certain itā€™s increased actually šŸ™ˆ). I havenā€™t removed the fields from the schema though, do I have to remove the fields after the content, or should the content removal reduce the attribute count? Thank you šŸ™
Jun 13, 2023, 9:58 AM
Removing the content should get rid of the paths, since the backend isnā€™t aware of your schema definitions. It sounds like there are possibly still some documents that are using those paths. They could not be visible within your Studio if they were in documents that you stopped using. Have you tried using GROQ to find them all?
Jun 13, 2023, 5:18 PM
Hey
user M
thanks for coming back to me, Iā€™ll try running some queries to see if I can identify them
Jun 14, 2023, 7:13 AM

Sanityā€“ build remarkable experiences at scale

Sanity is a modern headless CMS that treats content as data to power your digital business. Free to get started, and pay-as-you-go on all plans.

Was this answer helpful?