Skip to content

Error in Magento 2.4.6, Call to a member function create() on null

During the process of the update, when i run the query for create a customerCart i have the following error:
Query:

 {
  customerCart{
    id
  }
}

[2023-03-22T14:37:58.926211+00:00] report.ERROR: Call to a member function create() on null

GraphQL (2:3)
1: {
2:   customerCart{
     ^
3:     id
 {"exception":"[object] (GraphQL\Error\Error(code: 0): Call to a member function create() on null at /var/www/html/vendor/webonyx/graphql-php/src/Error/Error.php:153)
[previous exception] [object] (Error(code: 0): Call to a member function create() on null at /var/www/html/vendor/magento/module-eav/Model/Entity/Attribute/Source/Table.php:118)"} []

I thought at the beginning that was due to from another custom module, but it was not the case, any suggestions? I appreciate your help.