- Integrations
- Cloudinary-supported integrations
- Adobe Creative Cloud Connector
- Base44 Integration
- Chrome Media Library Extension
- commercetools extension
- Contentful App
- Figma Plugin
- n8n Integration
- Magento (Adobe Commerce) Extension
- Salesforce Commerce Cloud Cartridges
- Salesforce Marketing Cloud App
- SAP Commerce Extension
- WordPress Plugin
- Zapier Integration
- Partner-supported integrations
- Actindo Connection
- Agility Custom Field
- Builder.io App Extension
- ButterCMS Integration
- Chioro Operation
- CloudCannon DAM Integration
- Conscia Connector
- Contentstack Custom Field Extension
- Creative Force Asset Delivery
- Hygraph UI Extension
- Hootsuite Plugin
- Kontent.ai Custom Element
- Magnolia DAM Connector
- Movidmo Upload Connector
- OpenText TeamSite Connector
- Sanity Plugin
- Sitefinity DAM System Integration
- Smint.io Data Source Connector
- Stackbit Integration
- Storyblok App Integration
- Syndigo Advanced DAM App
- Uniform Integration
- Custom integrations
- Video tutorial library
- Release notes
- Cloudinary-supported integrations
- Cloudinary 3D
- Pre-Releases
Magento (Adobe Commerce) GraphQL queries
Last updated: Jan-16-2025
With the Cloudinary module for Magento (Adobe Commerce), you can use GraphQL to retrieve Cloudinary URLs for all media image attributes associated with your products. This guide explains how to query custom media attributes and Product Gallery Widget parameters using GraphQL.
Magento product data and Cloudinary integration
In Magento, product information consists of various attributes, including custom attributes defined by users, such as media image attributes. The custom_media_attributes field, combined with the attribute_codes argument, enables retrieving Cloudinary URLs for any media image attribute, including custom-defined ones. For more details on Magento product attributes, refer to the official Magento documentation. To learn more about attribute input types, explore the Attribute Input Types documentation.
Query overview
The GraphQL query retrieves Cloudinary-specific product data for a product with a specific SKU. This includes:
-
custom_media_attributes: URLs for Cloudinary image delivery, linked to specified attribute codes. -
gallery_widget_parameters: Configuration settings for the Product Gallery Widget.
These fields are nested under the cld_data field within the products query.
Query for custom media attributes
To retrieve Cloudinary URLs for specific media image attributes, use the custom_media_attributes field with the attribute_codes argument. Here’s an example query for a product with SKU "WS12":
Query breakdown
Your request includes the following parameters:
-
products: The main query field to fetch products. -
filter: Specifies the criteria for fetching products. -
sku: { eq: "WS12" }: Filters the product by SKU "WS12". -
items: Represents the list of products matching the specified filter criteria. -
cld_data: A nested field that contains Cloudinary-specific product data. -
custom_media_attributes: Accepts theattribute_codesargument to specify media attribute codes. -
attribute_code: The code for a media image attribute. -
url: The Cloudinary URL associated with the attribute.
Sample response
Query for Product Gallery Widget parameters
To fetch Product Gallery Widget settings for a specific SKU, use the gallery_widget_parameters field:
Query breakdown
Your request includes the following parameters:
-
products: The main query field to fetch products. -
filter: Specifies the criteria for fetching the product.-
sku: { eq: "WS12" }: Filters the product by the SKU.
-
-
items: Represents the list of products matching the specified filter criteria. -
cld_data: Contains Cloudinary-specific data for each product.-
gallery_widget_parameters: Returns a JSON string with the Product Gallery Widget configuration.
-