Skip to content

graphql

Auto Added by WPeMatico

GraphQL – Schema generated remove not null indication when in an array

In a custom module in etc/schema.graphqls, I declared my query : type Query { getAvailableCountries: [Country!] @resolver(class: “\Vendor\Module\Model\Resolver\getAvailableCountries”) @doc(description: “Get list of country allowed on magento’s side.”) } There is my resolver code : public function resolve(Field $field, $context, ResolveInfo… Read More »GraphQL – Schema generated remove not null indication when in an array

GraphQL Error in Magento 2.4.1: Cannot query field “uid” on type “ConfigurableProductOptionsValues”

I’m having trouble getting the uid for my Configurable product options via GraphQL. Testing with this simplified query: { products(filter: { url_key: { eq: “test-product” } }) { items { sku … on ConfigurableProduct { configurable_options { attribute_code values {… Read More »GraphQL Error in Magento 2.4.1: Cannot query field “uid” on type “ConfigurableProductOptionsValues”

str_replace(): Argument #3 ($subject) must be of type array|string, float given error after magento upgrade from 2.3.7 to 2.4.7

I have upgraded magento from 2.3.7 to 2.4.7. And one of the graphql query gives below error str_replace(): Argument #3 ($subject) must be of type array|string, float given at /vendor/magento/module-catalog-graph-ql/DataProvider/Product/LayeredNavigation/Builder/Price.php:84) the issue seems fixed when I changed the mentioned line… Read More »str_replace(): Argument #3 ($subject) must be of type array|string, float given error after magento upgrade from 2.3.7 to 2.4.7