Skip to content

graphql

Auto Added by WPeMatico

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

Graphql return null values

Schema.graphqls type Query { getGoogleMedia: [GoogleMedia] @resolver(class: “Test\LocationData\Model\Resolver\GoogleMediaResolver”) } type GoogleMedia { image_view_all_link: String images: GooglePhotos video_view_all_link: String videos: GoogleVideos } type GooglePhotos { id: Int review_id: String image: String } type GoogleVideos { id: Int review_id: String video_link: String… Read More »Graphql return null values

Generate Customer Token not working

curl –location ‘http://gravity.freestylelibre.devops:81/graphql’ –header ‘Authorization: Bearer fkvb31wfm3xh64k415hldo5eba4qiu4s’ –header ‘store: 37’ –header ‘Content-Type: application/json’ –header ‘Cookie: PHPSESSID=rimu6j4naus2c67jstmsar1j4a; private_content_version=c5ffb5a3f0dae6c381024d34148823e0’ –data-raw ‘{“query”:”mutation {rn generateCustomerToken(rn email: “[email protected]”rn password: “Nilkunj@123″rn ) {rn token rn }rn}”,”variables”:{}}’

Venia pwa + magento 2

Can anyone explain how security works on graphql on venia pwa? I don’t see any tokens or sessions or something like this at Venia. So any developer can create a graphql query and get all data from my site?

Custom Product Filter GraphQl Not working in magento 2.4

I want to add a stock filter for the product search GraphQl query. check below my code schema.graphqls input ProductAttributeFilterInput @doc(description: “Defines the filters”){ stock_status: FilterEqualTypeInput } di.xml <virtualType name=”MagentoCatalogModelApiSearchCriteriaCollectionProcessorProductFilterProcessor” type=”MagentoEavModelApiSearchCriteriaCollectionProcessorFilterProcessor”> <arguments> <argument name=”customFilters” xsi:type=”array”> <item name=”stock_status” xsi:type=”object”>CustomModuleModelResolverProductsSearchCriteriaCollectionProcessorFilterProcessorCustomStockFilter</item> </argument> </arguments>… Read More »Custom Product Filter GraphQl Not working in magento 2.4