Questions tagged [graphql]
Denotes questions about Magento GraphQL.
237 questions
1
vote
1
answer
68
views
Best practice for exposing Magento 2 data to an external AI/MCP service
I’m working on an integration where an external AI service queries Magento 2
business data (orders, products, customers) using natural-language requests.
From an architectural point of view, I see two ...
0
votes
0
answers
27
views
GraphQL login problem
When I generate a customer token via Magento GraphQL, I am able to perform authenticated operations such as createCartAfterSignIn without any issues. However, I do not see the customer session ...
0
votes
0
answers
38
views
magento2.4.8-p3 AuthorizationRequestValidator.php line 56 $this->tokenReader->read($headerPieces[1]) not working
I have installed the latest magento
magento2.4.8-p3
vendor/magento/module-customer-graph-ql/Controller/HttpRequestValidator/AuthorizationRequestValidator.php line 56
$this->tokenReader->read($...
0
votes
0
answers
16
views
Getting expected componenttype error when opening my admin grid form
https://github.com/aakashs11042k/crud-magento2/tree/main
this is my module for perform crud operation on admingrid and graphql when grid is working as expected and graphql query and mutation working ...
0
votes
1
answer
86
views
Not able to access graphql schema and resolver on localhost Xampp server
Please help me
I am not able to access graphql schema and resolver from the custome module on localhost Xampp Server
Here is my code
/etc/graphql/schema.graphqls
type Query {
testHello: String @...
0
votes
0
answers
54
views
Shipping method issue with RestAPI
I'm facing an issue with my REST API. I've created an interface for the API and am using the same function in both my REST and GraphQL APIs, with identical parameters.
The problem is: when I call the ...
1
vote
1
answer
95
views
How to get product tier price using graphql magento2
I am performing a full text search to get the list of products.
I need to get the tierprices of the products. But I am getting the following error.
Customer with id "18" does not exist.
I ...
0
votes
2
answers
352
views
Magento2: Disable / Modify GraphQL Field Suggestion
In GraphQL, if we enter wrong field name in search, its will suggest the alternative fields in the response. It creates some security issues in production. So we plan to disable that feature. ...
0
votes
0
answers
56
views
GraphQL - Schema generated remove not null indication when in an array
In a custom module in etc/schema.graphqls, I declared my query :
type Query {
getAvailableCountries: [Country!]
@resolver(class: "\\Vendor\\Module\\Model\\Resolver\\getAvailableCountries&...
0
votes
1
answer
94
views
Magento 2: updateCustomerV2 graphQl
when i am passing value to taxvat variable NULL i am getting syntax error and if i am paasing value to it, it working proper but my requirement is accept the null value as well
when i am checking the ...
0
votes
1
answer
88
views
Listing categories through GraphQL doesn't work
When I try to retrieve a list of categories with the below GraphQL query, I only get one result instead of the expected 8.
All the configuration options for the categories are default.
Listing ...
1
vote
1
answer
507
views
str_replace(): Argument #3 ($subject) must be of type array|string, float given error after magento upgrade from 2.3.7 to 2.4.7
I have upgraded magento from 2.3.7 to 2.4.7. And one of the graphql query gives below error
str_replace(): Argument #3 ($subject) must be of type array|string, float given at /vendor/magento/module-...
0
votes
1
answer
134
views
Product is visible when the visibility is set as 'catalog' while quering via graphQL in magento 2
For example, a product visibility has been saved as only "catalog", but the product still visibile while searching a product at frontend. (I have checked by searching the product with ...
0
votes
2
answers
114
views
Graphql return null values
Schema.graphqls
type Query {
getGoogleMedia: [GoogleMedia] @resolver(class: "Test\\LocationData\\Model\\Resolver\\GoogleMediaResolver")
}
type GoogleMedia {
image_view_all_link: ...
0
votes
2
answers
269
views
Magento 2 : GraphQL - Generate Customer Token not working
I'm performing the below CURL request in Postman, but it's not working.
curl --location 'http://gravity.freestylelibre.devops:81/graphql' \
--header 'Authorization: Bearer ...