Note: This project is based on Microsoft's GraphQL for Microsoft Graph Demo
This is a demo that enables basic, read-only querying of the Microsoft Graph API using GraphQL query syntax. GraphQL enables clients to request exactly the resources and properties that they need instead of making REST requests for each resource and consolidating the responses. To create a GraphQL service, this demo translates the Microsoft Graph OData $metadata document to a GraphQL schema and generates the necessary resolvers. Please note we are providing this demo code for evaluation as-is.
- Clone the repo
- Install dependencies (
npm install
) - Navigate to the App Registration Portal, set up a new web app
- Configure App Id and redirect URIs in the AppConfiguration of build/index.html
- Run
npm start
and go tolocalhost:4000
{
me {
displayName
officeLocation
messages {
subject
isRead
from {
emailAddress {
address
}
}
}
}
}
{
groups {
displayName
description
members {
id
}
}
}
{
me {
drives {
quota {
used
remaining
}
root {
children {
name
size
lastModifiedDateTime
webUrl
}
}
}
}
}