Questions tagged [graphql]

Denotes questions about Magento GraphQL.

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

Magento graphQL Extending ProductInterface error : Expected a value of type \"Int\" but received

I have created a custom module that will override the ProductInterface class in graphQl as you can se i have mentioned the image_banner as string and i checked the banner.php its also returing string ...
0
votes
1answer
14 views

CORS issue fails the communicatin within Magento 2 (Graphql) instance and React app: Response to preflight request doesn't pass access control check:

Getting following error trying to fetch data from react app. Magento 2.4.2 Reac JS v17 Apollo/Client 3 import { ApolloClient, InMemoryCache } from "@apollo/client"; export const client ...
0
votes
2answers
29 views

around plugin error | too few to function ::resolve()

This function runs around the resolve function for coupon api on Graphql, once the core function throws exception this function will catch and update the error message. core file [module-quote-graph-...
0
votes
0answers
21 views

Magento2 using graphql filter products that have special price in it

Magento2 How to filter products that have special price using GraphQL? I want to get the collection of products in Response of product query in GraphQL that have special price. How can I achieve this?
0
votes
3answers
44 views

Magento 2 : Image upload using Graphql mutation

I want to upload images using graphql, can anyone tell me how can I implement this? Let me know if anyone has any idea.
0
votes
1answer
34 views

Magento 2: Graphql how to pass productids as parameter (array) in query

I'm trying to pass productids in the query but I'm not sure how to define it and also need to loop through it, I'm using for each it's showing SyntaxError. I have tried using the productids as ["...
0
votes
1answer
29 views

Magento 2 How to extend/customise existing graphql query

How to create extend/customise existing graphql query in custom module in magento 2. THANKS.
0
votes
1answer
30 views

Magento 2 How to create graphql mutation

How to create custom graphql mutation in custom module in magento 2. And how to save custom form data in custom table using mutation. THANKS.
0
votes
2answers
39 views

Magento 2 How to create graphql query

How to create custom graphql query in custom module in magento 2. THANKS.
0
votes
1answer
31 views

Magento2 Not able to update Address via GraphQl

I have try to update the address via GraphQl but somehow not working Please guide me how can I solve this error
0
votes
1answer
22 views

B2B graphql - company query displays null for company user id

I am working on Graphql API (Magento - 2.4/ enterprise edition) for B2B, the default company query which lists the company users does not give the id since it is deprecated. But I want to update a ...
1
vote
1answer
83 views

Magento 2: Graphql Custom collection data returns null

I'm creating Graphql for my custom module, but after setting an endpoint and writing a query for it, does not return any data. Below are the files I have created for Graphql, MyVendor/RMAModule/etc/...
0
votes
0answers
43 views

Magento 2 GraphQL How to update custom row

Using Magento 2.4.3 Graphql Able to get, insert and delete a row from the custom table but unable to update(edit) custom row... custom endpoints - mutation { updateCustomMedia(id:7, input: { ...
0
votes
1answer
87 views

Magento 2.4.3: graphQL ResolveURL response error "Internal server error"

I am working on Magento 2.4.3 setup graphQL with Ubuntu 20.04.3 LTS machine. I setup a pwa-studio with venia-concept theme on the same machine and connected it with the Magento setup. All is running ...
0
votes
1answer
16 views

call more than one graphql query in one schema.graphqls file

type Query { productReview: ProductReviewRatingsMetadata! @doc(description: "Retrieves metadata required by clients to render the Reviews section.") @resolver(class: "E50\\Graphql\\...
0
votes
0answers
8 views

PWA Studio Graph QL: what is the function of @connection for Mutation queries?

In peregrine/lib/talons/CheckoutPage/PaymentInformation/creditCard.gql.js we see this code: export const SET_CC_DETAILS_ON_CART = gql` mutation setSelectedPaymentMethod( $cartId: String! ...
0
votes
1answer
22 views

Magento 2 graphQL Get Select attribute option labels in Products Query

I want to get the attribute label value along with the id in the Products graphQL query. like color { id: 12, label: black }, size{ id: 15, label: xl } Currently, it returns the id only. How can I ...
0
votes
0answers
16 views

Display same orders in orders history when you change the language

Good morning people, I am using the Venia concept and I found a problem, if you go to the order history with the default language that is English, Its gonna show you some orders. If you change ...
0
votes
0answers
14 views

AddProductsToCart Mutation Custom Option Upload File Magento 2.4

I am struggling to understand the correct way to get a custom option that is an uploaded file to attach correctly when adding a product to cart via graphql. I have tried using entered_options: [ {uid: ...
0
votes
1answer
95 views

How to override Magento 2 graphql resolver with custom plugin

Im trying to override the resolver by using a plugin in Magento 2 to change text. vendor/magento/module-quote/Model/CouponManagement.php - I need to change this class ApplyCouponToCart implements ...
0
votes
0answers
23 views

How can I use Magento2 GraphQL in pure JavaScript?

I see that Magento GraphQL was used to build Progressive Web App. Can I use GraphQL for my simple web application? For example, I need to get all items of the user wishlist on the user dashboard page. ...
0
votes
1answer
167 views

Magento 2 Graphql Exception handling

I would like to customise the error messages displayed in my GraphQL queries for a coupon code in m2. You should implement the \GraphQL\Error\ClientAware interface to handle errors in your module ...
0
votes
0answers
23 views

Magento 2 : GraphQL Exception in Plugin

I'm trying to achieve a specific feature when customer can't add some combination of products in the cart (the last one have to be refused). For example, product A, B and C can't be on the same cart, ...
0
votes
0answers
20 views

Magento 2 GraphQL on family tree

I have a tree that includes the following information: tree { id: Int parent: tree children: [tree] } How to write graphQL module that can handle the following query: { tree ( id: 4 ) { ...
0
votes
0answers
23 views

Magento 2.3.5: Setup venia-concept using PWA Studio on localhost machine

For setting up venia-concept theme using PWA , gone through below steps: STEP 1: Installed magento 2.3.5 on /var/www/html/m235/ STEP 2: Cloned PWA studio git clone https://github.com/magento-research/...
0
votes
0answers
39 views

Payment method not showing

I have integrated "klarna payments" in magento 2.4.3 EE When i use graphQL mutation on cart id, i can see klarna payment method in available_payment_methods but when i call the endpoint for ...
0
votes
0answers
17 views

How to change the filters position from Venia Storefront like the filters from the Magento front view?

Good afternoon everybody, I am kind of a rookie using magento and I need help with this: This are the filters from Magento front View, this filters can change position changing the position attribute ...
0
votes
0answers
12 views

Magento Graph QL : Unable to Apply Coupon as its marked as applied even before placing an order

We have as site where admin is running on Magento while frontend is running on PWA which uses graphql mutations.I am facing the below problem. Please find the below steps I have a Welcome coupon ...
0
votes
0answers
207 views

Magento 2 graphql issue: Module not found: Can't resolve '@apollo/client ' in 'Dir\src\Components'

Hi all trying to learn magento graphql with react but am getting this error below is my code:- import React, {useEffect} from 'react'; import useQuery, { gql } from "@apollo/client "; ...
0
votes
1answer
44 views

How to add Customer Authentication in Custom GraphQl API. Magento 2

I've created a custom GraphQl API app\code\Vendor\Extension\etc\schema.graphqls #Custom Module type Query { CustomGraphql ( username: String @doc(description: "Email Address/Mobile ...
0
votes
0answers
80 views

Special price discount not working for bundle product options price in magento 2 graphql products query

We have a bundle product with base price 17.5 and there is one pack and within that there are 2 options each one have 13 and 4.5 price respectively. I have added a special discount of 40% as special ...
0
votes
0answers
16 views

All Possible Combinations of a Bundled Product

I have a bundled product with 3 different options: Device Accessory Free Device Each of the options include multiple products. I would like to get the SKUs of all the possible combinations. For ...
0
votes
0answers
76 views

Search layered navigation showing all filters instead of the ones with products

I am creating a custom API endpoint for returning the filters for a particular search term. I tried following the "Magento GraphQL's approach" and used \Magento\CatalogGraphQl\Model\...
0
votes
0answers
13 views

Can we get Country using JQuery or Javascript in magento 2.4.2

How to get the Magento country and its state using Jquery or JavaScript in the Magento 2.4.2
0
votes
2answers
54 views

Getting Incorrect Image URL in Custom GraphQL Query

in my Custom Graphql Query, I am trying to get product image Url using Magento\Catalog\Helper\Image in this way $this->imageHelper->init($product, 'product_thumbnail_image')->getUrl(); I am ...
0
votes
0answers
19 views

Magento 2 Customer API Token refresh

I am developing an APP based on magento 2 ecommerce. As any APP, the user should never logged out. I can get with magento 2 a token for any customer by that token have an expery time. I know that I ...
0
votes
0answers
15 views

How to add the customised product image and URL to cart using GraphQL?

Magento Lovers, I'm working with bundle product and the product is having different options as simple products. The requirement which I'm having is that when we customise the product and add it to the ...
0
votes
0answers
33 views

Getting group product when i try filter product by url_key

I have a Simple product And a group product with that simple product Now, when I do next query { products(filter: { url_key: { eq: "test-product-1" } }) { items { name ...
0
votes
0answers
88 views

GraphQl error message

I'm working with GraphQl in version 2.3.6 and I found it. I have resolver A call to function B of class B. In this function B i have throw a exception. In resolver A I catched this exception and use ...
2
votes
1answer
138 views

How to enable GraphQL schema intelligence?

Magento has numerous schema. graphics files spread across its modules. It also has custom directives such as @docand@resolver`. When I'm using PhpStorm with the JS GraphQL plugin, what is the best way ...
1
vote
1answer
251 views

Magento 2 : URGENT - Getting same product in resolver

I am using graphql mutation mutation { addProductsToCart( cartId: "KlV2AfyAkbn19yuXE8EaBmabYqh4DMiX" cartItems: [{ quantity: 1, sku: "S359120" }] ) { cart { ...
0
votes
0answers
41 views

OR condition in magento2 graphql

According to magento docs for the latest release 2.4, it is not possible to perform an OR condition with graphql. https://devdocs.magento.com/guides/v2.4/graphql/queries/products.html The or ...
0
votes
0answers
124 views

Magento 2 add request header to Graphql programmatically

I'm trying to run this Graphql url https://****.***.com/in/graphql by Postman I saw in Magento document that the URL above can contain Store header https://devdocs.magento.com/guides/v2.4/graphql/send-...
0
votes
1answer
25 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
35 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
41 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"...
3
votes
1answer
181 views

Is PWA Studio ready for production use?

Going throught the demo store https://venia.magento.com/ and installing the headless version with our production instance it seems a lot of basic features are still msissing with PWA Studio provided ...
0
votes
0answers
37 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
146 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
44 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 ...