Fatal error: Declaration of Magento\GraphQl\Model\Query\ContextInterface::getUserType(): ?int must be compatible with Magento\Framework\GraphQl\Query\Resolver\ContextInterface::getUserType(): int in public_html/vendor/magento/module-graph-ql/Model/Query/ContextInterface.php on line 20
Seems like you tried to extend any class but there is issue with extended class, please share code or check once.
If you have added any extension, check if any class is using this function getUserType(): ?int
if you find this anywhere, remove ? from this code.
Hope it helps ~
thank you very much for the answer ...
but how can i see and find the function in one of the extensions .. is there a command?
@famedesign Do you have an override of Magento\GraphQl\Model\Query\ContextInterface?
Because somewhere in 2.3, the interface for the execute method had an argument that changed from Magento\Framework\GraphQl\Query\Resolver\ContextInterface to Magento\GraphQl\Model\Query\ContextInterface. If you ever overrode that method, then you will need to update the $context argument to match the class specified in the interface.
Hope it helps!
you can just disable module one by one and can try to run di:compile everytime :
to disable module, run this command from docroot in command line :
php bin/magento module:disable MODULE_NAME
and to enable it back, run this command :
php bin/magento module:enable MODULE_NAME
@famedesign use the below command to check if this file is overridden in some custom extension.
grep -r "GraphQl" app/code/
Let me know the search result.