Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Using the Sanity client without specifying an API version is deprecated

Please include date of sanity project initialization in client.js.

import sanityClient from "@sanity/client";

export default sanityClient({
  projectId: "######", // find this at manage.sanity.io or in your sanity.json
  dataset: "production",
  useCdn: true,
  apiVersion: "2022-07-15" //the day you started working with sanity on that specific project
});
 
PREVIOUS NEXT
Tagged: #Using #Sanity #client #API #version #deprecated
ADD COMMENT
Topic
Name
5+4 =