What's your biggest current challenge? Have your say in Community Polls along the right column.
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

How can I fetch products in GraphQL in the same format they come in a REST API?

How can I fetch products in GraphQL in the same format they come in a REST API?

Bekkazy
Shopify Partner
1 0 0

In the past, I used REST API and received products in the format described in the documentation.
Now, I need to fetch data from GraphQL, but the data format differs.

In REST API:

 

 

 

{
// other fileds
"images": [
    {
      "id": 850703190,
      "product_id": 632910392,
      "position": 1,
      "created_at": "2018-01-08T12:34:47-05:00",
      "updated_at": "2018-01-08T12:34:47-05:00",
      "width": 110,
      "height": 140,
      "src": "http://example.com/burton.jpg",
      "variant_ids": [
        {}
      ]
    }
  ],
}

 

 

 

In GraphQL Image filed does not have a image.position and images.variant_ids.

Bekkazy_0-1703743607336.png

 


How do I find this fields?

 
Replies 0 (0)