Typed property must not be accessed before initialization Exception PHP Magento.

From PHP 7.4 Onwards, PHP introduced type hinting for all the properties. Based on the Type Hinting you need to assign proper value to match with that type.

Like, private int $size = 10;Here 10 is the default value for the $size variable.

Exception on Browser,

Typed property DataProvider::$loadedData must not be accessed before initialization, Exception in DataProvider.php class.

Continue reading “Typed property must not be accessed before initialization Exception PHP Magento.”

Get Product URL Rewrites data by GraphQL Magento 2.

Using GraphQL Magento, We can retrieve the product URL rewrites data in the response. If the specific product has multiple URL rewrite histories, The response will be multiple arrays with all the possible URL rewrite for a product.

You can create a query by SKU or Search by product name for GraphQL, Continue reading “Get Product URL Rewrites data by GraphQL Magento 2.”

How to fetch custom category attribute value in GraphQL Magento 2?

You can fetch Custom User-defined category attribute value in the category GraphQL easily.

Let’s say, You have created a category attribute called, category_seo

You can get the category attribute value in Magento GraphQL in the given way,

Run categories Query, Continue reading “How to fetch custom category attribute value in GraphQL Magento 2?”