You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// /gatsby-node.js// added asyncconstcreateCloudinaryNodes=async(gatsby,cloudinary,options)=>{// added awaitawaitcloudinary.api.resources(options,(error,result)=>{consthasResources=result&&result.resources&&result.resources.length;console.log("This is the result",result);if(error){console.error(error);return;}if(!hasResources){console.warn("\n ~Yikes! No nodes created because no Cloudinary resources found. Try a different query?");return;}result.resources.forEach((resource)=>{consttransformations="q_auto,f_auto";// Default CL transformations, todo: fetch base transformations from config maybe.resource.url=addTransformations(resource,transformations);resource.secure_url=addTransformations(resource,transformations,true);constnodeData=getNodeData(gatsby,resource);gatsby.actions.createNode(nodeData);});console.info(`Added ${hasResources} CloudinaryMedia ${hasResources>1 ? "nodes" : "node"}`);});};```
Lookslikeitworked⬇️![gatsby-cloudinary-week_1_resultawait_5](https://user-images.githubusercontent.com/7642493/170055990-1a276498-11d6-4829-9d65-27e6460cc51e.png)
The text was updated successfully, but these errors were encountered:
See PR with commit here
The text was updated successfully, but these errors were encountered: