Questions tagged [graphql]

Denotes questions about Magento GraphQL.

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

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"){ ...
Devidas's user avatar
  • 3,348
0 votes
0 answers
13 views

Magento 2 Anti-CSRF Tokens/Form-Key For GraphQL

I need to validate a form-key / CSRF Token for a graphql mutation. Is there any way in Magento 2 to validate form-key or CSRF token for graphQl mutation. We know default Magento2 controller already ...
Pritam Biswas's user avatar
1 vote
1 answer
72 views

How to get all the customer email using graphQl in magento2

I need all the customer email using graphQl in magento2. Who ever registered in magento those customers email addresses. I need to get from Api. Please help for this
venkata prasad's user avatar
1 vote
0 answers
112 views

Magento 2 Add Custom attribute value on customer order graphql

I have created two extensions and it's an add fee on Order Total. Now on adding this fee to Get CustomerOrder Graphql so, we override the default Magento Get CustomerOrder Graphql and it's working. ...
Keval Chauhan's user avatar
0 votes
0 answers
44 views

How to add a custom page with a Random product in PWA

Hello everyone, Could you please share with me the code or a comprehensive tutorial on how to add a custom page with random products in a Progressive Web App (PWA) using GraphQL? Thank you.
Ronak Rathod's user avatar
  • 6,309
1 vote
0 answers
58 views

How to add custom block in PDP Page PWA Magento 2

I've recently embarked on the journey of learning about Progressive Web Apps (PWAs) and GraphQL. However, I'm facing challenges in finding beginner-friendly resources, particularly regarding topics ...
Ronak Rathod's user avatar
  • 6,309
2 votes
2 answers
57 views

Accessing Title of downloadable products in magento2 graphql

I am facing issue with accessing the title of downloadable products in magento2 graphql. customerDownloadableProducts { items { date download_url ...
Talha Malik's user avatar
0 votes
2 answers
194 views

display products onclick category url only if attribute value is yes

Onclick Category Link , We have to display all Products ( Only if the Product attribute [ Ready to Ship ] value is "YES". ) We don't want to display Products in that url when the Product ...
Baby in Magento's user avatar
1 vote
1 answer
55 views

Display Text only for selected attribute values

In Headless magento project, there is condition written by previous developers in javascript if there is a value assigned for attribute : is_outlet_available , than some text should display, otherwise ...
Baby in Magento's user avatar
0 votes
0 answers
53 views

Magento2 graphql query to create product?

How to Create Product using graphql is there any mutation for this I couldn't find a single tutorial nor mutation in core module-catalog-graph-ql.
Syed Hassan Zamir's user avatar
2 votes
0 answers
83 views

How to use Magento2 Recaptcha in GraphQl APIs

I want to Use Captcha / Recaptcha in my Graphql APIs I got this link for protected mutations It only shows to insert it in headers but it won't do anything in Graphql apis and for rest apis it gives ...
Syed Hassan Zamir's user avatar
1 vote
1 answer
63 views

How to add Product to Cart with Mutiple custom options using GraphQl?

I have Two custom Options for Downloadable Product here is my query response for getting product { "data": { "products": { "items": [ ...
Syed Hassan Zamir's user avatar
0 votes
1 answer
74 views

How to return all orders using integration token and graphql

Is it possible to return all orders for all customers using an integration setup and graphql? I have found how to return orders for a customer, but in the example it requires generating a customer ...
Steve Driscoll's user avatar
1 vote
1 answer
93 views

How to query products via graphql

I'm querying the graphql endpoint of a magento test installation, and am constructing and sending an oauth 1.0 authorization header via an integration setup. When I query the products via a simple ...
Steve Driscoll's user avatar
0 votes
2 answers
251 views

How to get Custom Selected Options details from Cart in Magento2 GraphQl Query?

I wanted to get product custom selected options values and labels etc with Query how can i get this ? This Query gets all the available options and selections but how can i get the selected { ...
Syed Hassan Zamir's user avatar
0 votes
3 answers
258 views

GraphQL Authorization - How do I know if it is working?

I have a locally-hosted instance of Magento and am testing out the GraphQL capabilities using postman. I understand that I need to pass the access token via the Authorization header as a bearer token. ...
Steve Driscoll's user avatar
0 votes
2 answers
214 views

Extend Magento2 GraphQl Product Query?

I want to add product FAQS along with product query but getting the error when i query product with CustomizableProductInterface "message": "Fragment cannot be spread here as objects of ...
Syed Hassan Zamir's user avatar
0 votes
2 answers
198 views

How we can get extension attribute of product in GraphQL Magento 2

I want Stock_id in graphql. We can get this via REST API but I need this in graphql. Can anyone help me with this? Please refer to the attached link and screenshot here I really appreciate any help ...
Ila Makwana's user avatar
1 vote
0 answers
47 views

Stock status instock and out of stock filter in layered navigation aggregation graphql magento 2.4.6

How to add stock availability in layered navigation graphql { products(filter: {category_id:{eq: "4"}}) { total_count aggregations{ attribute_code } ...
Chippy Ani's user avatar
0 votes
0 answers
31 views

How I can provide arguments towards the existing graphql request?

I made the followig 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
1 answer
56 views

Getting an EAV option's value (eav_attribute_option_value) instead of ID when fetching products using GraphQL

I should preface this by saying I know nothing about Magento 2 development, and barely anything about GraphQL, yet I've been added to this project so I have to learn both of them at the same time. I'...
Alex's user avatar
  • 101
0 votes
1 answer
50 views

get the value from quote_item_option table (info_buyRequest) in GetCartDetails graphql Magento 2

How can we get info_buyrequest value using customer cart graphql magento2? Any suggestions
Ila Makwana's user avatar
0 votes
0 answers
53 views

"Cannot query field \"getProductBySku\" on type \"Query\".",

I am creating my custom query in GraphQl and getting this error i searched alot but couldnot resolve my errors by the solutions given My schema.graphq type Query { getProductBySku(sku: String!): ...
Syed Hassan Zamir's user avatar
1 vote
2 answers
175 views

how to call GraphQl API of Specific Store in Magento 2?

I want to get the data of specific store using API in REST APIs we can do this by giving store code before APIs endpoint but how can we do that in GraphQl APIs In Rest APIs : /rest/StoreCode/V1/...
Syed Hassan Zamir's user avatar
0 votes
0 answers
156 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
158 views

Config element \"FrameworkDataImageContentInterface\" is not declared in GraphQL schema

This is error appeared when calling productDetail GraphQL API. Anyone know how to solve it? Request {"sku":{"eq":"1xxxx-xxx-xxx"}},"configurations":[]},{"...
Eng Chun Khor's user avatar
0 votes
0 answers
108 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
426 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
58 views

Magento 2 - Share session and customer data between subdomain and domain through access Token

I want to use custom magento checkout on a subdomain eg checkout.example.com. I have developed that one and getting customer data by access tokens. I want to share login information through access ...
Vipin 's user avatar
  • 31
1 vote
1 answer
443 views

Magento 2 GraphQL - Customer Token - Error

After enabling any recaptcha storefront, getting error of recaptcha. Error : { "errors": [ { "message": "ReCaptcha validation failed, please try again&...
Vrajesh Patel's user avatar
0 votes
0 answers
239 views

Magento 2 : Graphql setShippingAddressesOnCart default query duplicates the addresses in quote_address table

I'm using Magento version 2.4.5-p1 And I'm trying to setShippingAddressesOnCart using graphql for logged-in customers. This is the default Magento setShippingAddressesOnCart query I'm using but it's ...
Mohit Rane's user avatar
  • 1,945
0 votes
0 answers
83 views

GraphQL placeOrder gives Integrity constraint violation in `quote_shipping_rate`

I am trying to place order with the below mutation, but getting Integrity constraint violation error for address_id in saving quote_shipping_rate. I assume the old shipping rate is not getting ...
Milind Singh's user avatar
  • 1,584
0 votes
0 answers
249 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
84 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
1 vote
1 answer
176 views

How to define array request in GraphQL in magento2

How to define details array in the below request: query{ results( id: "56", details: { name: "yamini", bloodGroup: "AB+" age:25 ...
Yamini Yerusu's user avatar
0 votes
0 answers
122 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
95 views

Connecting graphql api backend link with Next13 self signed certificate

I'm having some issues with connecting our magento backend url with Next js App The api request isn't working correctly and give self signed certificate error My apollo client import { useMemo } from &...
Yousef Yasin's user avatar
0 votes
1 answer
726 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
1 answer
275 views

Magento 2 get categories graphql fails with "There is no attribute class assigned to field categoryList"

Request: query { categories { items { name } } } Error Response: { "errors": [ { "debugMessage": "There is no attribute class assigned to field ...
Milind Singh's user avatar
  • 1,584
0 votes
1 answer
222 views

Magento2: Custom Graphql return "Cannot query field \"testSharingData\" on type \"Query\"

I create custom graphql and have a error,please help me. type Query { testSharingData ( id: Int @doc(description: "The ID of the CMS page.") ): TestSharingData @resolver(...
Allen's user avatar
  • 19
0 votes
1 answer
360 views

Magento 2.4.5 | GraphQL endpoint returns 404 | module-graph-ql packages not installed

I'm facing an issue where my 2.4.5 https://<magentostore>/graphql endpoint is returning a 404. After some research it seems that none of the Magento GraphQl packages are installed by composer. ...
Leander Matse'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
0 votes
0 answers
80 views

How can I add a custom filter in products query filter input with custom code for the apply in magento 2

Hello every one I develop a headless magento website and I want to ask if there is a way to add a custom filter method to add on the Product filter input in graphql. For example I want the filter to ...
Elefterios Charissopoulos's user avatar
0 votes
1 answer
386 views

how do I create a custom GraphQL query that fetches a list of products in Magento 2.4.1

In my schema.graphqls file I've created this Query type Query { getLinkedProductsByGroups(groups: [String]): [LinkedProductsByGroup] @resolver(class: "Vendor\\ProductDisplay\\Model\\Resolver\\...
gabtzi's user avatar
  • 656
0 votes
0 answers
197 views

Magento 2: How to add filter in custom graphql?

I have created a module with graphql schema where I will get the custom collection. Now I need to add a filter based on a few fields so I referred to this blog but I need to use 2 fields in the filter ...
MagentoDev's user avatar
0 votes
0 answers
46 views

placeOrder Mutation does not return order number

So I am using the magento graphql api to go through the cart workflow. I am using the braintree payment method. Everything goes smoothly until I use the placeOrder mutation. It returns the error ...
Antonio Bennett's user avatar
0 votes
0 answers
63 views

How to add new custom fields to existing createCustomerAddress graphql mutation

mutation { createCustomerAddress(input: { region: { region: "Arizona" region_code: "AZ" } country_code: US Custom_field1: Custom_field2 }
K-N's user avatar
  • 45
0 votes
1 answer
66 views

CreateCustomer mutation with customer group magento2

I am looking for a solution how we can create customer with customer group Id, In magento frontend we have the customer group drop down. I am using the createCustomer mutation. mutation { ...
Manjunath's user avatar
  • 177
0 votes
1 answer
451 views

How to know that I'm using GraphQL cache properly?

I just applied the GraphQL cache in my PWA Studio custom queries. I'm not sure if the cache is working, should the x-cache-hits be enough to validate? How does it work behind the scenes?
Rafael Corrêa Gomes's user avatar
1 vote
1 answer
867 views

How to cache GraphQL requests?

My Magento 2.4 isn't caching requests I use many times, like storeConfig via PWA Studio. My request header: x-cache-hits: 0 How could I cache this kind of request to optimize the speed of my page ...
Rafael Corrêa Gomes's user avatar

1
2 3 4 5