pnpcore icon indicating copy to clipboard operation
pnpcore copied to clipboard

Support for MS Graph Search endpoint

Open hazzinator1 opened this issue 8 months ago • 1 comments

Category

  • [x] Feature request

Describe the feature

We have recently swapped over from PnPJS in the UI to making our Graph/SharePoint calls with PnPCore in our API. I was shocked to find that PnPCore doesn't currently support the Graph Search endpoint (https://graph.microsoft.com/v1.0/search/query), and instead uses the SharePoint API endpoint (_api/search/postquery). We are making heavy use of the Graph Search endpoint in our app, and cannot verify whether we are going to be running into problems by using the SharePoint search instead. They seem roughly similar, but I would still be a lot more comfortable if I knew PnPCore could support Graph searching natively.

Describe the solution you'd like

Happy to leave it up to the devs to determine this, but a strongly typed way of accessing the Graph Search endpoint would be required. Some inspiration could be taken from how GraphServiceClient does it within the Microsoft.Graph Nuget package.

Additional context

I have gone the route of leveraging the GraphServiceClient.Search.Query from Microsoft Graph for now.

hazzinator1 avatar Oct 20 '23 14:10 hazzinator1