-
-
Save joepie91/8f20e242147e1f3328b50f416dac1c22 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| return Promise.try(() => { | |
| let query = gql` | |
| query SomeDrives($driveNames: [String]) { | |
| hardware { | |
| drives(names: $driveNames) { | |
| path | |
| model | |
| size | |
| } | |
| } | |
| } | |
| `; | |
| return graphql.graphql(schema, query, root, {}, { | |
| driveNames: ["sda", "sdb"] | |
| }); | |
| }).then((results) => { | |
| console.log(util.inspect(results, {colors: true, depth: null})); | |
| }); |
This file contains hidden or 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
| { data: | |
| { hardware: | |
| { drives: | |
| [ { path: '/dev/sda', | |
| model: 'TOSHIBA MD04ACA400', | |
| size: <Unit> 3.7 TiB }, | |
| { path: '/dev/sdb', | |
| model: 'WDC WD40EZRX-00SPEB0', | |
| size: <Unit> 3.7 TiB } ] } } } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment