'Microsoft Graph API calls for some functionalities

I am using Sharepoint Office 365, but am new to Microsoft Graph APIs. I have 2 functionalities, namely create a folder at a specific location and upload a file at that location. Suppose, the site url is: 'https://abcdef.sharepoint.com/sites/folder1/folder2'

So, first I have to create directory /folder1/folder2 inside sites, and then, need to upload a file (maybe text.txt) inside folder2. I just need the subsequent Graph API calls which are needed to achieve the required functionality. Can someone please help me on the above ?

Note: I don't need any code structure, just the API calls required (in sequence).

Thanks in advance



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source