Questions tagged [magento-graphql]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
27 views

Magento 2 graphql route, Call to a member function create() on null

I am working on Magento 2 graphql, magento version is 2.4.6. I am getting this error when I try to fetch category page through route resolver; Route resolver works for cms and product pages though; ...
Haris's user avatar
  • 869
0 votes
0 answers
31 views

Every api request session id is changing

my backend is magento 2 with graphql and in front-side we are using next js so my problem is for on every request in api response set-cookie header gives different PHP session id but i have to ...
magento dev's user avatar
0 votes
2 answers
63 views

Magento 2 Plugin not working for class Magento\Quote\Model\Cart\Data\CartItemFactory

Does anyone know how to create a plugin for the class Magento\Quote\Model\Cart\Data\CartItemFactory method public function create(array $data): CartItem? I have tried creating before, after, and ...
Arun's user avatar
  • 1
0 votes
0 answers
17 views

In Magento 2 :- How to give return functionality of rma-graphql module for guest users

I want to give the return functionality for the guest users in rma-graphql default module. Also, I want to revoke the customer access token for the guest users in rma-graphql default module. If anyone ...
Amarnath Chauhan's user avatar
0 votes
1 answer
166 views

Magento 2.4.6p2 graphql customer token

I have a multi site Magento installation we do not share login per website. We have 2 websites under the same domain each with separate store views. If you create and account on the second store view ...
Juliano Vargas's user avatar
0 votes
1 answer
55 views

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 ...
Dimitrios Desyllas's user avatar
0 votes
0 answers
155 views

Magento 2.4.6 - How we can add quantity_and_stock_status in layered navigation Graphql?

I want to add an "out of stock exclude" filter in Layered Navigation using GraphQl. I have enabled "Display out of stock" in the admin configuration. And also change the ...
Arun's user avatar
  • 1
0 votes
0 answers
106 views

Get Multiselect value from toOptionArray() Magento 2

I have created system.xml with the following configuration - <group id="invoice_toggle_config" translate="label" showInDefault="1" showInWebsite="1" ...
Rashi's user avatar
  • 1
0 votes
2 answers
415 views

Magento 2 Graphql Additional Product Image Values

Good afternoon all, I am currently working with a custom frontend for Magento 2 that uses Graphql to grab product data: Currently for the product image section we are getting back the following data ...
Baber's user avatar
  • 190
0 votes
0 answers
146 views

How to add custom sort in Product GrqphQl query Magento 2?

I have a functionality where I have to display the bestseller products, so for this I am using Product query. To full fill my requirement I am using one custom short attribute products( ...
Deepak Mankotia's user avatar
0 votes
0 answers
242 views

Magento 2 : How to create a graphql api for fetch the best seller product collection with arguments search and filter like in the product graphql?

I am trying to fetch Best seller product collections using graphql like the one below. bestSellers ( pageSize: Int = 20 @doc(description: "The maximum number of results to return at once. ...
sHIFT's user avatar
  • 1
0 votes
0 answers
82 views

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 ...
Shiffin J Thomas's user avatar
0 votes
0 answers
64 views

Magento2.4.6 - Why X-Magento-Cache-Debug is not displaying in the response header?

I want to use cache GraphQl query for a custom module. I have created an Identity class and added @cache in the schema.graphqls. And Model file extends \Magento\Framework\Model\AbstractModel and ...
Arun's user avatar
  • 1
0 votes
0 answers
120 views

Pass json object in Magento GraphQL

I am required to pass json object in GraphQL Query. Is there any alternate way to do this currently GraphQL support Json as String.
Abdul Rafay's user avatar
0 votes
0 answers
55 views

Magento 2.4.6: How to add virtual product to cart when adding simple product to cart using graphql mutation?

I'm trying to add virtual product to cart when we add simple product to cart using Graphql mutation. How I can pass the virtual product data with the simple product data? Can someone help me on this? ...
Arun's user avatar
  • 1
0 votes
0 answers
107 views

Facing issue to write test case for the product custom attribute for graphQL API response

I build a functionality where in I have custom attribute in product, I am using graphQL query to fetch the products list. To test this functionality I am writing a test case which will check if query ...
Deepak Mankotia's user avatar
0 votes
1 answer
710 views

Magento 2 GraphQL - Cart Query Getting Error

In GraphQL when I running below queries getting error. Mutation : mutation customerAccessTokenCreate { generateCustomerToken( email: "[email protected]", password: "Test@123" ...
Vrajesh Patel's user avatar
0 votes
0 answers
6 views

Create a custom component to create display design options in admin and design option dropdown and selected will be displayed on product page

Create a custom component to add/edit/delete and view the detail of design information into admin. Associate the multiple design option to product and show selected design option product detail page. ...
Deep Shah's user avatar
  • 555
1 vote
1 answer
377 views

Returning configurable_options and variants are null for configurable products in custom product collection graphql query

I have sellerProducts Query and SellerProducts type has product interface. When i call SellerProducts query it returns configurable_options and variants are null for configurable products in custom ...
Adarsh Ediyottil's user avatar
0 votes
2 answers
912 views

How to filter GraphQL product query for product type?

I have to filter the Magento 2 GraphQL query to filter based on the product type. products( filter: {category_id: {eq: "3"}}, sort: {name: ASC}, pageSize: ...
Deepak Mankotia's user avatar
1 vote
0 answers
137 views

Recently viewed collection is empty magento2

I have created a custom graphQL to get the recently viewed products. I used the following code . <?php class RecentlyViewed implements Magento\Framework\GraphQl\Query\ResolverInterface { protected ...
Manjunath's user avatar
  • 177
0 votes
2 answers
944 views

How to call Graphql API using GET Method in Magento 2?

On official Magento dev docs mentioned that we can use the Graphql API using GET & POST methods. Reference Link : https://devdocs.magento.com/guides/v2.3/graphql/send-request.html?itm_source=...
Jitendra Patel's user avatar
0 votes
0 answers
161 views

Magento2 graphQl special_price filter not working

I am trying to retrieve all products holding a special price value. { products(filter: { special_price: { from: "0.00" ,to:"10.00"} }, sort: { ...
Radhu's user avatar
  • 169
0 votes
1 answer
311 views

Magento 2 create graphql for get homepage content as result

I want to create graphql to get all content in homepage. How to create graphql if anyone has idea please share. Thanks
moni patel's user avatar
2 votes
1 answer
203 views

GraphQl Place Order via Stripe

Using Magento 2.4.3 how can i place order via setPaymentMethodOnCart(input: { cart_id: "FnapbGljNrpKfvYzJ4XxUNxzAchDniY3" payment_method: { code: "...
Muhammad Uzair Aziz's user avatar
0 votes
1 answer
857 views

How to change custom customer attributes with GraphQL mutation?

I followed this answer to create a custom attribute on customer with graphQL. The query works great, but if I try to change the value with a mutation, it just returns null. Can anyone please help me ...
Adam Wright's user avatar
1 vote
1 answer
2k views

Magento 2 graphql get list of available shipping methods

I Could not find if there is or there isn't a query to get list of shippings methods available via graphql. ref: https://devdocs.magento.com/guides/v2.4/graphql/ Is there a query available?
Juliano Vargas's user avatar
2 votes
1 answer
1k views

Using Class or Implemented interface is non API on version '2.4.4'

I have generated Upgrade Compatibility Tool Report and most of the errors are as below. [ERROR] [1328] Line 24: Implemented interface 'Magento\Framework\GraphQl\Query\ResolverInterface' that is non ...
Kaushik Kumar Roy's user avatar
0 votes
1 answer
572 views

How to apply coupon code to cart in graphql?

Now I'm trying to apply a coupon to the cart and I followed this link: applyCouponToCart mutation But we don't get the mask id when customer is logged in, so how to get mask id for logged in customer....
user avatar
0 votes
1 answer
732 views

Display in GraphQL values from multiple products

I am trying to load in graphql product details. I am only managing to get the details of one product $json['Transaction']['OrderItems'][0] but I would like to get the values for all the products which ...
user1619177's user avatar
1 vote
0 answers
429 views

How can I improve response query time on Magento PWA with Magento 2.4.3 backend? low response network speed on production with Magento PWA

i'm currently developing a Magento PWA front with a Magento 2.4.3 store on backend. Thing is, when testing on production, and specially Category pages, sometimes the response time of some queries is ...
grr's user avatar
  • 11
1 vote
1 answer
335 views

Product related widgets in GraphQL

I have a situation. We have built our Magento site as headless (data is provided from GQL). Category pages, PDP, catalog search result pages, etc all are headless except CMS pages because of product-...
Adarsh Khatri's user avatar
0 votes
2 answers
467 views

Magento 2 graphql image upload using file

I want to upload images using graphql using file not base64, can anyone tell me how can I implement this? Thanks in advance!!
Sweety Masmiya's user avatar