Ecommerce Shopify WordPress Discussion

Differences between Shopify Liquid API and Storefront API

I am currently building out a storefront using React and Hydrogen. I am trying to access all types that are used in a collection. The collection object in the Liquid API does return the "all_types" field that lists the desired information. However, the Storefront API GraphQL endpoint does not return this attribute. Am I missing something? Also, if there really are differences between the data than can be returned I'd be curious to know why this distinction is being made. Thanks in advance!
In this case you can get a list of product types with Storefront API GraphQL like this: In the collection object there is a connection with products it contains and the product object has a property called productType. Please refer to the following documentations: https://shopify.dev/docs/api/storefront/2023-10/objects/Collection https://shopify.dev/docs/api/storefront/2023-10/objects/Product { collection(id: "gid://shopify/Collection/<YOUR_COLLECTION_ID>") { products(first: 250) { edges { node { productType } } } } }

December 30, 2023

TurboCommerce make the better internet purchasing globaly

Turbo Multi-language Translator

Make the better internet purchasing globaly

Turbosify SEO Speed Booster

5.0 (7) Free plan available
Get better conversions by improving store loading speed Installed

Turbo Multi-language Chat - AI Customer service in one hand

TurboCommerce make the better internet purchasing globaly
Our products

The help you need, when you need it

App by Turbo Engine

3 apps • 5.0 average rating

Turbosify Speed Booster

5.0 (7)
Get better conversions by optimizing shopify store Google page speed Installed

Turbosify Translator for Wordpress Woocommerce

5.0 (74) Free Wordpress Woocommerce Plugin
Translate your wordpress website to multiple language within 1 click, no configuration needed, no No technical required

Grow your business here

Whether you want to sell products down the street or around the world, we have all the tools you need.