Skip to content

[Feature] GraphQL images  #109

Closed
Closed
@zerbfra

Description

@zerbfra

Hi all,
I'm currently developing an e-commerce with Magento and a NuxtJS frontend.
We are using the GraphQL apis and our client would like to use the Cloudinary service to upload their product pictures.

I tried getting the images in GraphQL via:

        cld_data {
          thumbnail
          image
          small_image
          media_gallery
        }

This is totally fine and I get the correct product image urls from Cloudinary.

Two questions and feature requests:

  1. Is it possible to get always the cloudinary URL in the graphql response? For instance, I would like to get the Cloudinary URL also from the image, thumbnail etc that are originally in the GraphQL definition for the ProductInterface

  2. Is it possible to add in cld_data some additional photo roles? For instance, I have the worn_photo in my magento backend that I would like to expose and get from the cld_data object. How can I do that?

As you can see from the image, Foto indossato (label for worn_photo) in my roles here:

How can I get this in the cld_data object?

Usually, I get them with a my custom plugin, that simply adds them to the ProductInterface.

I think maybe 1 an 2 can be both resolved by modifying the ProductImage entity (?)

Metadata

Metadata

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions