Join us and panelists from Shopify, Figma, Loom, and Fnatic for the next Sanity.io Open House. Dec 8th.

Answers from the community

Some of the conversations between community members on questions, suggestions and tips for using Sanity. Join our Slack to be a part of it.

Go to Deploy a Sanity + Next JS site to NetlifyGo to What is the difference between yarn and npm?Go to How to view schemas for single pages created in SanityGo to Style the studio by over-riding custom variablesGo to Best Headless Shopify TemplatesGo to Hey all - what’s the quickest way to batch delete all documents of a certain type? It looks like the `sanity` cli tool allows deletion of documents by ID but no ability to delete by query?Go to Deploying Next JS on VercelGo to Rendering nested block contentGo to In the tutorial, there is samples of what the API returns as JSON. Is there a way to view these ?Go to hello guys, I noticed that the data I fetch from my sanity studio to my front end are displayed randomly and I don't want that, I want to display the last item I added to be the first item that shows up, how can I do that? I checked the sort documentation and nothing 😞 I thought to do a datetime type and set it to the moment the post created by default and sorted by the publish date , but i didn't know how , i just need to display the lastest posts i added , i know this question seems easy to answer but i am new and i will love any kind of help ❤️ thank youGo to How to turn PortableText into plain text in Javascript?Go to Best way to convert HTML to a PortableText object?Go to Handling dynamic meta titles and descriptions in SanityGo to Adding Sanity to a Typescript Project creates issues with Block ContentGo to Error after adding the hostname in next.config.js fileGo to How to Decouple the Kitchen Sink Starter from NetlifyGo to How to avoid breaking changes when redeploying Sanity APIGo to Order By Date not working in GROQ query Go to What does an ellipsis (...) mean in a GROQ query?Go to When to add "history" as a permission in Sanity access controlsGo to Is there any way of hiding a document (that you call from another document) from the sanity studio left nav?Go to How to correctly model an array type with an image and urlGo to Is there a way to reference a top level field for preview? Go to Hello all! I’m trying to render a code block in a Portable Text Block, followed the instructions to add the serializer and still gives me the Unknown block type “code”, please specify a serializer for it in the `serializers.types` prop ```import BlockContent from '@sanity/block-content-to-react' const CodeRenderer = props =&gt; { console.log('Render code block: ', props) return BlockContent.defaultSerializers.types.block(props) } ... &lt;BlockContent blocks={post._rawExcerpt} serializers={{ types: { code: CodeRenderer } }} /&gt;```Go to How come images are returning with just a _ref in their assets?Go to Is it possible to update my profile picture shown in <https://manage.sanity.io/account> ?Go to Hi! How to add a doc via sanity client that has a *weak* reference? If I do this, it throws an error `key "weak" not allowed in ref`: ```const author = { _type: 'reference', _ref: id, weak: true, };``` However, if I remove `weak`, after creating the doc via sanity client the studio tells me "Warning: This reference is _strong_, but should be _weak_ according to schema."Go to I'm building an e-commerce store and I'm wondering how I can integrate text messages or emails notification to clients after they make an order. Any help would be appreciatedGo to Hey there. I can't seem to find any size limits for <https://www.npmjs.com/package/@sanity/import|sanity/import> transactions? Are there any that I'd need to be aware of?Go to Is there a way to write a groq query that checks if a boolean is true, and if so, returns an array of referenced documents? (example use case, on a homepage, I want to allow the client to enable/disable showing the 3 most recent blog posts) I have this, but it doesn’t work ```{ features[_type match 'blogEntries'] { 'posts' : *[_type == 'post'][0..2] { ... } } }``` Go to I’ve been fighting for a few hours with a preview, and I figured I’d check in here. I am creating a grid container that has a content array that will accept references to tools, or to cards. I would like for the preview to show the title, and have a subtitle that shows a few of the referenced tools or cards. I have created a function that returns the correct values, but it doesn’t actually work in the preview because the return is an object. It’s also really gross, and I think that there has to be a better way to do this, and I am hopeful that someone can help me to find it. Here’s the preview: ```preview: { select: { title: 'title', content: 'content' }, prepare({ title, content }) { const subs = previewReference(content) console.log('subs: ', subs) return { title: `${title}`, subtitle: subs } } }``` And here’s the function: ```export const previewReference = async(content) =&gt; { const query = `*[_type == "tool"]{ _id, title }` return await client.fetch(query) .then(doc =&gt; { const ids = [] doc.map(id =&gt; ids.push(id)) return ids }) .then(ids =&gt; { const filteredArray = [] content.filter((value, i) =&gt; { const helper = value.tool._ref ids.filter(id =&gt; { const eyeDee = id._id if (eyeDee === helper) { console.log("Got one! ", id.title) filteredArray.push(id.title) } }) }); console.log('filteredArray: ', filteredArray) return filteredArray }) }```Go to How would I go about making a document type not deletable? I’ve come as far as adding only once instance to the structurebuilder but it’s still possible to duplicate and delete it. Tried with the following: “__experimental_actions: [“update”, _/* ‘create’, ‘delete’, */_ “publish”],” but it didn’t do anything for it.Go to Hi again, I'm currently working on my blog and realized that the text blocks aren't rendering properly in block-content-to-react. For example, when I have a `Heading 1` font style and a `Normal` font style on the line below, the lines both render at the same sizeGo to Hey all! I'm a Sanity newbie and trying to add Sanity to a Gatsby project I'm working on. I'm trying to add the gatsby-sanity-source plugin and when I try and build the project I get this gnarly error. `Failed to validate error Error [ValidationError]: child "error" fails because ["error" must be an object]` If I remove the plugin code from gatsby-config. It builds fine. The plugin objectlooks like this (I removed the projectId from this message): `{` resolve: 'gatsby-source-sanity', options: { projectId: 'my-id', dataset: 'production', _`// a token with read permissions is required`_ _`// if you have a private dataset`_ `token: <http://process.env.MY|process.env.MY>_SANITY_TOKEN,` `},` `},` Any ideas what I'm missing?Go to I just encountered this error when trying to create an array with two types. Is this not possible, or am I doing something wrong? 😬Go to Hi all! Does anyone have problem on deoplloying on Vercel (Using Next. js as a frontend)? I have two test projects, and once deployed, they don't refresh, if i change some data in the Sanity Studio, or if i ad some new data. The data is visible on the deployed Sanity Studio, but not in the website. I've added the url of the website to the CORS of the studio, but still nothing works. Is there another step that i'm missing? Thanks in advance.Go to Advantages of Using a Monorepo?Go to Customize the container of portable text with ReactGo to Hi, Can someone tell me the proper way to enter the projectID using ENV’s in the sanity.json. If I hard code, works great, anything else and and it’s not finding the projectId. ENV’s are in .env.local ```"api": { "projectId": "PLACEHOLDER_ENV_VARIABLES_WILL_HANDLE_FOR_US", "dataset": "PLACEHOLDER_ENV_VARIABLES_WILL_HANDLE_FOR_US" }```Go to Hello, Im trying to understans GROQ and need help understanding what to do next. I want to in post filter all tags with the string internship and let them show when pushing the button on the navbar. This is my code. 🙏 ```import { useEffect, useState } from "react"; import sanityClient from "../../client.js"; import { Link, useLocation } from "react-router-dom"; import styles from "./allPosts.module.scss"; import { useMousePosition } from "../Animation/useMousePosition" export default function AllPosts() { const [allPostsData, setAllPosts] = useState(null); const position = useMousePosition(); const location = useLocation() console.log(location) useEffect(() =&gt; { sanityClient .fetch( `*[_type == "post" ]{ title, slug, tags, mainImage{ asset -&gt;{ _id, url, alt, } } }` ) .then((data) =&gt; setAllPosts(data)) .catch(console.error) }, []) return ( &lt;div className={styles.flex}&gt; &lt;div className={styles.landingTitle}&gt; {position.x}:{position.y} &lt;h1 className={styles.verticalText}&gt;Work&lt;/h1&gt; &lt;/div&gt; &lt;div className={styles.wrapper}&gt; {allPostsData &amp;&amp; allPostsData.map((post, index) =&gt; ( &lt;Link to={'/' + post.slug.current} key={post.slug.current}&gt; &lt;span key={index}&gt; &lt;img className={styles.heroImage} src={post.mainImage.asset.url} caption={post.mainImage.caption} alt={post.mainImage.alt} /&gt; &lt;h2 className={styles.title}&gt; {post.title} &lt;/h2&gt; &lt;/span&gt; &lt;/Link&gt; ))} &lt;/div&gt; &lt;/div&gt; ) }``` Go to Hello 🙂 If the dataset is private, cache doesn't work?Go to Hey! We're fetching responsive images from <http://cdn.sanity.io|cdn.sanity.io> using `@sanity/image-url` to generate query param transformations. One observation is that when one or more query param changes value, the request takes quite some time where *TTFB* is pretty much all of the wait time. • Is anyone else experiencing this? • Does it just take that long to generate a new version of an image server side maybe? • Is there something that can be optimized in our transformations query params? Example image url we have: <https://cdn.sanity.io/images/>&lt;project-id&gt;/&lt;dataset&gt;/&lt;some-img&gt;.png?rect=750,0,1406,1438&amp;w=1112&amp;h=1137&amp;auto=format After the initial long running request, requests for the same image with the same params are quick.Go to Hey guys, this is my first time using the *sanity-intl-plugin* for document-level translations and I'm having some weird issues... The problem is I cannot fetch translated content. The weird part is that I can fetch it in the browser and using the Vision plugin, but when I try from Postman or my Gatsby application, it returns a 200 OK response, but an empty result. Base language document works fine everywhere. I was thinking at first that it is an encoding problem, but I guess not since I'm able to retrieve the base language document Could you guys point me in the right direction? ThanksGo to I’m experiencing an error when trying to deploy `sanity graphql deploy` and getting this error point towards a node_module ```import ColorPicker from '../components/input'; ^^^^^^ SyntaxError: Cannot use import statement outside a module``` Does anyone know what’s causing this issue. I have been fine with this studio until the moment.Go to I’m having some trouble figuring out how to query inside references still.Go to any hints on creating a group of singletons in structure builder?Go to has anyone figured out a way to sort lists of content in the studio? i'd love a drag and drop if possibleGo to Hello, tried to find an answer in here but I don’t think there is: Is there a way to copy dataset from one project to another ? ( Or import/export)Go to How to make Algolia work with Gatsby & SanityGo to Best advice on Slack for passing down full url with GraphQL?Go to Is there an easy way to get the reference data in a deeply nested component? I have a list of different components, some of them have arrays of references which I’d like to expose. I’ve managed to get one of the components to expose the references, but it overrides the entire array with empty objects for all the other components. `body[]{ links[]-&gt; }` What I need is a `*` to expose the original content, but override certain fields.Go to I'm still trying to work out how to write a subquery that pulls in references that are based on the parent query. My original thought process is here: <https://sanity-io-land.slack.com/archives/C9Z7RC3V1/p1608667211425800> Ultimately, I'm hoping to query all staff and within that query, query for all posts that reference that staff in an array called `involved`. The closest I got was the following, but unfortunately it pulls in too much (it gets all the posts where that staff member is included in `involved`, but it also includes posts where that staff member has been referenced using internal links): ```*[_type == "staff"] | order(firstName asc, lastName asc) { firstName, lastName, slug, 'postCount': count(*[_type == "posts" &amp;&amp; references(^._id)]) }```Go to I’d love some help understanding how to work with drafts and published documents. I’m running into issues with including drafts in queries because documents that are published but also have unpublished changes return two separate items, `&lt;_id` and `drafts.&lt;_id&gt;`. How can I achieve something similar to the studio’s documents list pane, where each item shows only one time whether or not it’s published and there’s an edit icon if there are changes?Go to is it possible to filter child elements in a query? e.g. in the query below I’d like to return only documents where `deleted != true` ```*[_type == "event"] { _id, _key, documents[] -&gt; { ... } } ```Go to Hey guys, does sanity have some kind of caching mechanism on request? im using the `@sanity/client` in a rn app; the issue is, when I edit a document in sanity and then attempt to fetch that document again, I have to run the fetch exactly two times for it to update; any idea why it doesn't update the first time? (I tried waiting over 5 minutes and will not work on the first fetch)Go to Is it possible to use gatsby-image to render images loaded in Portable Text / Rich Text?Go to Hi, I'm trying to make a simple blog using Sanity and I'm stuck on post retrieval on my index page. I'm currently writing this code in typescript + nextjs and here's a snippet on what I'm having problems with. I don't know how to specify a type for Posts. Is there an inbuilt type or do I have to make my own? ```export default function Index(props) { return ( &lt;div&gt; &lt;h1&gt;Welcome to a blog!&lt;/h1&gt; {props.posts.map( ({ _id, title = '', slug = '', _updatedAt = '' }) =&gt; slug &amp;&amp; ( &lt;li key={_id}&gt; &lt;Link href="/blog/post/[slug]" as={`/blog/post/${slug.current}`}&gt; &lt;a&gt;{title}&lt;/a&gt; &lt;/Link&gt;{' '} ({new Date(_updatedAt).toDateString()}) &lt;/li&gt; ) )} &lt;/div&gt; ); } export async function getStaticProps() { const posts = await sanity.fetch(`*[_type == "post"]|order(publishedAt desc)`); console.log(posts); console.log(typeof posts); return { props: { posts: posts } }; }```Go to Is it possible to have a `type: array`, of more than one entry for `type: reference` ? I kept getting an error that pointed to <https://www.sanity.io/help/schema-array-of-invalid> when I tried to make multiple `{type: 'reference', to: [a single type]}`. I tried uniquely `name`ing them on both the `to` values, and the reference type itself, but it's hung up on the fact I have dozens of `reference` types in the `type: 'array'` . Currently reverted back to just a single `type: 'reference'` with a lot of `to` values, but it's problematic because of the many types I have, many of them have hundreds of results, making it very difficult for me to say I want "this document" from "this type" The generated groq from that on dash is quite huge too since it has to match on a ton of fields on each type 😐Go to I can't find the edit button to edit the image... can someone help?Go to Hello, quick question - is it safe to commit my `projectId`?Go to Hi everyone. I'm new to using Sanity and having a bit of an issue with local development, and wondering if someone is able to point me in the right direction. The issue is that when I run `sanity start` and then open my browser to `<https://localhost:3333>` , it seems to be using a previous Sanity project, and not the project I am running the `sanity start` command from I have tried disabling the other project, logging in and out of Sanity via the CLI, clearing browser cache, re-installing `@sanity/cli` globally, but still having this issue Is there something I am missing? How can I clear the unwanted project from my local development? Thanks in advance for any replies.Go to Hi, anyone able to help with a relationship thing? I have several schemas set up, like, Country, County, and Business, each country has counties (county) each county has businesses, so, each business belongs to one county and I want to be able to GROQ all businesses in a county. I have made a query for all counties in a country where I add a county to a country then I can get the county names from the country *`*[_type == "country"]{...,county[]-&gt;}`* but I don't want the user to have to add the business to a county as logically when you're entering the address details for a business in the CMS you'd do it all in on data entry form, I guess... If it's not all in one place then the user will probably forget to add the business to the county then there'll be no record of it when searching for businesses by county. What I trying to articulate (badly) is that I want to do the reverse for relationships so I can get all businesses in a county by adding the county to the business rather than the business to the countyGo to Hello everyone, can anyone tell me how to access document data from within the structure builder? ```import client from "@sanity/client" client.getDocument('tags').then(tags =&gt; { console.log(`${tags.tagArray}`) })``` i get the error message: TypeError: _client.default.getDocument is not a function at Object.&lt;anonymous&gt; (/static/js/app.bundle.js:180469:17) at __webpack_require__ (/static/js/vendor.bundle.js:713:30) at fn (/static/js/vendor.bundle.js:118:20) at loadStructure (/static/js/app.bundle.js:179724:15) at DeskTool.derivePanes (/static/js/app.bundle.js:401564:56) at DeskTool.derivePanes (/static/js/app.bundle.js:441377:25) at DeskTool.componentDidMount (/static/js/app.bundle.js:401673:10) at DeskTool.componentDidMount (/static/js/app.bundle.js:441367:123) at commitLifeCycles (/static/js/vendor.bundle.js:23112:22) at commitLayoutEffects (/static/js/vendor.bundle.js:26101:7)Go to Hi, I need help with Iframe preview, I have a `route` schema with unique `slug` (`/lb/123`) and also I have `page` schema with the content for that route now the problem is how do I add the `slug` property to the `page` schema so the preview can work ? been stuck on this from hours 😪Go to I’m hoping to use Sanity as an earlier part of our design and prototyping workflow. Are there any techniques or plugins folks would recommend to – 1. Create Sanity schemas via a GUI? 2. Populate a Sanity instance with example content based on the schema (similar to using Faker.js directives)? Wish #1 would definitely be helpful in some circumstances, although not critical. Wish #2 would be vital to exemplify a model, to better design against it. How are others faking or mocking realistic dummy data in Sanity?Go to Is there a way to override the hotspot and crop for previews?Go to is there a good solution to center or right align text in the richtext editor?Go to How can I implement footnotes?Go to How do I render the image in Sanity blockcontent into a custom image component?Go to How to improve image loading with Gatsby and gatsby-plugin-sanity-image?Go to Is there a way to query documents that aren’t referenced by another type of document?Go to I'm hoping for a bit of schema setup/structure guidance.Go to How to delete all docs of a specific doc type via cli?Go to How to Disallow Robots on a SubdomainGo to Is it possible to check for how many unique attributes are being used in a specific sanity database?Go to Is it necessary to run npm audit fix? Go to When using the Sanity client API, do we need to manually set _updatedAt?Go to Anyone who could help me out with sanity/mux?Go to Does anyone have experience in saving a sanity fetch as global properties in next.js?Go to Is there an easy way of clearing unwanted published items?Go to Is it possible to have a conditional value within groq?Go to If I have a document type A which contains a reference to document type B, when I query type B can I get a list of all A that refer to it?Go to If I'm not getting the 'Preview' option on sanity studio that probably means that I haven't setup previewmode correctly on my project right?Go to I’ve found this: https://www.sanity.io/plugins/sanity-plugin-seo-tools So far i’m installing and testing. But how does this work with React? Pointers as to using Sanity to edit SEO meta title, description etc for React pages?Go to Is there anything specific I should be putting in my .gitignore in the studio?Go to what is the difference between objects and plugs?Go to Would like to change the URL of my deployed sanity studio. Will sanity undeploy affect the dataset at all? Or only the URL?Go to Hi newbie here! I'm looking at making baby steps from a custom CMS that generates JSON data files that are committed to GitHub which are then consumed by Eleventy when the site is rebuilt by Netlify. I'd appreciate some pointers on how I can read in my data as JSON from Sanity.Go to Set up Draft Previews with Gatsby Cloud HostingGo to Add a Webhook to fix Generator IssuesGo to How to display Sanity images in Gatsby-powered photography sitesGo to I'm having a hard time doing a client side query, tried using the HTTP API but the URI encoding for '&amp;&amp;' and '-&gt;' seemed to be causing problems so I tried importing the js client to the browser but its pretty confusing to get set up with Sapper. Anyone solved either of these approaches?Go to GraphQL / Vision Question: I deleted 2 documents. They no longer show in Vision or in studio, but they are still showing in GraphQL and causing a node error. I tired deploying GraphQL from sanity and they still show up when I run GraphQL via GatsbyJS. Thanks in advance!!!Go to Hey! I decided to try and use GROQ in my svelte project and have hit a roadblock. I don’t understand how to correctly query for an unknown referenced document. I’m successfully querying blocks that use references (-&gt;) but I’m trying to do the same for a mark / link. If I console log the link currently it is only fetching ```{_key: "452dec4de1a3", _ref: "29e3b314-6983-46ce-8c3e-1d968ab74d22", _type: "linkInternal"}``` Go to Hey guys, I'm trying to use the `@sanity/client` package from a Netlify function but am getting an error only in production, not locally with netlify dev: `Sanity error: ClientError: Unauthorized - Session not found` I've created an API token and am passing it with the sanity client calls, so think that the error may have something to do with my CORS Origins configuration? I allowed credentials for a netlify domain like `<https://bloopity-blopity-1n23io.netlify.app>` does that look right? Any help would be much appreciated!
TopicCategoriesFeaturedRepliesLast Updated
Deploy a Sanity + Next JS site to Netlify6Feb 9, 2021
What is the difference between yarn and npm?4Feb 9, 2021
How to view schemas for single pages created in Sanity8Feb 8, 2021
Style the studio by over-riding custom variables3Feb 4, 2021
Best Headless Shopify Templates4Feb 1, 2021
Hey all - what’s the quickest way to batch delete all documents of a certain type? It looks like the `sanity` cli tool allows...5Jan 29, 2021
Deploying Next JS on Vercel7Jan 20, 2021
Rendering nested block content3Jan 18, 2021
In the tutorial, there is samples of what the API returns as JSON. Is there a way to view these ?12Jan 11, 2021
hello guys, I noticed that the data I fetch from my sanity studio to my front end are displayed randomly and I don't want...5Dec 20, 2020
How to turn PortableText into plain text in Javascript?3Dec 7, 2020
Best way to convert HTML to a PortableText object?6Dec 3, 2020
Handling dynamic meta titles and descriptions in Sanity9Feb 25, 2021
Adding Sanity to a Typescript Project creates issues with Block Content3Feb 10, 2021
Error after adding the hostname in next.config.js file7Feb 9, 2021
How to Decouple the Kitchen Sink Starter from Netlify8Feb 9, 2021
How to avoid breaking changes when redeploying Sanity API6Feb 8, 2021
Order By Date not working in GROQ query4Feb 8, 2021
What does an ellipsis (...) mean in a GROQ query?22Feb 8, 2021
When to add "history" as a permission in Sanity access controls4Feb 7, 2021
Is there any way of hiding a document (that you call from another document) from the sanity studio left nav?12Feb 4, 2021
How to correctly model an array type with an image and url2Feb 4, 2021
Is there a way to reference a top level field for preview?7Feb 3, 2021
Hello all! I’m trying to render a code block in a Portable Text Block, followed the instructions to add the serializer and...10Feb 3, 2021
How come images are returning with just a _ref in their assets?10Feb 3, 2021
Is it possible to update my profile picture shown in <https://manage.sanity.io/account> ?5Feb 2, 2021
Hi! How to add a doc via sanity client that has a *weak* reference? If I do this, it throws an error `key "weak" not allowed...2Feb 2, 2021
I'm building an e-commerce store and I'm wondering how I can integrate text messages or emails notification to clients after...5Feb 2, 2021
Hey there. I can't seem to find any size limits for <https://www.npmjs.com/package/@sanity/import|sanity/import> transactions?...3Feb 2, 2021
Is there a way to write a groq query that checks if a boolean is true, and if so, returns an array of referenced documents?...8Feb 1, 2021
I’ve been fighting for a few hours with a preview, and I figured I’d check in here. I am creating a grid container thathas...3Feb 1, 2021
How would I go about making a document type not deletable? I’ve come as far as adding only once instance to the structurebuilder...9Feb 1, 2021
Hi again, I'm currently working on my blog and realized that the text blocks aren't rendering properly in block-content-to-react....9Feb 1, 2021
Hey all! I'm a Sanity newbie and trying to add Sanity to a Gatsby project I'm working on. I'm trying to add the gatsby-sanity-source...4Jan 28, 2021
I just encountered this error when trying to create an array with two types. Is this not possible, or am I doing something...2Jan 27, 2021
Hi all! Does anyone have problem on deoplloying on Vercel (Using Next. js as a frontend)? I have two test projects, andonce...6Jan 25, 2021
Advantages of Using a Monorepo?3Jan 25, 2021
Customize the container of portable text with React8Jan 25, 2021
Hi, Can someone tell me the proper way to enter the projectID using ENV’s in the sanity.json. If I hard code, works great,...9Jan 24, 2021
Hello, Im trying to understans GROQ and need help understanding what to do next. I want to in post filter all tags with...14Jan 22, 2021
Hello 🙂 If the dataset is private, cache doesn't work?3Jan 22, 2021
Hey! We're fetching responsive images from <http://cdn.sanity.io|cdn.sanity.io> using `@sanity/image-url` to generate query...2Jan 21, 2021
Hey guys, this is my first time using the *sanity-intl-plugin* for document-level translations and I'm having some weird...8Jan 19, 2021
I’m experiencing an error when trying to deploy `sanity graphql deploy` and getting this error point towards a node_module ```import...18Jan 16, 2021
I’m having some trouble figuring out how to query inside references still.10Jan 14, 2021
any hints on creating a group of singletons in structure builder?4Jan 14, 2021
has anyone figured out a way to sort lists of content in the studio? i'd love a drag and drop if possible4Jan 13, 2021
Hello, tried to find an answer in here but I don’t think there is: Is there a way to copy dataset from one project to another...4Jan 13, 2021
How to make Algolia work with Gatsby & Sanity8Jan 7, 2021
Best advice on Slack for passing down full url with GraphQL?5Jan 6, 2021
Is there an easy way to get the reference data in a deeply nested component? I have a list of different components, some...4Jan 6, 2021
I'm still trying to work out how to write a subquery that pulls in references that are based on the parent query. My original...5Jan 5, 2021
I’d love some help understanding how to work with drafts and published documents. I’m running into issues with including...2Jan 5, 2021
is it possible to filter child elements in a query? e.g. in the query below I’d like to return only documents where `deleted...9Jan 4, 2021
Hey guys, does sanity have some kind of caching mechanism on request? im using the `@sanity/client` in a rn app; the issue...11Jan 3, 2021
Is it possible to use gatsby-image to render images loaded in Portable Text / Rich Text?8Jan 1, 2021
Hi, I'm trying to make a simple blog using Sanity and I'm stuck on post retrieval on my index page. I'm currently writing...10Jan 1, 2021
Is it possible to have a `type: array`, of more than one entry for `type: reference` ? I kept getting an error that pointed...13Dec 31, 2020
I can't find the edit button to edit the image... can someone help?6Dec 31, 2020
Hello, quick question - is it safe to commit my `projectId`?5Dec 30, 2020
Hi everyone. I'm new to using Sanity and having a bit of an issue with local development, and wondering if someone is able...9Dec 29, 2020
Hi, anyone able to help with a relationship thing? I have several schemas set up, like, Country, County, and Business,each...3Dec 29, 2020
Hello everyone, can anyone tell me how to access document data from within the structure builder? ```import client from"@sanity/client" cli...7Dec 22, 2020
Hi, I need help with Iframe preview, I have a `route` schema with unique `slug` (`/lb/123`) and also I have `page` schema...10Dec 21, 2020
I’m hoping to use Sanity as an earlier part of our design and prototyping workflow. Are there any techniques or plugins...8Dec 15, 2020
Is there a way to override the hotspot and crop for previews?4Dec 4, 2020
is there a good solution to center or right align text in the richtext editor?2Dec 3, 2020
How can I implement footnotes?6Dec 3, 2020
How do I render the image in Sanity blockcontent into a custom image component?5Nov 28, 2020
How to improve image loading with Gatsby and gatsby-plugin-sanity-image?10Nov 27, 2020
Is there a way to query documents that aren’t referenced by another type of document?7Nov 23, 2020
I'm hoping for a bit of schema setup/structure guidance.3Nov 17, 2020
How to delete all docs of a specific doc type via cli?4Nov 13, 2020
How to Disallow Robots on a Subdomain9Nov 12, 2020
Is it possible to check for how many unique attributes are being used in a specific sanity database?3Nov 11, 2020
Is it necessary to run npm audit fix?4Nov 7, 2020
When using the Sanity client API, do we need to manually set _updatedAt?2Nov 6, 2020
Anyone who could help me out with sanity/mux?6Nov 3, 2020
Does anyone have experience in saving a sanity fetch as global properties in next.js?6Nov 3, 2020
Is there an easy way of clearing unwanted published items?6Oct 30, 2020
Is it possible to have a conditional value within groq?4Oct 19, 2020
If I have a document type A which contains a reference to document type B, when I query type B can I get a list of all A...2Oct 19, 2020
If I'm not getting the 'Preview' option on sanity studio that probably means that I haven't setup previewmode correctlyon...4Oct 19, 2020
I’ve found this: https://www.sanity.io/plugins/sanity-plugin-seo-tools So far i’m installing and testing. But how doesthis...15Sep 30, 2020
Is there anything specific I should be putting in my .gitignore in the studio?4Sep 30, 2020
what is the difference between objects and plugs?6Sep 17, 2020
Would like to change the URL of my deployed sanity studio. Will sanity undeploy affect the dataset at all? Or only the...3Sep 14, 2020
Hi newbie here! I'm looking at making baby steps from a custom CMS that generates JSON data files that are committed to...3Sep 1, 2020
Set up Draft Previews with Gatsby Cloud Hosting4Aug 26, 2020
Add a Webhook to fix Generator Issues7Aug 3, 2020
How to display Sanity images in Gatsby-powered photography sites19Jun 16, 2020
I'm having a hard time doing a client side query, tried using the HTTP API but the URI encoding for '&amp;&amp;' and '-&gt;'...6Jun 8, 2020
GraphQL / Vision Question: I deleted 2 documents. They no longer show in Vision or in studio, but they are still showing...17Jun 5, 2020
Hey! I decided to try and use GROQ in my svelte project and have hit a roadblock. I don’t understand how to correctly query...5May 13, 2020
Hey guys, I'm trying to use the `@sanity/client` package from a Netlify function but am getting an error only in production,...4Apr 25, 2020