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 good in PWA except the product details page is showing "Internal server erro"
When I checked the Network section then found that graphQL
ResolveURL
is throwing an error below:
{ "errors": [ { "message": "Internal server error", "extensions": { "category": "internal" }, "locations": [ { "line": 1, "column": 75 } ], "path": [ "route", "type" ] } ], "data": { "route": { "relative_url": "black.html", "redirect_code": 0, "type": null, "id": 6857, "__typename": "SimpleProduct" } } }
graphQL query is :
query ResolveURL($url:String!){route(url:$url){relative_url redirect_code type ...on CmsPage{identifier __typename}...on ProductInterface{id __typename}...on CategoryInterface{id __typename}__typename}}
Checked this graphQl on postman pointing to the same issue.
When I checked graphQL error in Magento Log:
[2021-12-07 04:37:58] main.ERROR: Expected a value of type "Int" but received: PRODUCT {"exception":"[object] (GraphQL\\Error\\Error(code: 0): Expected a value of type \"Int\" but received: PRODUCT at /var/www/html/mage0/vendor/webonyx/graphql-php/src/Error/Error.php:174, GraphQL\\Error\\InvariantViolation(code: 0): Expected a value of type \"Int\" but received: PRODUCT at /var/www/html/mage0/vendor/webonyx/graphql-php/src/Executor/ReferenceExecutor.php:976, GraphQL\\Error\\Error(code: 0): Int cannot represent non 32-bit signed integer value: PRODUCT at /var/www/html/mage0/vendor/webonyx/graphql-php/src/Type/Definition/IntType.php:62)"} []
Anyone has gone through this issue . please help.