how to fetch id from custom grid

I want to fetch custom module ID and pass that ID to the form through Controller, How Can i make if($data[’email’]!=”” && $data[‘phone’]!=”” && $data[‘name’]!=””){ //echo “hi surgery”; $currentTimestamp = Mage::getModel(‘core/date’)->timestamp(time()); //Magento’s timestamp function makes a usage of timezone and converts it to timestamp $date = date(‘Y-m-d H:i:s’, $currentTimestamp); $data[‘created_time’]=$date; $data[‘source_from’]=’hernia’; $data[‘status’]=1; $model = Mage::getModel(‘surgery/surgerycrm’);…

Magento 2 graphql API

I am using createEmptyCart mutation for create customer Quote Id or Mast Id. createEmptyCart mutation write in vendor/magento/module-quote-graph-ql/etc/schema.graphqls file and use resolver file Magento\QuoteGraphQl\Model\Resolver\CreateEmptyCart. But in this Resolver file $customerId = $context->getUserId(); getting blank customer id, I have not idea how to set user id or customer id in ContextInterface, We need to set in…