People who code: we want your input. Take the Survey

Questions tagged [graphql]

Denotes questions about Magento GraphQL.

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

graphql product query huge perfomance hit when filtering with multiple attributes

I have used the below GRAPHQL query to get the product list. { products(filter: {category_id: {eq: "77"},color:{in:["5437","5438","5449"]}, price:{from:"...
0
votes
0answers
20 views

Should the createPaypalExpressToken mutation redirect to the frontend store?

I'm trying to integrate Paypal Express with PWA. Using Magento's documentation, and more specifically, the createPaypalExpressToken mutation which begins the authorization process, I'm having trouble ...
0
votes
0answers
31 views

Customizable options for Virtual Products

I am trying to access the customizable options of a virtual product whose visibility is set to 'Not Visible Individually' through the GQL query, { products(filter: { sku: { eq: "sample_sku"...
0
votes
0answers
16 views

Warning: Illegal offset type in vendor/magento/module-payment/Model/Info.php

I am trying to save Magento order after successful payment status. But I am getting this issue. We are using headless technology with Magento and Laravel. This is Resolver - public function resolve(...
2
votes
1answer
45 views

Magento 2 Custom template content will not shown in graphql response of CMS page

I have a CMS page in which I want to show the date e.i Current date OR Date after 5 days etc. So for that I have created a template file and call inside the CMS page. It will show content in Front but ...
0
votes
0answers
30 views

How does Magento 2's GraphQL implementation parse Schema Directives?

So in my company we're stuck with Magento 1 (and will be for at least a few more years) and we're using its SOAP API for our internal systems, but we're facing the issue of slowness and duplicate ...
0
votes
0answers
20 views

How i can use Magento\CatalogGraphQl\Model\Resolver\Product\Price\ProviderPool this class in custom module magento 2.4 graphql

We have \Magento\CatalogGraphQl\Model\Resolver\Product\PriceRangeResolver here PriceProviderPool (Magento\CatalogGraphQl\Model\Resolver\Product\Price\ProviderPool) i have used in my custom module ...
0
votes
1answer
33 views

magento event not fireing with graphql

i create a custom module in Magento 2.4 . I create an observer on the event "customer_register_success" . when i use graphql(i use pwa in frontend) the event is not firing but it work ...
0
votes
0answers
60 views

Magento2 Graphql get select attribute options label instead of option id

I am using v2.4 in which in the products query I am getting the Optionid of select attribute instead of attribute option label. Like if i try to get color(select type) then I get value of red instead ...
0
votes
0answers
96 views

How to call static block into graphql query in alpine js framework

enter code <div class="bg-container border-t border-b border-container"> <div class="container px-5 py-6 mx-auto flex items-center sm:flex-row flex-col" x-data=...
0
votes
0answers
24 views

Magento 2 extend graphql not working

What i tried in custom module schema.graphql input PageData { location: String @doc(description: "The location from where the login performed") login_type: String @doc(...
0
votes
1answer
31 views

Magento 2 : Extend graphql schema

i have override "revokeCustomerToken" mutation & tried to add input "page data" to it, but it seems "revokeCustomerToken" does not support input attributes https://...
0
votes
2answers
87 views

magento2 how to implement graphql with alpine.js get cms static block data

I have create a static block in magento2 admin panel. I like use graphql with alpine.js to get data of the static block.
0
votes
1answer
29 views

Magento 2 : Extend GrapghQL schema

I have tried to extend the schema mutation by adding schema.graphql in my module & type Mutation { revokeCustomerToken(pagedata: PageData): RevokeCustomerTokenOutput @resolver(class: "\\...
0
votes
1answer
33 views

Magento 2 : GraphQl error

The current customer isn't authorized error appears Appears on executing mutation in chrome graphQl tool https://chrome.google.com/webstore/detail/graphql-playground-for-ch/...
0
votes
1answer
89 views

Magento 2.4.2 GraphQL not get uid from customerCart and cart query

I installed Magento 2.4.2 According to Magento GraphQL DevDocs updateCartItems mutation cart_item_id is Deprecated. Use cart_item_uid instead. The unique ID assigned when a customer places an item in ...
0
votes
1answer
148 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
122 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
14 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
19 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
30 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
137 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
18 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
77 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 ...
1
vote
0answers
16 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
38 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
384 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 ...
4
votes
1answer
68 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 ...
1
vote
0answers
36 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
69 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
11 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
26 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
270 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
25 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
113 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
97 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
77 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
127 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.
1
vote
0answers
53 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
57 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
55 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
29 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
74 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
377 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
35 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
26 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
300 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 ...