Using the Microsoft Graph API to get items
Git branch
This section uses the https://github.com/PacktPublishing/Mastering-SharePoint-Development-with-the-SharePoint-Framework-/tree/chapter5/using-ms-graph-api-to-get-items Git branch from the repository. Additionally, you need to set up prerequisites following the instructions provided in the https://github.com/PacktPublishing/Mastering-SharePoint-Development-with-the-SharePoint-Framework-/blob/chapter5/using-ms-graph-api-to-get-items/README.md file and run the deployment script: Prerequisites/deploy.ps1.
In the previous section, we used static data to simulate our product information and set up the render flow. Now that it is working, it is time to fetch real data coming from the SharePoint list.
As we saw in Chapter 2 regarding SharePoint building blocks, we have multiple ways to get data from a list. We could use either the SharePoint REST API or Microsoft Graph. In our case, we will use the latter to fetch the product information...
 
                                             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
     
         
                 
                 
                 
                 
                 
                 
                 
                 
                