This repository has been archived by the owner on Dec 17, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added README with basic usage example
- Loading branch information
Simon Wears
committed
Mar 26, 2017
1 parent
960aa73
commit 8a99d0e
Showing
1 changed file
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# HealthGraphQL | ||
|
||
A GraphQL wrapper around the Health Graph, to support reading and writing data. | ||
|
||
> Currently supports reading profile information & fitness activities, and reading & writing strength training activities. | ||
## Usage | ||
```javascript | ||
var express = require('express'); | ||
var healthgraphql = require('healthgraphql'); | ||
var app = express(); | ||
|
||
app.use(healthgraphql({ | ||
graphiql: true, | ||
getAccessToken: function (req) { | ||
// return access token here | ||
} | ||
})); | ||
|
||
app.listen(3000); | ||
``` | ||
|
||
### Options | ||
`graphiql` - Boolean. Enable or disable the graphiql interface. | ||
`getAccessToken` - Function (request). Should return the access token to use to access the Health Graph. |