Questions tagged [graphql]

Denotes questions about Magento GraphQL.

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

Magento 2 Graphql mutation sanitizer

I have written a simple mutation for my custom form. Everything is working, but I have a question. Does a Magento 2.3.x open source (and commerce if you know it) have some kind of data sanitizer ...
1
vote
1answer
19 views

Magento 2 graphql get the cms block based on store

I am trying to get the cms block based on store, but it is alway returning the default store block content. The query I used : { cmsBlocks(identifiers: "login-data") { items { identifier ...
4
votes
2answers
60 views

Magento 2.3.3 Getting issue in custom module GraphQL

I would like to create custom GraphQL for a custom module. but I am facing an issue. see below GraphQL response. In the above image, you can see I am able to get the response of days and **details** ...
1
vote
1answer
29 views

GraphQL product quantity in stock

I'm trying to get the stock quantity of my products via graphql, here is my query, but the quantity is obviously not in the schema. Am I wrong? Is there a possibility to get it somehow? request: {...
0
votes
0answers
38 views

Error in Apollo Query to Magento GraphQL API in Next JS app

I'm putting together a Next JS (9.x) frontend pulling in data from the Magento GraphQL API (2.3.2) using Apollo. My queries are returning an error on initial navigation but, but will render the data ...
0
votes
1answer
53 views

add custom attribute to customer in graphql magento 2

my custom module schema.graphql input CustomerInput { sample_attribute: String @doc(description: "new attribute") } but not adding this attribute in customer mutation magento 2 graphql ...
0
votes
0answers
31 views

Deprecation of REST APIs?

We are exploring different approaches for Magento integration (V2.3.3) with a storefront hosted on a third party CMS. We've come across 2 different approaches for this; REST based APIs GraphQL As ...
2
votes
1answer
152 views

How to filter product collection with default graphql products query

I am using Magento 2 Graphql to get product collection based on category id. I want to apply filter by color, size, material etc. I have checked the graphql available filters and those are not ...
0
votes
0answers
31 views

How to add custom attribute to create customer mutation magento graphql

Hi I create a custom attribute in Magento backend for Customers sample_attribute How i can add this attribute to graphql query to create a customer account in Magento 2.3 i tried this ...
1
vote
1answer
44 views

Call to a member function getPriceType() on null magento graphql - addtocart

I have a simple product with custom options while adding to cart i getting error add a simple product to cart mutation { addSimpleProductsToCart( input: { cart_id: "...
0
votes
0answers
17 views

magento graphql while adding product to cart problem with custom options [duplicate]

Request { products ( filter: { sku: { eq: "Product option values" } } pageSize: 3 currentPage:1 ) { total_count items { name sku ...
0
votes
0answers
38 views

how to create simple page in magento 2 pwa studio with graphql query

I want to create a custom theme (with the simple page) in Magento PWA studio is there any tutorials there to understand and create a custom theme in Magento PWA studio with integrating ...
1
vote
0answers
16 views

Not able to access graphql api for magento (with XAMPP) on localhost

Am new to Magento. Am using magento 2.3.1 with XAMPP v3.2.3. Does the XAMPP exposes the graphql api by default on localhost or I need to setup separate server for it like Apollo? I'm trying to set ...
0
votes
1answer
68 views

magento 2 graphQL not loading mutation in custom module graphql doc

I created a custom module for mutation with table when I create mutation is not loading in graphql doc Type \"PracticeOutput\" not found in document.\n\nException #0 (GraphQL\\Error\\Error) ...
1
vote
0answers
10 views

Cache type to regenerate schema.graphqls files

after changing the schema in schema.graphqls file I always must clean the cache. It's take a while, so I'd like to know, what the cache type in magento is responsible for regenerating this files?
0
votes
2answers
48 views

How to get customer group id into magento2 graphql

How to get customer group id into graphql magento2 Note: Only in GraphQL
0
votes
1answer
29 views

how i can use graphql in magento 2.3 and i can setup to magento 2.3?

i want to know how i can use Graphql in magento 2.3 is there any good resource's to understand that. how i can set up to my magento 2.3 project another question is Vue storefront ...
1
vote
1answer
47 views

Magento 2 GraphQL Tutorial Collection

https://amasty.com/blog/magento-2-api-updates-graphql/ General overview about GraphQL https://larsroettig.dev/how-to-create-a-graph-ql-endpoint-for-magento-2-3 This Tutorial shows how to create an ...
2
votes
0answers
39 views

Magento 2: GraphQL V/S REST API [closed]

I am planning to build API's. Which is better GraphQl or REST API? How easy to customize either as per the developer perspective view? https://www.howtographql.com/basics/1-graphql-is-the-better-...
0
votes
1answer
37 views

How to get the media_url in custom GraphQl in Magento 2.3?

I have a custom module to update Faq of the website.question and answers can update from the back-end.Answer field is wysiwyg editor.Can upload image to the answer content. If i get the result using ...
0
votes
1answer
202 views

Create a custom graphql module with filter attributes magento 2

I need to get all attribute values of product based on the category id. I had implemented this logic in rest api but I couldn't find clear solution for graphql module. My schema.graphqls file is ...
0
votes
2answers
372 views

Magento 2 : How to create custom GraphQl to Access Customer Data?

How to create custom GraphQl to Access Customer Data?
2
votes
3answers
138 views

Magento2 : What is the use of schema.graphqls file in GraphQL

What is the use of schema.graphqls file? vendor/magento/module-catalog-graph-ql/etc/schema.graphqls
0
votes
0answers
37 views

Magento2 gatsby graphql passing variable issue

My gatsby-node.js file is below const path = require('path'); var webpack = require('webpack'); exports.createPages = ({ graphql, actions }) => { const { createPage } = actions; const ...
0
votes
0answers
78 views

Magento 2 GraphQL: Filter Products by custom attribute

I am using Magento 2.3.3 and GraphQL to get a list of products. I want to query products by a custom attribute that I created in the admin. Couldn't find in the documentation how to. It is possible.....
2
votes
0answers
67 views

Magento 2 GraphQl + Elasticsearch 6, GraphQl query products do not run pass by elasticsearch

I have a problem with query: { products( filter: { sku: { like: "24-WB%" } } ) { items { sku } } } Although using search engine is "...
0
votes
1answer
143 views

Magento 2 GraphQl performance

I am working with magento 2 graphql. Out of box product category GraphQl service take more the 12 sec to load fist time. I have updated all required parameters on server but still same performance ...
0
votes
1answer
168 views

Adding extension attribute to customer in GraphQL Magento 2

In magento2 - I have created one extension attribute for customer using plugin, it's working fine for Rest API also. How can I include this extension attribute in GraphQL? In createCustomer mutation ...
0
votes
2answers
316 views

Magento 2.3.3 GraphQl Error after upgrade while Compilation

After upgrade from magento 2.3.2 to 2.3.3 I get this error while Compilation: Fatal error: Declaration of Magento\QuoteGraphQl\Model\Cart\SetShippingAddressOnCart::execute(Magento\Framework\GraphQl\...
0
votes
1answer
39 views

Getting this error when createCustomer mutation from graphql api (Some transactions have not been committed or rolled back)

I am getting this error when i try createCustomer mutation from graphql api searched for solution for this error but reached nothing i even tried to debug the code of module-customer-graph-ql in ...
2
votes
0answers
211 views

Getting Error “TypeError: Failed to fetch” While running graphql endpoint in ChromeiQL

I am running xampp server in my windows local. I setup magento 2.3.2 with sample data in it. When i try to run graphql in ChromeiQL , it throws error "TypeError: Failed to fetch". I have been using ...
0
votes
1answer
34 views

How to write grapgQl mutation to create and integrate the contact us page functionality in magento 2.3.2?

As same as the question, i want to create the mutation for contact us page and send the email via magento default contact us module without writing the custom email function in my resolver. How can i ...
0
votes
2answers
365 views

Magento 2.3.2 Error while Compilation

I am having this issue after updating Magento from 2.3 to 2.3.2 Fatal error: Declaration of Magento\QuoteGraphQl\Model\Cart\SetShippingAddressOnCart::execute(Magento\Framework\GraphQl\Query\...
0
votes
1answer
149 views

Magento 2 with gatsby grapgql for product view page?

I am using gatsby js and successfully got the product list in index.js But I need to show the detail of product on click. So I used the below code in gatsby-node.js file. const path = require('path')...
0
votes
1answer
120 views

Magento 2 with Gatsby and GraphQl issue

I am trying to integrate the magento2.3.2 with gatsby js and Graphql. For reference please check this link https://www.gatsbyjs.org/packages/gatsby-source-magento2/ I have integrated everything but I ...
0
votes
1answer
61 views

Magento 2 graphql file upload not working

I am using this schema to file upload: mutation{ uploadImg (file: Upload!): File @resolver(class: "\\Test\\Cgraphql\\Model\\Resolver\\UpImg") @doc(description:"Upload img") } But getting error: ...
0
votes
1answer
296 views

How to extend or override default graphql query, mutation or schema

I want to include some changes in default graphql response but no idea how can I do that and what is the right way to do that as there is not documentation available there. Do I have to create always ...
0
votes
0answers
74 views

Default graphql queries are not listing in ChromeiQL

Hello I am exploring Graphql currently and testing the magento's default graphql APIs but in ChromeiQL there is only two mutation queries are listing(createEmptyCart, placeholderMutation) and it is ...
0
votes
0answers
23 views

How to write a custom search using GraphQl in magento 2.3?

I Have News page like below. How to create the graphql shema to perform this. Here i want to load all the news first time, search by search text, archive, category. Any help to achieve this please?
0
votes
1answer
116 views

graphql failed Error In PWA-Venia Theme

Hi Guys I'm getting error while running yarn run build error and Screenshot is attached in below. Help will be appreciated, Thanks :) FetchError: request to http://magento2/graphql failed, reason: ...
0
votes
1answer
24 views

graphql filer options do not represent filters data

When I query the test site with chomeIQL extension using the query: query category($cat: String) { products(filter: {category_id: {eq: $cat}}) { filters { name filter_items { ...
0
votes
1answer
69 views

Magento 2.3.X: GraphQL does not reflect catalog rule discounts

I'm using Magento 2.3.2. I've successfully completed all cart-related tasks (create cart, add a product, select shipping& payment methods, and place the order) using GraphQL. GraphQL seems not ...
2
votes
1answer
329 views

Get product attribute value in GraphQL api

I'm having a problem with the GraphQL API for Magento 2. I cannot retrieve the attribute value of multiselect or dropdown attributes when I retrieve my products. In this example my attribute "...
2
votes
1answer
34 views

How to submit contact us data to Magento 2 contact us form action using graphqL?

How to submit contact us form data to Magento default functionalities using graphQl. I know to want to pass the form data using Mutation and doesn't have a clear idea to achieve the target. Please ...
0
votes
1answer
432 views

How to get custom product attributes values using graphQl queries in magento 2.3?

I want to get the values for custom product attribute in product details page. I am using below GrapgQl query to get the values. i am passing the name as the argument. How can i get the products ...
0
votes
1answer
307 views

Error in graphql schema running in magento 2 : Cannot query field \“wordoftheday\” on type \“Wordoftheday\”."?

I created a custom module with a custom table in magento 2.3.2 including grpahql schema. I want to get the data using graphql by passing an argument. I am getting the following error in Alatair ...
2
votes
3answers
431 views

Magento 2.3 GRAPHQL

How to run Api request in Magento's newly introduced feature Graphql. I have gone through some of the documents. In my local environemnt, So far I have installed ChromeiQL extension from chrome ...
0
votes
0answers
49 views

Magento 2 Get image with custom role/type

I'm trying extend Magento 2 GraphQL to return some images based on a custom role $productData = [ 'highlight_image_1' => $product->getSmallImage(), 'highlight_image_2' => $...
1
vote
1answer
285 views

How to remove GraphQL from Magento 2.3?

I'm not planning to use GraphQL in my Magento 2.3 and I would like to remove it at all for now, not just disable it. How could I do it?
1
vote
1answer
226 views

Pwa studio yarn build error

⚠ GraphQL Error (Code: 404): {"response":{"error":"\n\n404 Not Found\n\nNot Found\nThe requested URL /graphql was not found on this server.\n\nApache/2.4.33 (Win32) PHP/7.2.4 Server at 192.168....