Behind the scenes, when Microsoft Graph identifies that a REST API call is attempting to access an on-premises mailbox in a hybrid deployment, it proxies the REST request to an on-premises REST endpoint which then processes the request. This discovery makes accessing the REST API possible.
Please note that this is in preview. Only v1.0 of the Mail, Calendar and Contacts API are available for mailboxes in hybrid deployments. Other v1.0 API sets, such as the Groups API, or APIs in other versions, are not. If you attempt to use an API that is not part of the supported set in a hybrid deployment you will get the error.
For more information you can refer the following documentations: