Skip to main content

Graphql Query

Comments

3 comments

  • Aleksandar Kostadinov

    Hi Daniel,

    Cloudinary currently doesn't have direct support for GraphQL, but if you share with us what library/framework you're using we may be able to take a look at how it could work.

    Best regards,

    Aleksandar

    0
  • Stuart Hicks

    I managed this by filtering my query using the public_id of the folder with the images I was interested in. You can use a glob (global) query and give it a wild card (*) to select everything within that folder e.g.:

    {
      allCloudinaryMedia(filter: {public_id: {glob: "top-level-directory/directory-with-images/*"}}) {
        nodes {
          url
        }
      }
    }

    FYI I was using Gatsby with the gatsby-source-cloudinary plugin. I suggest you run a general query to see what your public_id looks like, then base your wildcard filter on that.

    0
  • Aleksandar Kostadinov

    That is a great approach, Stuart. Thanks for sharing.
    Daniel, please try Stuart's example and let us know if that works for you too.

    0

Post is closed for comments.