Add query for all uploads

This commit is contained in:
Michael Merrill 2017-04-03 20:36:08 -06:00
parent 14be2c2433
commit 0dd7f4a9b4
2 changed files with 4 additions and 4 deletions

View File

@ -9,8 +9,9 @@ const getNewVal = (result) => {
export default {
Query: {
ignore () {
return null
async allUploads () {
const db = getRethinkDB()
return await db.table('uploads')
}
},
Mutation: {

View File

@ -13,8 +13,7 @@ input Upload {
}
type Query {
# GraphQL will not work without defining a query.
ignore: Boolean
allUploads: [File]
}
type Mutation {