Skip to main content

Questions tagged [magento-graphql]

The tag has no usage guidance.

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

How to add additional fields in newsletter subscription mutations in Magento2

How to add additional fields in newsletter mutation? mutation { subscribeEmailToNewsletter( email: "[email protected]" ) { status } } I want to add firstname & lastname in ...
Jaisa's user avatar
  • 2,626
0 votes
0 answers
7 views

Magento 2 : How to add additional fields to newsletter via graphQL

I have added new fields firstname and lastname in newsletter subscription by following this https://www.thecoachsmb.com/magento-2-how-to-add-additional-fields-to-newsletter/ Now I need to add these ...
Jayashree N's user avatar
0 votes
0 answers
14 views

Visibility settings not working properly for a product in magento 2 via graphQL

The product (SKU-K1234) setting for Visibility is Catalog, but the product still visbile while searching product via graphQL For example If i use a query to search a same product like below, it works ...
Jayashree N's user avatar
0 votes
2 answers
24 views

Graphql return null values

Schema.graphqls type Query { getGoogleMedia: [GoogleMedia] @resolver(class: "Test\\LocationData\\Model\\Resolver\\GoogleMediaResolver") } type GoogleMedia { image_view_all_link: ...
NotEqual's user avatar
0 votes
0 answers
14 views

(Magento 2.4) Add custom filtering to product attribute in graphql

I'd like to add a filter in the graphQl product query like this products( pageSize: 5 currentPage: 1 filter: { status: { eq: "1" } ...
Erasmo's user avatar
  • 1
0 votes
0 answers
46 views

graphql api for guest to create account on checkout success page graphql

I am using the default api to create customer for a guest user to create account mutation { createCustomer( input: { firstname: "Bob" lastname: "Loblaw" email: "bobloblaw@...
Somnath Tiwari's user avatar
0 votes
1 answer
31 views

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 ...
Erik Kis's user avatar
0 votes
0 answers
67 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
50 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
98 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
29 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
268 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
89 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
211 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
121 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
712 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
  • 192
0 votes
0 answers
230 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
162 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
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
964 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
1 vote
1 answer
458 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
1k 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
190 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
1k 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
192 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
  • 179
0 votes
1 answer
346 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
262 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
970 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
663 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
789 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
489 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
388 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
533 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