Irev-Dev / Irev-Dev/MRI-Volume-Slice
Use openneuro.org's GraphQL API
- Dominant language
- JavaScript
- Stars
- 7
- Forks
- 6
- PR merge metrics
- No merged PRs in 30d
Description
open neuro has a GraphQL interface, which is great 👍.
https://openneuro.org/crn/graphql
Currently we fetch a dataset from openneuro, but it's hard coded, we're always grabbing the same one. It would be good if we instead used the API and grabbed a random dataset each time, we could also add a button for 'load random MRI' to get a new one (but the botton can be done later).
### Extra info
I have never used graphQL before so I was really flaying about but I did have a little play and using the query below I was able to get it to return a number of url's for files. We would be interested in files ending in `.nii.gz`, so filtering and probably limiting the number per files return per dataset seems appropriate.
``` graphql
{
datasets {
id
draft {
id
partial
files {
urls
}
summary {
modalities
totalFiles
tasks
size
__typename
}
__typename
}
analytics {
views
downloads
__typename
}
__typename
}
}
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.