<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Posts tagged #cloudinary</title><description>All posts tagged with cloudinary on queen.raae.codes</description><link>https://queen.raae.codes/tag/cloudinary/</link><item><title>📝 ✨ ~ Winter vacay ❄️ And this week around the Gatsby islands</title><link>https://queen.raae.codes/2023-02-20-this-week/</link><guid isPermaLink="true">https://queen.raae.codes/2023-02-20-this-week/</guid><description>It&apos;s the winter vacation here in Oslo. We&apos;ll spend the beginning of the week in work mode and the end of the week at a cabin our friends rent without…</description><pubDate>Mon, 20 Feb 2023 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;It&apos;s the winter vacation here in Oslo. We&apos;ll spend the beginning of the week in work mode and the end of the week at a cabin our friends rent without electicity or running water.&lt;/p&gt;
&lt;p&gt;The plan was to skip this week&apos;s unauthorized and rum-fueled treasure hunt, but we encountered a bug in the Cloudinary SDK, Colby was game for some pair programming, so we&apos;re on &lt;a href=&quot;https://www.youtube.com/live/c4lFOKA-QUg&quot;&gt;Tuesday at 20:00 CET&lt;/a&gt; 🔴&lt;/p&gt;
&lt;h2&gt;This week&lt;/h2&gt;
&lt;p&gt;🔴 🐢 &lt;a href=&quot;https://www.youtube.com/live/J3CRGp68Q-0&quot;&gt;Slow &amp;amp; Steady - Episode 171&lt;/a&gt;&lt;br&gt;
— Tuesday, February 21st @ 15:15 CET&lt;/p&gt;
&lt;p&gt;🔴 🏴‍☠️ &lt;a href=&quot;https://www.youtube.com/live/c4lFOKA-QUg&quot;&gt;Let&apos;s fix a Cloudinary SDK bug with Colby Fayock · #JamstackPirates&lt;/a&gt;&lt;br&gt;
— Tuesday, February 21st @ 20:00 CET&lt;/p&gt;
&lt;h2&gt;Future Royal visits by Queen Raae&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://app.codesmith.io/coding-events/fireside-chat-with-benedicte-raae-making-an-impact-in-the-developer-community/2409&quot;&gt;Fireside Chat with Benedicte Raae: Making an Impact in the Developer Community (Codesmith)&lt;/a&gt;&lt;br&gt;
— Tuesday, February 28th @ 21:00 CET (registration is open)&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://www.youtube.com/@Cloudinary/streams&quot;&gt;Cloudinary DevJam (Cloudinary)&lt;/a&gt;&lt;br&gt;
— Wednesday, March 15th @ 19:00 CET (not on the schedule yet)&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;All the best,&lt;br&gt;
Queen Raae&lt;/p&gt;
&lt;br/&gt;&lt;ul&gt;&lt;li&gt;Queen Raae and family was responsible for the Cloudinary Gatsby Plugins.&lt;/li&gt;&lt;/ul&gt;</content:encoded></item><item><title>🏝 🗓 ~ Linebreaks, Markdown and VS Code</title><link>https://queen.raae.codes/2022-11-15-md-linebreaks/</link><guid isPermaLink="true">https://queen.raae.codes/2022-11-15-md-linebreaks/</guid><description>TLDR: Use / to indicate a line break in Markdown, for example, when making an emoji bullet list: md ⭐️ Star the repository on Github\ 🐦 Tweet about the…</description><pubDate>Tue, 15 Nov 2022 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;strong&gt;TLDR:&lt;/strong&gt; Use &lt;code&gt;/&lt;/code&gt; to indicate a line break in Markdown, for example, when making an emoji bullet list:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-md&quot;&gt;⭐️ Star the repository on Github\
🐦 Tweet about the plugin, and make sure to tag @cloudinary\
👩‍💻 Create content about the plugin and let @cloudinary know on Twitter\
✍️ Refer to the plugin in your project&apos;s readme
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Working on the docs for &lt;a href=&quot;https://github.com/cloudinary-devs/gatsby-source-cloudinary&quot;&gt;gatsby-source-cloudinary&lt;/a&gt; today, I again encountered the problem with using &lt;code&gt; &lt;/code&gt; (i.e. double space) at the end of a line to indicate a line break.&lt;/p&gt;
&lt;p&gt;By default, VSCode removes trailing whitespace. I disabled this setting at one point, but Ola still has the default setting. Whenever he worked on the docs the line breaks disappeared.&lt;/p&gt;
&lt;p&gt;Unfortunately, this is not something we can solve with Prettier, and asking every contributor to disable the setting is not really feasible.&lt;/p&gt;
&lt;p&gt;So I did some Googling, and what do you know: You can use &lt;code&gt;\&lt;/code&gt;, problem solved!&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;All the best,&lt;br&gt;
Queen Raae&lt;/p&gt;
&lt;br/&gt;&lt;ul&gt;&lt;li&gt;Queen Raae and family was responsible for the Cloudinary Gatsby Plugins.&lt;/li&gt;&lt;/ul&gt;</content:encoded></item><item><title>🖼 📥 ~ Please include a demo in your Gatsby Plugin repository</title><link>https://queen.raae.codes/2022-09-23-demo-cloudinary/</link><guid isPermaLink="true">https://queen.raae.codes/2022-09-23-demo-cloudinary/</guid><description>Yesterday, Colby Fayock of Space Jelly (and Cloudinary) joined the unauthorized and rum-fueled treasure hunt in the sharky waters around the Gatsby islands…</description><pubDate>Fri, 23 Sep 2022 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Yesterday, Colby Fayock of Space Jelly (and Cloudinary) joined the &lt;a href=&quot;https://youtu.be/IicwkJCNy7k&quot;&gt;unauthorized and rum-fueled treasure hunt&lt;/a&gt; in the sharky waters around the Gatsby islands 🏴‍☠️&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://youtu.be/IicwkJCNy7k&quot;&gt;&lt;img src=&quot;./screengrab.jpg&quot; alt=&quot;Screendump of Ola, me, and Colby laughing with a blurry plush unicorn covering Lillian&apos;s face&quot;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Cloudinary is our client. This summer, we upgraded their plugins to work with v4, and these days we are working on an automated release process, &lt;code&gt;pluginOptionsSchema&lt;/code&gt; validation, clean-up of the documentation ++&lt;/p&gt;
&lt;h2&gt;The What?&lt;/h2&gt;
&lt;p&gt;Add a demo site to the gatsby-source-cloudinary repository&lt;/p&gt;
&lt;h2&gt;The Why?&lt;/h2&gt;
&lt;p&gt;Having a demo and the plugin code in the same repository makes setting up the dev environment a breeze. Even with automated tests in place, it&apos;s helpful to see the plugin in action as you develop.&lt;/p&gt;
&lt;h2&gt;The How&lt;/h2&gt;
&lt;p&gt;Make use of &lt;a href=&quot;https://classic.yarnpkg.com/lang/en/docs/workspaces/&quot;&gt;yarn workspaces&lt;/a&gt;. One workspace for the plugin and one for the demo.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Move the plugin code you already have into its own folder.
&lt;ul&gt;
&lt;li&gt;I like to call it &lt;code&gt;/plugin&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Then add the demo Gatsby site to another folder.
&lt;ul&gt;
&lt;li&gt;I like to call it &lt;code&gt;/demo&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Create a &lt;code&gt;package.json&lt;/code&gt; in your root that looks like this&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code class=&quot;language-json&quot;&gt;{
  &amp;quot;private&amp;quot;: true,
  &amp;quot;workspaces&amp;quot;: [&amp;quot;plugin&amp;quot;, &amp;quot;demo&amp;quot;],
  &amp;quot;scripts&amp;quot;: {
    &amp;quot;develop&amp;quot;: &amp;quot;yarn workspace demo develop&amp;quot;,
    &amp;quot;build&amp;quot;: &amp;quot;yarn workspace demo build&amp;quot;,
    &amp;quot;serve&amp;quot;: &amp;quot;yarn workspace demo serve&amp;quot;,
    &amp;quot;clean&amp;quot;: &amp;quot;yarn workspace demo clean&amp;quot;
  }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Make sure to delete whatever &lt;code&gt;node_modules&lt;/code&gt; folders you might have&lt;/li&gt;
&lt;li&gt;Run &lt;code&gt;yarn install&lt;/code&gt; from root&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you have any formatting or test scripts, I like to add those to the root &lt;code&gt;package.json&lt;/code&gt; as well together with their local dev dependencies.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Check out the &lt;a href=&quot;https://github.com/cloudinary-devs/gatsby-source-cloudinary/pull/41&quot;&gt;Pull Request on Github&lt;/a&gt; for the full work on gatsby-source-cloudinary.&lt;/p&gt;
&lt;p&gt;All the best,&lt;br&gt;
Queen Raae&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;PS: If you are starting from scratch I recommend you start with my &lt;a href=&quot;https://github.com/queen-raae/gatsby-plugin-starter&quot;&gt;Gatsby Plugin Starter&lt;/a&gt;&lt;/p&gt;
&lt;br/&gt;&lt;ul&gt;&lt;li&gt;Queen Raae and family was responsible for the Cloudinary Gatsby Plugins.&lt;/li&gt;&lt;/ul&gt;</content:encoded></item><item><title>🏝 🗓 ~ This week around the Gatsby islands</title><link>https://queen.raae.codes/2022-06-20-this-week/</link><guid isPermaLink="true">https://queen.raae.codes/2022-06-20-this-week/</guid><description>We are finishing up the major work on the Gatsby Cloudinary plugins 🎉 If you are using Gatsby + Cloudinary, we could really need some help testing them on…</description><pubDate>Mon, 20 Jun 2022 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;We are finishing up the major work on the Gatsby Cloudinary plugins 🎉 If you are using Gatsby + Cloudinary, we could really need some help testing them on real projects! LMK, if that could be you 🙏&lt;/p&gt;
&lt;p&gt;This week is &lt;a href=&quot;https://reactnorway.com/&quot;&gt;React Norway&lt;/a&gt;. We&apos;ll get to hang out with our contact at Cloudinary and other awesome peeps as a gentle introduction to workcation 2020!&lt;/p&gt;
&lt;p&gt;No streams or regular content until late August, but we&apos;ll follow up with our clients and maybe do some recreational coding. It depends on how much rain we get, I suppose ☔️&lt;/p&gt;
&lt;p&gt;I do love a good workcation, as you can see in &lt;a href=&quot;https://youtu.be/fpFY82efGPI&quot;&gt;this vlog from 2020&lt;/a&gt; ☀️&lt;/p&gt;
&lt;p&gt;Let&apos;s hang if you find yourself on the west coast of Sweden in July or in Oslo in August. Send me a DM on Twitter, and we&apos;ll figure it out.&lt;/p&gt;
&lt;h2&gt;Events&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://cfe.dev/events/databases-and-the-jamstack/&quot;&gt;Jamstack and Databases?! with Taylor Barnett (cfe.dev)&lt;/a&gt;&lt;br&gt;
— Thursday, June 23rd @ 19:00 CEST&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;All the best,&lt;br&gt;
Queen Raae&lt;/p&gt;
&lt;br/&gt;&lt;ul&gt;&lt;li&gt;Queen Raae and family was responsible for the Cloudinary Gatsby Plugins.&lt;/li&gt;&lt;/ul&gt;</content:encoded></item><item><title>🏝 🗓 ~ This week around the Gatsby islands</title><link>https://queen.raae.codes/2022-05-30-this-week/</link><guid isPermaLink="true">https://queen.raae.codes/2022-05-30-this-week/</guid><description>Ola and I will be focusing on the Cloudinary Plugins this week. Let us know if you use either gatsby-source-cloudinary or gatsby-transformer-cloudinary. We…</description><pubDate>Mon, 30 May 2022 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Ola and I will be focusing on the Cloudinary Plugins this week. Let us know if you use either gatsby-source-cloudinary or gatsby-transformer-cloudinary. We could use some beta testers for our upgrades.&lt;/p&gt;
&lt;p&gt;Last week Gatsby released the &lt;code&gt;Script&lt;/code&gt; component as part of &lt;a href=&quot;https://www.gatsbyjs.com/docs/reference/release-notes/v4.15/&quot;&gt;v4.15&lt;/a&gt;, making it easier to &lt;a href=&quot;/2022-01-05-external-scripts/&quot;&gt;add third-party/external&lt;/a&gt; or custom scripts.&lt;/p&gt;
&lt;p&gt;I am hoping to make use of it in our gatsby-remark-oembed plugin. Maybe it should be the topic for this week&apos;s Deep Dive 🤔&lt;/p&gt;
&lt;p&gt;OG Deep Dive navigator Paul is doing his first-ever talk this week. If you are in San Fransisco, come out for &lt;a href=&quot;https://www.gatsbyjs.com/demos/rise-of-the-robots/&quot;&gt;Rise of the Robots&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Our streaming schedule this week&lt;/h2&gt;
&lt;p&gt;🔴 ⛵ &lt;a href=&quot;https://youtu.be/WRe4U2JRLn0&quot;&gt;Coding and chatting with Jed · #OlaCast #27&lt;/a&gt;&lt;br&gt;
— Wednesday, June 1st @ 17:00 CEST&lt;/p&gt;
&lt;p&gt;🔴 🏴‍☠️ &lt;a href=&quot;https://youtu.be/Wqilgl_V7FA&quot;&gt;Unauthorized and rum-fueled treasure hunt · #GatsbyJS Deep Dive&lt;/a&gt;&lt;br&gt;
— Thursday, June 2nd @ 19:00 CEST&lt;/p&gt;
&lt;h2&gt;Other events&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://www.gatsbyjs.com/demos/rise-of-the-robots/&quot;&gt;Rise of the Robots — Jamstack Creativity, Performance Optimization and Accessibility (Gatbsy - in person)&lt;/a&gt;&lt;br&gt;
— Wednesday, June 1st @ 06:00 PDT&lt;/p&gt;
&lt;p&gt; &lt;br&gt;
All the best,&lt;br&gt;
Queen Raae&lt;/p&gt;
&lt;br/&gt;&lt;ul&gt;&lt;li&gt;Queen Raae and family was responsible for the Cloudinary Gatsby Plugins.&lt;/li&gt;&lt;/ul&gt;</content:encoded></item><item><title>🔁 2️⃣ ~ How to paginate through API results when sourcing data</title><link>https://queen.raae.codes/2022-05-27-pagination/</link><guid isPermaLink="true">https://queen.raae.codes/2022-05-27-pagination/</guid><description>We covered the two ways to paginate through API results when sourcing data on yesterday&apos;s unauthorized and rum-fueled treasure hunt in the sharky waters around…</description><pubDate>Fri, 27 May 2022 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;We covered the two ways to paginate through API results when sourcing data on yesterday&apos;s &lt;a href=&quot;https://youtu.be/y2oIg8xvWC0&quot;&gt;unauthorized and rum-fueled treasure hunt&lt;/a&gt; in the sharky waters around the Gatsby islands.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://youtu.be/y2oIg8xvWC0&quot;&gt;&lt;img src=&quot;./screengrab.jpg&quot; alt=&quot;Screengrab of stream&quot;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;The What?&lt;/h2&gt;
&lt;p&gt;Get more than the first page of results from an external API.&lt;/p&gt;
&lt;p&gt;In our case, that means more than the &amp;quot;max results&amp;quot; returned from each request to the resources endpoint of the Cloudinary API.&lt;/p&gt;
&lt;h2&gt;The Why?&lt;/h2&gt;
&lt;p&gt;Pagination is needed to solve the bug &lt;a href=&quot;https://github.com/cloudinary-devs/gatsby-source-cloudinary/issues/5&quot;&gt;Only returns up to 500 results&lt;/a&gt; in gatsby-source-cloudinary.&lt;/p&gt;
&lt;p&gt;And it&apos;s on us to fix it as Cloudinary has hired us to make sure their Gatsby Plugins are up-to-date by summer 🎉🎉🎉&lt;/p&gt;
&lt;h2&gt;The How&lt;/h2&gt;
&lt;p&gt;There are two fundamental ways for solving pagination: recursion and iteration.&lt;/p&gt;
&lt;p&gt;Both solve the use case &amp;quot;if there are more results, ask the API for the next page of results&amp;quot;.&lt;/p&gt;
&lt;p&gt;To not repeatedly ask for the same page, the API needs to know something about the requested page.&lt;/p&gt;
&lt;p&gt;It can be the index of the page you are requesting, as seen in the ConvertKit &lt;a href=&quot;https://developers.convertkit.com/#list-subscribers&quot;&gt;subscribers endpoint&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Or it can be the concept of a cursor as used by Cloudinary. If there are more possible resources than included in the response, Cloudinary adds a next cursor value you then need to provide to the subsequent request for resources.&lt;/p&gt;
&lt;h3&gt;Recursion&lt;/h3&gt;
&lt;p&gt;Recursion is when a function calls itself within its code. It&apos;s a great way to get the same code to execute again and again and again.&lt;/p&gt;
&lt;p&gt;But you must also make sure you stop at some point, or you&apos;ll continue to infinity and beyond (yes, I did just rewatch Toy Story with the Pirate Princess).&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;toy-story-buzz-lightyear.gif&quot; alt=&quot;Buzz Lightyear spreading his wings and saying &amp;quot;to infinity and beyond&amp;quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;In our case, we only let &lt;code&gt;createCloudinaryNodes&lt;/code&gt; call itself if there is a next cursor present in the response coming from Cloudinary.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-js&quot;&gt;// gatsby-node.js
// ... import and configure cloudinary
const createCloudinaryNodes = async (gatsbyUtils, nextCursor) =&amp;gt; {
  const result = await cloudinary.api.resources({
    resource_type: &amp;quot;image&amp;quot;,
    next_cursor: nextCursor,
  });

  gatsbyUtils.reporter.info(
    `Fetched Cloudinary Assets &amp;gt;&amp;gt;&amp;gt; ${result.resources.length} from ${nextCursor}`
  );

  // ... create a node for each resource in result.resource

  if (result.next_cursor) {
    await createCloudinaryNodes(gatsbyUtils, result.next_cursor);
  }
};

exports.sourceNodes = async (gatsbyUtils) =&amp;gt; {
  await createCloudinaryNodes(gatsbyUtils);
};
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Iteration&lt;/h3&gt;
&lt;p&gt;For the iterative solution, we used a do...while loop. The code in the do part of do...while loop will always execute once. And then keep on executing as long as the while condition is true.&lt;/p&gt;
&lt;p&gt;In our case, we will keep requesting a new page of resources from Cloudinary until Cloudinary does not respond with the next cursor.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-js&quot;&gt;// gatsby-node.js
// ... import and configure cloudinary
const createCloudinaryNodes = async (gatsbyUtils) =&amp;gt; {
  let nextCursor = null;

  do {
    const result = await cloudinary.api.resources({
      resource_type: &amp;quot;image&amp;quot;,
      next_cursor: nextCursor,
    });

    gatsbyUtils.reporter.info(
      `Fetched Cloudinary Assets &amp;gt;&amp;gt;&amp;gt; ${result.resources.length} from ${nextCursor}`
    );

    // ... create a node for each resource in result.resource

    nextCursor = result.next_cursor;
  } while (nextCursor);
};

exports.sourceNodes = async (gatsbyUtils) =&amp;gt; {
  await createCloudinaryNodes(gatsbyUtils);
};
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;More code!&lt;/h2&gt;
&lt;p&gt;To see the &amp;quot;missing&amp;quot; code check out and how to limit the number of resources fetched, check out &lt;a href=&quot;https://github.com/queen-raae/gatsby-demo-api-pagination&quot;&gt;the demo code on GitHub&lt;/a&gt;.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/queen-raae/gatsby-demo-api-pagination/pull/1&quot;&gt;Pagination using recursion&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/queen-raae/gatsby-demo-api-pagination/pull/2&quot;&gt;Pagination using iteration&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt; &lt;br&gt;
All the best,&lt;br&gt;
Queen Raae&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;PS:&lt;/strong&gt; Use the approach you feel most comfortable with. Don&apos;t get hung up on tech-bros arguing one over the other!&lt;/p&gt;
&lt;br/&gt;&lt;ul&gt;&lt;li&gt;Queen Raae and family was responsible for the Cloudinary Gatsby Plugins.&lt;/li&gt;&lt;/ul&gt;</content:encoded></item><item><title>⏳ ⌛️ ~ Remember to await node creation!</title><link>https://queen.raae.codes/2022-05-25-await-node-creation/</link><guid isPermaLink="true">https://queen.raae.codes/2022-05-25-await-node-creation/</guid><description>In yesterday&apos;s email I mentioned you must only create nodes within sourceNodes and onCreateNode. A pretty straightforward rule, but sourcing data usually…</description><pubDate>Wed, 25 May 2022 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;In &lt;a href=&quot;/2022-05-24-node-creation/&quot;&gt;yesterday&apos;s email&lt;/a&gt; I mentioned you must only create nodes within &lt;code&gt;sourceNodes&lt;/code&gt; and &lt;code&gt;onCreateNode&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;A pretty straightforward rule, but sourcing data usually introduces asynchronous code. And with asynchronous code, you can quickly end up in a situation where you create nodes outside &lt;code&gt;sourceNodes&lt;/code&gt; and &lt;code&gt;onCreateNode&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Unfortunately, it still usually works, at least for a few nodes and often in development. However, when you deploy, it falls apart.&lt;/p&gt;
&lt;p&gt;When you see inconsistent and weird behavior around node creation, your issue is probably nodes created outside of &lt;code&gt;sourceNodes&lt;/code&gt; and &lt;code&gt;onCreateNode&lt;/code&gt;. Or direct manipulation of nodes; the topic for &lt;a href=&quot;/2022-05-26-direct-mutation/&quot;&gt;tomorrow&apos;s email&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;There is an excellent example in &lt;a href=&quot;https://www.gatsbyjs.com/docs/debugging-async-lifecycles/&quot;&gt;the Gatsby Docs&lt;/a&gt;, but here is another one without the use of &lt;code&gt;.then&lt;/code&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-js&quot;&gt;// gatsby-node.js

const cloudinary = require(&amp;quot;cloudinary&amp;quot;).v2;

cloudinary.config({
  cloud_name: process.env.CLOUDINARY_CLOUD_NAME,
  api_key: process.env.CLOUDINARY_API_KEY,
  api_secret: process.env.CLOUDINARY_API_SECRET,
});

const createCloudinaryNodes = async (gatsbyUtils) =&amp;gt; {
  const { actions, reporter, createNodeId, createContentDigest } = gatsbyUtils;
  const { createNode } = actions;

  const result = await cloudinary.api.resources({
    resource_type: &amp;quot;image&amp;quot;,
  });

  result.resources.forEach((resource) =&amp;gt; {
    reporter.info(`Create CloudinaryAsset &amp;gt;&amp;gt;&amp;gt; ${resource.public_id}`);
    createNode({
      id: createNodeId(resource.public_id),
      ...resource,
      internal: {
        type: &amp;quot;CloudinaryAsset&amp;quot;,
        content: JSON.stringify(resource),
        contentDigest: createContentDigest(resource),
      },
    });
  });
};

exports.sourceNodes = (gatsbyUtils) =&amp;gt; {
  const { reporter } = gatsbyUtils;

  reporter.info(&amp;quot;sourceNodes - START&amp;quot;);
  createCloudinaryNodes(gatsbyUtils);
  reporter.info(&amp;quot;sourceNodes - DONE&amp;quot;);
};

// CONSOLE OUTPUT
// info sourceNodes - START
// info sourceNodes - DONE
// info Create CloudinaryAsset &amp;gt;&amp;gt;&amp;gt; queen.raae.codes-test-5/static/raae-avatar
// info Create CloudinaryAsset &amp;gt;&amp;gt;&amp;gt; queen.raae.codes-test-5/static/raae
// ... more nodes
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;In the &amp;quot;console output,&amp;quot; you see that nodes are created outside of &lt;code&gt;sourceNodes&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The fix is to await &lt;code&gt;createCloudinaryNodes&apos;and make &lt;/code&gt;exports.sourceNodes` an asyncrounous functions.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-js&quot;&gt;exports.sourceNodes = async (gatsbyUtils) =&amp;gt; {
  const { reporter } = gatsbyUtils;

  reporter.info(&amp;quot;Sourcing nodes - START&amp;quot;);
  await createCloudinaryNodes(gatsbyUtils);
  reporter.info(&amp;quot;Sourcing nodes - DONE&amp;quot;);
};

// CONSOLE OUTPUT
// info sourceNodes - START
// info Create CloudinaryAsset &amp;gt;&amp;gt;&amp;gt; queen.raae.codes-test-5/static/raae-avatar
// info Create CloudinaryAsset &amp;gt;&amp;gt;&amp;gt; queen.raae.codes-test-5/static/raae
// ... more nodes
// info sourceNodes - DONE
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt; &lt;br&gt;
All the best,&lt;br&gt;
Queen Raae&lt;/p&gt;
&lt;br/&gt;&lt;ul&gt;&lt;li&gt;Queen Raae and family was responsible for the Cloudinary Gatsby Plugins.&lt;/li&gt;&lt;/ul&gt;</content:encoded></item></channel></rss>