1

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.

2
  • I have faced this issue. The problem was with the backend url which was given in the .env file. So check that file. eg scenario: backend url: localhost/magento243 . This url will be used by the pwa studio to send graphql which appends "/graphql" in the url, which will be "localhost/magento243/graphql". So check whether this is working. And check the magento site is working. If not check with permissions..
    – Jason
    Dec 9, 2021 at 14:40
  • thanks @Jason, I checked it many times, but the issue persist Dec 9, 2021 at 18:19

1 Answer 1

1

just Please Check if you have a product attribute with code type and remove it and reindex and clear cache

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.