Questions tagged [graphql]

Denotes questions about Magento GraphQL.

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

How to Get all Order using GraphQL in Magento 2?

I want to get all Pending order Status Orders using GraphQL, Anyone can share a complete example or module. How to I'll do that ? I have create Custom module Admin Grid, Now i want to display Only ...
user avatar
0 votes
0 answers
20 views

How to install PWA in Magento 2.4.4 in windows

I need to download and install PWA(Progressive Web Apps) in Magento 2.4.4. so can anyone have an idea about it,then please share with me. Thanks, Deep Shah.
user avatar
  • 498
1 vote
1 answer
23 views

Magento 2 : How to correctly return 401 unauthroized in graphql request

Existing Magento GraphQLExceptions return 200-th http code. What would be a correct way to throw 401 for example? Or at least show custom status code in response.
user avatar
1 vote
1 answer
46 views

Return custom db fields via graphql resolvers

I've added custom fields to sales_order Now I want to return them in customerOrders GraphQL query as a value from database. How can I do it without fetching the order from database again in Resolver ...
user avatar
1 vote
1 answer
44 views

Magento 2 GraphQL add product with additional option to cart

i want to add product to cart with additional option using GraphQL, i am using below mutation to add product to cart mutation { addSimpleProductsToCart( input: { cart_id: "{{cart_id}}&...
user avatar
  • 2,513
0 votes
0 answers
5 views

Catalog->Product(Admin grid error)--Something went wrong with processing the default view and we have restored the filter to its original state

I'm using magento 2.4.4 added the products programatically using magento graphql.Facing this issue when i open Catalog->products.
user avatar
0 votes
1 answer
15 views

How to get the name of the respective mutation or query which calls the resolver

I have two mutation which maps to same resolver class. I need to differentiate between both mutations. So in-order to do that, I am looking for a functionality to fetch the name of the mutation or ...
user avatar
  • 15
1 vote
0 answers
28 views

Magento 2 graphql integration with Hosted(Redirect) Payment method

i want to create graphql api for custom Hosted(Redirect) payment method. can anyone elaborate step how can i create that for payment method?
user avatar
  • 2,513
1 vote
0 answers
49 views

GraphQL Magento 2.4.4 How to add "Additional Options" add to cart

We need to add additional data in cart items like code, label, value, etc. from graphql add to cart. We have reviewed the Magento docs block "CustomizableFieldOption" but not work with my ...
user avatar
4 votes
0 answers
78 views

How to add "Additional Options" to product while add to cart using GraphQL

I am using magento's default add to cart graphql to add product in cart. mutation { addSimpleProductsToCart(input: {cart_id: "aIvRj9FfJvQr3qcAECmFfZlVbxcwQ1G6", cart_items: ...
user avatar
0 votes
0 answers
14 views

State Field in Arabic value PWA

I am using M2.4.3 with PWA venia and we have multistore (2 stores of English And Arabic) I have added the states fields values by using Data patch and it is working with the English store now I need ...
user avatar
0 votes
0 answers
38 views

Magento 2 graphql authentication

I have created a custom graphql APIs , I want to restrict these APIS for unwanted use , How can I restrict access to API'S Any help is appreciated Thank you.
user avatar
0 votes
0 answers
28 views

Missing field 'uid' while computing key fields when used react mutation graphq

Help me! Not add product with mitation, always show this error. thank you
user avatar
2 votes
2 answers
178 views

Magento 2 : What is typeResolver in GraphQL?

I am working on a custom module in which I've implemented graphql. One of the key in response contains different fields. For example, in the below json response the dynamic_fields content will depend ...
user avatar
0 votes
0 answers
21 views

Share wishlist using Graphql mutation

I need to share wishlist using Graphql in Magento2.4. Anyone could assist me in this?
user avatar
0 votes
0 answers
25 views

New order first in customer dashboard Graphql magento2

In my Magento2.4.2, customer dashboard I need to display new orders first under order history and recent orders using graphql customer query. Below is the query I used to fetch all order data of the ...
user avatar
0 votes
0 answers
35 views

Magento 2 GraphQL - How to build a Tree structure in response

I have created a custom module for megamenu. I have created the graphQL query for that also. The query returns the correct result for level 0. How can I get the tree structure? Here is my graphql ...
user avatar
0 votes
0 answers
56 views

Custom GraphQl $args is empty on Interface custom attribute resolver

Here is my schema.graphqls type Query { products ( special_code: String @doc(description: "special code") ): Products } interface ProductInterface { addl_data: String @...
user avatar
0 votes
0 answers
36 views

How filers are applied in elastic search?

I am using magento community edition and I have installed Smile elastic search and it working fine but I want to know how elastic search query returning output in graphQL
user avatar
0 votes
0 answers
17 views

Magento 2 how can I retrive order_uid?

I am using Magento 2.4.2 version. for order return I found graphql here https://devdocs.magento.com/guides/v2.4/graphql/mutations/request-return.html I got 'order_item_uid' by using Customer Order ...
user avatar
0 votes
1 answer
130 views

Magento 2 GraphQl get store wise product collection

I want to get the product collection store-wise via graphQl. I have set in header parameter "Store": "ar", I want to get the product name in the Arabic store, but it's not working. ...
user avatar
  • 27
0 votes
1 answer
208 views

Magento2 How to get list of products that has special price in graphql

Magento2 How can I set filter for products in order to return products that has special price I am checking this URL but not able to figure out how to achieve this? https://devdocs.magento.com/guides/...
user avatar
  • 3,446
1 vote
0 answers
40 views

How to filter product using tier price in Magent 2.4.x

I am using Magento v2.4.3, Elasticsearch 7.13.1 with Graphql. I want to apply a price filter on tier price value. As price coming as per customer group and default filter getting applied on price ...
user avatar
0 votes
0 answers
88 views

Magento Graphql Cache issue

I have an issue with Magento graphql cache. Magento PWA setup is on Magento cloud. Default graphql query cache is not working with fastly. Any suggestion?
user avatar
0 votes
0 answers
20 views

Getting CORS issue in Magento graphql api call in react js

I am getting a CORS issue when i am calling graphql api of magento 2 in react js using apollo client grphql.
user avatar
  • 1
0 votes
0 answers
76 views

Catalog Graph Ql to use new layer from layerpool

I have created 2 custom modules to use a custom layer. This custom layer will filter the list of products by customModel Id (which converts to entity_id IN [...]) instead of the default category ...
user avatar
0 votes
0 answers
63 views

Magento 2 get request parametes in graphql

I want all the applied filters in graphql aggregation Can we use $this-getRequest() in graphql I am getting blank array in $args Any help would be Appreciated!
user avatar
0 votes
2 answers
228 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 ...
user avatar
0 votes
1 answer
119 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 ...
user avatar
0 votes
2 answers
86 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-...
user avatar
  • 1
0 votes
1 answer
79 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?
user avatar
  • 3,446
0 votes
3 answers
298 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.
user avatar
  • 1,838
0 votes
1 answer
490 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 ["...
user avatar
  • 1,838
0 votes
1 answer
519 views

Magento 2 How to add custom product attribute into existing product graphql query

How to add custom product attribute into existing product graphql query in the custom module in Magento 2. THANKS.
user avatar
  • 3,187
0 votes
1 answer
856 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.
user avatar
  • 3,187
2 votes
2 answers
761 views

Magento 2 How to create graphql query

How to create custom graphql query in custom module in magento 2. THANKS.
user avatar
  • 3,187
0 votes
1 answer
115 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
user avatar
  • 3,446
0 votes
1 answer
62 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 ...
user avatar
1 vote
1 answer
434 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/...
user avatar
  • 1,838
0 votes
0 answers
132 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: { ...
user avatar
  • 1,143
0 votes
1 answer
613 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 ...
user avatar
  • 1,478
0 votes
1 answer
41 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\\...
user avatar
  • 198
0 votes
0 answers
18 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! ...
user avatar
  • 2,068
0 votes
1 answer
25 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 ...
user avatar
0 votes
0 answers
20 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 ...
user avatar
1 vote
0 answers
48 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: ...
user avatar
0 votes
1 answer
303 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 ...
user avatar
  • 1
0 votes
0 answers
47 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. ...
user avatar
0 votes
1 answer
459 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 ...
user avatar
  • 1
0 votes
0 answers
67 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, ...
user avatar
  • 1