r/sanity_io

API calls

Hey,

I hope someone can help. I am new here and new to sanity. But I am really loving it. Just annoyed by how our company's API calls get blasted through the roof. I mean before I left work our calls for the day was at 120k.

Some context. We have a monorepo that's running sanity, next.js for 22+ sites and will increase and story book as a component library but our API requests are insane.

I mean one of the calls was hitting 72 duplicate calls before I left the office. I am going to investigate more but I am hoping someone can give me In Site as to how to prevent these calls on our environments from sky rocketing.

And any best practice tips and tricks. I would love to keep the business on sanity and not have to rebuild all the sites on payload again because we just moved off of a platform to sanity. But if things keep going the way it does we will probably cancel the sanity sub and then move to payload.

Thanks

reddit.com
u/MKD7036611 — 6 days ago
▲ 9 r/sanity_io+1 crossposts

Sanity visual editing with Astro: SSR or static + separate preview?

Adding Sanity visual editing to my Astro site (Vercel). The official guide puts the whole site on output: "server", but then every visit hits the Sanity API, and on the free plan that's a hard limit. Also not thrilled about giving up static HTML from the CDN, since speed is the reason I picked Astro.

My current idea: keep production static like it is now (rebuild on publish) and run a second SSR deployment just for the Presentation tool.

Is that what people do? Curious what you're running in prod.

reddit.com
u/According_Ear_1448 — 7 days ago