Skip to content

magento-graphql

Auto Added by WPeMatico

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

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?

Magento 2 Plugin not working for class MagentoQuoteModelCartDataCartItemFactory

Does anyone know how to create a plugin for the class MagentoQuoteModelCartDataCartItemFactory method public function create(array $data): CartItem? I have tried creating before, after, and around plugins but didn’t work. below is the reference code: di.xml: <type name=”MagentoQuoteModelCartDataCartItemFactory”> <plugin name=”custom_store_qty”… Read More »Magento 2 Plugin not working for class MagentoQuoteModelCartDataCartItemFactory

How I can provide a Collection at the constructor of my Graphql Resolver?

In my module I defined a etc/schema.graphqls: type BlogPost { blog_post_id: ID title: String post: String } input BlogpostAttributeFilterInput { page: Int limit: Int } type Query { allBlogPosts(input: BlogpostAttributeFilterInput) : [BlogPost] @resolver(class: “\MageGuide\FirstModule\Model\Resolver\GetBlogPosts”) @doc(description:”Retrieve All BlogPosts”) @cache(cacheable: false) }… Read More »How I can provide a Collection at the constructor of my Graphql Resolver?

How to change GraphQL sorting and filtering to use the highest price of product variants instead of the lowest?

I’m working with GraphQL in my application, specifically with product filtering and sorting. Currently, the system is configured to use the lowest price of the product variants for filtering and sorting purposes. However, I need to modify this behavior to… Read More »How to change GraphQL sorting and filtering to use the highest price of product variants instead of the lowest?