Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I'm very excited about this plugin! In the docs, we have:
allCloudinaryMedia to query all images (with a default limit of 10 btw)
allCloudinaryMedia
cloudinaryMedia to fetch one image.
cloudinaryMedia
If I'm correct, then what if I need to query love heart.svg and logo.jpg in a single query???
love heart.svg
logo.jpg
Can something like that be achieved?
Fictitious example (code below doesn't work on graphql)
const data = useStaticQuery(graphql` query CloudinaryImage { cloudinaryMedia(public_id: {eq: "cloudinary/love_heart" AND SOMETHING ELSE??????}) { secure_url } } ` );
The text was updated successfully, but these errors were encountered:
Never mind, I can use different stuff, for example, graphql aliases if I need multiple queries...glad I figured this out on my own :) 👍
In case someone will need an example in the future of what I was looking for:
import { useStaticQuery, graphql } from "gatsby" export const getCloudinaryHeroImages = () => { const data = useStaticQuery(graphql` query getHeroImages { hero: cloudinaryMedia( public_id: { eq: "your_cloudinary_folder/hero_gadgets" } ) { secure_url } loveheart: cloudinaryMedia( public_id: { eq: "your_cloudinary_folder/love-heart" } ) { secure_url } } `) return data }
I'm very excited about this plugin!
In the docs, we have:
allCloudinaryMedia
to query all images (with a default limit of 10 btw)cloudinaryMedia
to fetch one image.If I'm correct, then what if I need to query
love heart.svg
andlogo.jpg
in a single query???Can something like that be achieved?
Fictitious example (code below doesn't work on graphql)
The text was updated successfully, but these errors were encountered: