Questions tagged [graphql]

Denotes questions about Magento GraphQL.

Filter by
Sorted by
Tagged with
0
votes
1answer
35 views

GraphQL Error in Magento 2.4.1: Cannot query field “uid” on type “ConfigurableProductOptionsValues”

I'm having trouble getting the uid for my Configurable product options via GraphQL. Testing with this simplified query: { products(filter: { url_key: { eq: "test-product" } }) { ...
0
votes
0answers
19 views

Magento 2: How can i get the aggregation for a variant in graphql

Current Situation Often in a shop you need to show the available sizes to your clients. However this value is in many cases associated to a simple-product, which is linked to a configurable product. ...
0
votes
0answers
8 views

Error to create customer by graphql mutation

I used graphql to create customer as following: mutation { createCustomer( input: { firstname: "Bob" lastname: "Loblaw" email: "bobloblaw@example.com&...
0
votes
1answer
13 views

How do I capture GraphQL POST data?

I'm trying to debug an issue with a custom GraphQL module. I want to log the POST data that's being sent to it. I know it is being sent, because the response works OK for the most part. There's just a ...
0
votes
0answers
23 views

Observer & plugin not working in magento 2

I am trying to add log on customer login from a vue magento frontend it calls "api/signIn" with Post method, I am not sure when i put a log in controller file or in any model file in ...
1
vote
1answer
53 views

How to include “out of stock” products in GraphQL results

I tried to query products in Magento 2 GraphQL using the bellow query, but the results only shows "IN_STOCK" products: { products( filter: { sku: { in: [ ...
0
votes
0answers
10 views

how to add product sort by newest filter option using pwa theme and graphql magento 2.3.5

im using scandiweb theme based on react.js ,grphqls and magento version magento2.3.5, i want to add a sort by newest option on category pages. like price and product name already available. i have ...
1
vote
1answer
30 views

How to get customer id using graphQl?

I am getting below data on customer data GraphQL query const query = () => ({ query: { customer { customer_id firstname lastname suffix email ...
0
votes
0answers
14 views

Can you apply filters to variants in products query?

I'm using graphql to load Magento products. The problem is that when I filter the products, filters are not applied to product variants. Is it possible to apply GraphQl filters to variants as well?
0
votes
0answers
14 views

Graph-ql Magento 2.3

We have installed Improved sorting Module from Amasty. Under configuration we get these error messages: Enable improved-sorting-graphql module to activate GraphQl and Sorting. Please, run the ...
0
votes
1answer
111 views

How to cache graphQL post query using varnish in magento 2

In our project we are using graphql. All the query and the mutation are post request. I have configured the varnish with magento. But it seems that post request will be bypassed. Since all my query is ...
3
votes
1answer
33 views

Unkown directive in JS GraphQL

I'm experiencing the following issue in the graphql schema declaration in Magento2. I use PhpStorm for development and, after installing the plugin JS GraphQL, it keeps prompting me errors on common ...
0
votes
0answers
21 views

Extend addProductstoCart mutation in Magento 2.4

I want to extend the addProductsToCart mutation because I need to pass some product attributes and get the into cart using $_item->getProduct()->getData('attribute_name'); In my custom module, I ...
2
votes
0answers
19 views

Magento 2 - Show product data in front end using graphQL

I need to show Product Data (Name SKU)in front end using graphQL is this possible to show Product Data custom page in Magento 2 ?
2
votes
1answer
45 views

Is there any documentation tool available for GraphQl?

I need to document both Magento2 in-built and custom GraphQl endpoints. (Just like we use swagger to document APIs). So far I tried the below tools. But both seem to be covering a limited number of ...
0
votes
1answer
10 views

Get Products Belong to custom attribute id

I have added mageplaza brands to my magento project and I can get the list of brands that I have with following graphql query getMpBrands { mpbrand(filter: {}, storeId: 1, currentPage: 1, pageSize: ...
0
votes
0answers
15 views

Magento 2 PWA not updating data realtime

In my magento 2 backend I have created a graphql and a resolver to add my products to compare list from front end schema.graphql type Mutation { addProductToCompareList(productId:String!): ...
0
votes
2answers
38 views

Graphql returns empty array

I'm using graphql to get data to my PWA frontend project.Following is my schema.graphqls type Query { comparelist: [ComparelistOutput] @resolver(class: "NeoSolax\\CompareList\\Model\\...
0
votes
0answers
11 views

GraphQl does not return CMS page having CMS block

I have created CMS Page which have custom CMS block. {{block class="Magento\Framework\View\Element\Template" template="Vendor_Test::cms/vendortest.phtml"}} This CMS Page gets ...
1
vote
1answer
36 views

Magento 2 custom module graphql error

I have a custom module with schema.graphqls module.xml <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation=&...
1
vote
2answers
33 views

Retrieve product url with category in the graphQL

I've enabled at backoffice the usage of the category inside the product url by setting this option: When I access the magento frontend, I can now access the product with the url <category>/<...
0
votes
0answers
8 views

Magento 2.4.0 Send blank value of customer email ID. If email ID belongs to a specific domain

There are multiple APIs which will be sending customer email IDs. If I want to add some logic while sending a unique domain email ID in response. I would need to override multiple files and make the ...
0
votes
0answers
54 views

Magento 2 - How to get new and best sellers products data using product graphql?

I want new products and bestsellers product data in product graphql. and also product review and rating. Does anyone have an idea?
0
votes
2answers
64 views

In Magento2 graphql i want to add a field to the root query of the Magento GraphQL API called `isLoggedIn`. This should return `Boolean`

In Magento2 graphql i want to add a field to the root query of the Magento GraphQL API called isLoggedIn. This should return Boolean whether the customer is logged in or not.
0
votes
0answers
18 views

in Magento2 graphql, i want you to override the `label` field on `CartTaxItem` in the API to return the configured title of the tax rate

in Magento2 graphql, i want you to override the label field on CartTaxItem in the API to return the configured title of the tax rate instead of the tax identifier.
0
votes
0answers
25 views

Magento 2 graphql integration with Amazon Pay

I am trying to implement payment for Amazon Pay in Magento 2.4 using graphql. Magento documentation provides steps for Pay Pal (e.g. PayPal Express Checkout: https://devdocs.magento.com/guides/v2.4/...
2
votes
0answers
38 views

Magento2 Add to compare Api using graphql?

Magento2 - PWA. I am developing PWA in Magento2. In products I am not able to see Add to compare link. How can I create add to compare Graphql API & use it in PWA?
0
votes
0answers
27 views

How to get Magento 2 Customizable Options with GraphQL

How to get Magento 2 Customizable Options with REST API - similar to this, but how to get same result with GraphQL in Magento 2? This Magento 2 documentation doesn't tell anything about getting ...
0
votes
0answers
20 views

how to magento2 forgot password api in graphql?

<?php require_once('baseurl.php'); error_reporting(E_ALL ^ E_NOTICE); $userData = array("username" => "", "password" => ""); $ch = curl_init($baseUrl ...
0
votes
0answers
29 views

Get Attribute Customer in Magento2 with GraphQL

I created new attributes for customer but I want to insert them into a structure in graphql. Where there is an array called Garage with the new attributes. It is already being displayed normally in ...
0
votes
1answer
196 views

Using GraphQL query and filtering products by category_id, I get empty items array

I try to make a simple request using graphql and to get a response from my magento. I have a parent category named Products(id:"3"). In this one, there are 3 subcategories A(id:"5")...
1
vote
0answers
25 views

How to add custom attribtue in the ProductInterface of GraphQL response?

I have lots of custom attributes created for product and i want to include those in the ProductInterface response when called through GraphQl, is there any way for me to add those ? or do i need to ...
0
votes
1answer
19 views

Magento2 update email address vis rest API

Magento2 update Email Address using Rest API. How can I update email address of login customer via Rest API or Graphl
0
votes
1answer
195 views

How to add swatch data in Layered navigation aggregations in graphql?

How to add swatch data in Layered navigation aggregations in Graphql? Magento provides swatch data to filters [LayerFilter] but this is DEPRECATED so we use aggregations for the filter. Below query is ...
0
votes
1answer
61 views

Why I am getting GraphQL error: The billing address must contain either “customer_address_id” or “address”?

I am using magento graphQL api to build mobile app of magento site. In checkout process we have to set billing address. So I used one of mutation setBillingAddressOnCart to set billing address on ...
0
votes
0answers
37 views

Configurable product details + API (REST or GRAPHQL) + magento 2

How to change attribute selection wise product information like price and image for configurable product and combination attribute also using API. Get configurable product details using below API { ...
1
vote
1answer
37 views

why region_code not storing properly in magento 2.3.5?

I am using Magento GraphQL api in my project. To create a customer address I used createCustomerAddress mutation(createCustomerAddress). Below is the mutation that I have called to create the customer ...
0
votes
0answers
17 views

How to get customizable option values for not visible item configurable product in magento 2

via graphqlAPI i set Customizable options for Child product (Configurable items) - not visible item when i add configurable product to cart with customizable options - it's working but while ...
1
vote
0answers
17 views

Magento Checkout API Payment Methods

A lot of tutorials online show us what the flow is when ordering through the Magento2 Api. Unfortunately, alot of these tutorials only display "Cash on delivery". Magento DevDoc: https://...
0
votes
1answer
98 views

magento 2.3 is that posible to upload file in graphql mutation

i wondering is there any way to upload file in magento 2.3.5 via graphql mutation is there way suggest the way ? For REST API how we can upload file in magento 2.3?
0
votes
0answers
11 views

Render Graphql json array in pwa

I have a graphql query as follow: { customerPlacedOrder(customer_id: 1) { allOrderRecords { increment_id customer_name grand_total created_at shipping_method } ...
0
votes
1answer
68 views

Using curl with graphql issue

I made the schema.grapqhs with this content: type Query { quoteData ( id: Int @doc(description: "Id of the Quote Data") ): QuoteData @resolver(class: "Vendor\\Module\\...
0
votes
1answer
40 views

Magento 2 graphql send createEmptyCart and addSimpleProductsToCart in same request

Can I create a cart and add the products to cart in same request? Maybe using something like variables to pass by the cartId.
0
votes
1answer
86 views

Magento ver. 2.3.5-p1 Setup PWA store step by step Guide or documentation

I am new to PWA Studio. Can anyone guide or suggest any website or blog tutorial for step by step installation of PWA storefront? Does Magento PWA require to lean React and GraphQL? Which one is ...
0
votes
0answers
14 views

How we secure Magento GraphQL. Its working without Authorisation Token

How I can secure our Magento End Point Url. I'm able to create new category and customer without passing the authorisation token. Can we secure all GrphQl APIs?
1
vote
0answers
128 views

No product data returned for GraphQL query if stock not assigned

I have a Magento 2.3.5 site with multiple websites and multiple stock sources. Let's say I want to look up "mysku" in the UK store (store code: uk), which belongs to the UK website. Let's ...
1
vote
2answers
384 views

PWA Studio with custom extensions

First of all, sorry if the answer is obvious. I read the Devdocs, PWA-Studio Docs and some Tutorials, but somehow couldn't wrap my head around this. Does using a PWA with Magento2, for example Magento'...
1
vote
0answers
245 views

Magento 2 GrahQL Product Sorting does not work for the product query with category Filter

I have this graphQL query { products(filter: {category_id:{eq: "5"}, price: {from: "0", to: "999999"}}, pageSize: 10, currentPage: 1 sort: {position: DESC}) { ...
0
votes
1answer
35 views

Add product in cart according website by GraphQl

How can we add products in the cart according to the website? I have multiple websites in a single Magento installation. When I am adding a product by GraphQl then it's adding the product on the base ...
0
votes
1answer
110 views

How to send data to Third party graphql endpoint in magento2

I need to send some order information to monday.com using graphql when order place I want to pass the data to monday.com graphql API how can i send API request using graphql to monday.com UPDATE ...