Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [graphql]

Denotes questions about Magento GraphQL.

Filter by
Sorted by
Tagged with
1 vote
1 answer
45 views

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-...
NotEqual's user avatar
0 votes
1 answer
29 views

Product is visible when the visibility is set as 'catalog' while quering via graphQL in magento 2

For example, a product visibility has been saved as only "catalog", but the product still visibile while searching a product at frontend. (I have checked by searching the product with ...
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
2 answers
40 views

Magento 2 : GraphQL - Generate Customer Token not working

I'm performing the below CURL request in Postman, but it's not working. curl --location 'http://gravity.freestylelibre.devops:81/graphql' \ --header 'Authorization: Bearer ...
user115941's user avatar
1 vote
0 answers
55 views

Display SKU and Categories in live search popover

I have installed Adobe live search and it works fine. But i want to do some customization on the search popup. By default it gives the product image, Name and price only. I want to display the product ...
Sunny Rahevar's user avatar
0 votes
0 answers
18 views

Magento 2 : categoryList Graphql request returns only 2 children_conut of children category

Magento version 2.4.5, venia sample data ( might be any sample data, or just create caregories manually ) Graphql Request: { categoryList { uid name children { uid ...
Erik Kis'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
91 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,368
0 votes
0 answers
48 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
167 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
187 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
46 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,342
1 vote
0 answers
85 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,342
2 votes
2 answers
81 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
202 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
59 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
100 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
131 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
119 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
103 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
317 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
505 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
709 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
535 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
385 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
61 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
34 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
180 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
82 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
140 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
448 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
212 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
184 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
124 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
719 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
68 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
690 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
1 vote
1 answer
221 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
163 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
1 answer
973 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
442 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,594
0 votes
1 answer
299 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
532 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
1 answer
518 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
  • 666
0 votes
1 answer
86 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
698 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
1k 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
0 votes
1 answer
440 views

createCustomer mutation with custom attribute in magento2

I Have created a module to add custom attribute to createCustomer mutation. Vendor/Module/etc/extension_attributes.xml <?xml version="1.0" ?> <config xmlns:xsi="http://www.w3....
Manjunath's user avatar
  • 177
0 votes
1 answer
1k views

How to retrieve characteristics attributes of a product in Magento 2 GraphQL API based on their attribute set?

In Magento 2, each product can be assigned with an attribute set, which varies based on the product category. My attribute set contains specific characteristics such as color and manufacturer, which I ...
Martin Velkov's user avatar
1 vote
1 answer
464 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

1
2 3 4 5